Hanalei, Hawaii 9/2/2010
438 Posts and Counting

MVC Storefront: Best Episode Yet Is On It's Way Monday

Friday, May 30, 2008 -

I sat today with Jeremy Miller (the Shade Tree Guy - what does that mean anyway?) for 2 whole hours as we replumbed the site to work with StructureMap. I know I've been saying I want to go with Unity, but a couple of key features of StructureMap pushed me in the other direction - I talk about this more in the screencast.

I <3 Dependency Injection
It's a buzzword, unfortunately, but I have to say that once you "get it", it's rather magical. I have two hours of pair programming with Jeremy Miller sitting here on my desktop, begging to be edited and I hate to touch any of it. For so long I've wanted to squeeze one of these Alt.NET guys brains and burn out some code so I finally "get it".

Not to say that I don't get DI - I do. But the extent of what you can do with it is rather stifling and I just flat didn't know it. Jeremy is brilliant at explaining things, and after a few minutes of plugging things in and watching it go, I started to mutter to myself, something along the lines of "what have I been doing this whole time".

Now I may read this in 3 years time and laugh (DI could be 2008's DataSets) but for now, I'm enjoying my shiney new toy :).

Plugging this in has allowed me to clean things up tremendously, and feel ever happier about the way this is coming together.

Careful Editing
Now my task is to distill 2 hours of geeking out into concise, watchable stuff. It's not easy - I don't want to leave anything out. I'll ask for your patience with this - suffice to say I'll be working all weekend on it to get it just right.

I hope you're looking forward to this as much as I am, and I hope I give you reason to look at DI/TDD in a whole new light.

Finally, there are a lot of great DI frameworks out there that do roughly the same things. Unity is great in terms of a quick setup and ease of use. There's also Spring, Ninject, and of course Windsor.

It's up to you which one you want to use, and I'm not trying to push StructureMap over any other. The main reason I went with it is because Jeremy was willing to sit with me and talk me through all of it.

I should also mention that Chris Tavares of the Unity Team did this as well, but a bug in Vista managed to turn off his microphone during our recording session! So I lost it all.

Many thanks to Chris and Jeremy for their help - can't wait to get this pushed!

Related


Gravatar
ms440 - Saturday, May 31, 2008 -

"I hope you're looking forward to this as much as I am..."

Yes, I am!

I'll catch up with #12 meanwhile and will check out your #13 first thing Monday.

Great job, Rob! Thanks a million.

Gravatar
Marcos - Saturday, May 31, 2008 -

Rob, I was planning on going through all episodes of the MVC storefront this weekend and was wondering what version of the MVC framework is best for the tutorials. I downloaded the Preview 3 but haven't installed it yet. I'm a newbie to the MVC framework and I'm thinking I may have trouble with new framework bits that have changed since you first posted the movies.

Perhaps you could post a summary of things that have changed throughout the series for the respective frameworks. That may help people like me.

Thanks.

Gravatar
Ryan - Saturday, May 31, 2008 -

Rob, I have a simple request that I (and many, many others) would probably love:

Edit the videos for the people who want to watch 30 minute videos, but release the stuff that is unedited. It might sound crazy, but when you said you had 2 hours of hashing our Structure Map with Jeremy Miller, I thought "wow, that would have been two hours I would pay for." So let us go through the "a ha!" moments with you and release the unedited stuff.

You aren't going to lose readers or anything, if we are fanboys then we are fanboys, we aren't going anywhere. But the thought process, the coding, the method to your madness is what I (and I'm sure others) would like to see.

I could type more on this as this interests me incredibly, but just think this over, I am sure that somehow we could find a hoster for the videos.

Gravatar
Mike Surface - Saturday, May 31, 2008 -

I just wanted to say how extremely helpful this series has been. I've known about TDD for quite some time, but just didn't know how to put it into practice - where to start - etc.

Thank you for doing this :)

Will you be at TechEd next week? I will be :)

Gravatar
Firefly - Sunday, June 01, 2008 -

@Rob, If you like StructureMap and from the way you explained SubSonic refactor you might also want to check out AutoFac. AutoFac was developed with C# 3.0 in mind therefore being able to used a lot of the cool language features. My hat off to you for being to able to bring many wonderful people into this project. Prop to Jeremy as well :)

Gravatar
David - Sunday, June 01, 2008 -

+1 for releasing the 2 hour version :)

Gravatar
Nagarajan - Sunday, June 01, 2008 -

Hi Rob,

What software you are using for Recording and remote Pair Programming?

Regards,

Nagarajan.

Gravatar
Firefly - Sunday, June 01, 2008 -

Oh yeah +1 for releasing the 2 hour one :) Or release both...

Gravatar
Aaron - Monday, June 02, 2008 -

Add another vote for releasing the 2 hr version as well! We can learn a lot for all the "ah ha" moments Rob!