16.08.2012 Views

dotnetrocks 0638 rob eisenberg

dotnetrocks 0638 rob eisenberg

dotnetrocks 0638 rob eisenberg

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

architecting the solutions. For me it would have been<br />

a much bigger issue I'd say to have to come to the<br />

phone and rethink everything entirely and think about<br />

how I build things entirely differently.<br />

Richard Campbell: Yeah.<br />

Rob Eisenberg: So what Caliburn.Micro lets<br />

you do is sort of use the same conventions, the same<br />

mental approach to solving p<strong>rob</strong>lems across the three<br />

platforms even if there are some slight differences<br />

here and there. But mainly the mental overhead is<br />

not there to be switching back and forth between how<br />

you’re architecting things. You can think the same<br />

way, solve p<strong>rob</strong>lems the same way. You just might<br />

have a different control on the phone or the root might<br />

start with the View, a navigation architecture that's a<br />

little bit different or what-not, but mainly you can think<br />

the same way about solving those p<strong>rob</strong>lems. For me<br />

that's where the big time savings has come in over<br />

the years. It's taken a long time to sort of understand<br />

and work through these patterns, these concepts, and<br />

see simple and elegant ways to solve them. It's funny<br />

actually because it oftentimes takes a really long time<br />

to come around to the simple solution. I found that<br />

my first way of solving p<strong>rob</strong>lems has been really<br />

complicated, but over the years I've come around to<br />

very simple solutions for things. So I want to keep<br />

that simple mindset when I'm going across these<br />

platforms and not have to start over from scratch<br />

mentally and go through that whole process again.<br />

That's a great help to me and I've seen a lot of good<br />

response from phone developers using the<br />

framework. They really just, they like the mental<br />

approach and the way of composing apps. They like<br />

that there's a fairly seamless transition from WPF or<br />

Silverlight into the phone for them. There are not any<br />

new concepts they need to learn. They just need to<br />

realize, oh, we don't have a tab control on the phone<br />

but we do have this pivot control, and they're<br />

conceptually the same kind of UI and they can work<br />

with the ViewModel in conceptually the same kind of a<br />

way so they can engineer their ViewModel the same<br />

as they always did but just throw a different type of a<br />

View on top of it. That becomes really powerful.<br />

Carl Franklin: So tell us quickly, because I<br />

know we only have a few minutes left, what the<br />

difference between Caliburn and Caliburn.Micro is.<br />

Rob Eisenberg: Right. So that's kind of a<br />

critical point that may be confusing to people at this<br />

point. The first framework was Caliburn, and, like I<br />

said, it came into existence some time in 2007 and it<br />

has evolved a lot. It was originally designed for WPF<br />

and it was designed for larger applications. It's<br />

extremely modular in the traditional sense that there<br />

are interfaces for all its services. You can customize<br />

and replace everything. It has a lot of adaptors to<br />

other external projects so if you want to use IoC with<br />

Rob Eisenberg MVVMs Us with Caliburn.Micro!<br />

February 17, 2011<br />

it, we have adaptors for every major IoC container.<br />

It's rather large and, though the feature set is very<br />

nice, I found that developers, though they were<br />

enticed by it, were a little bit afraid to use it because<br />

of its complexity and because they had a little bit of<br />

dependency on some legacy. In fact they called<br />

Legacy WPF. In other words, things that they fixed<br />

later on or improved that I wasn't able to take<br />

advantage of at that time. So I wanted to expose<br />

developers to the concept of conventions and actions<br />

and all these neat things we were doing. So at MIX<br />

last year I had the chance to do a session called Build<br />

Your Own MVVM Framework in which I basically<br />

wrote a little itty-bitty framework, about 500 lines of<br />

code, that showed how you could build a lot of these<br />

features very simply and how much productivity you<br />

can get out of it. I got so much positive response<br />

from that, from individuals as well as companies that<br />

were just highly interested in seeing that fleshed out a<br />

little bit more, that I decided to see if I could roughly<br />

expand it but only so much as to cover the main-use<br />

cases that Caliburn had covered, like 80% to 90% of<br />

the main-use cases, without worrying too much about<br />

edge cases and to keep it as small and tight and<br />

compact as possible. So that's where the<br />

Caliburn.Micro came.<br />

Carl Franklin: Okay.<br />

Rob Eisenberg: It's about 10% of the code size<br />

of Caliburn but it literally has 80% to 90% of the<br />

features because it focused so much on the main<br />

cases. So it's a lot simpler, a lot easier to understand.<br />

It's a little bit more up to date in terms of some of the<br />

new features in the framework and how it leverages<br />

them.<br />

Carl Franklin: We've added a link also to the<br />

Caliburn vs. Caliburn.Micro page on CodePlex and a<br />

couple of things that you've mentioned here. Caliburn<br />

supports AOP, Aspect-Oriented Programming.<br />

Caliburn has a validation abstraction, a module<br />

framework, a testability framework, a ViewModel<br />

factory. So there are differences. But you also say "I<br />

prefer to use Caliburn.Micro over Caliburn." That's<br />

what you say also.<br />

Richard Campbell: Well, it feels like it's a next<br />

version.<br />

Rob Eisenberg: It is a next in a sense a new<br />

version. It's almost like if I could do this over again. . .<br />

Richard Campbell: Yeah. I've had that experience<br />

where after finishing a really complex project I sat<br />

down and noodled it down again, like how could you<br />

take it on differently and you end up writing 90% of<br />

the functionality in 20% of the code.<br />

Transcription by PWOP Productions, http://www.pwop.com Page 12 of 13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!