Home MVC Storefront

Slammed With Goodness

I've been turning up the heat in terms of getting content out for the MVC Storefront series, and it's caused a bit of an avalanche for me. I've had to "double my efforts" of late as I've been falling behind some, and in doing so I've been smothered in geeky goodness...

Mocking Me, Mocking You
I spent the day today working with Moq, and also peppering Phil Haack with all kinds of questions with respect to testing controllers and mocking a form request. That Phil's pretty learned, and he showed me some great ways to do just this - which I captured with a screenshare. I have about 30 minutes worth of audio that I need to edit down.

I also have implemented some really cool  features of MVC - including the not-so-well-known ComponentController.

DI and IoC
I've been threatening to "inject" the application with Dependency Injection, and today was the tipping point. I finally pinned down Chris Tavares and he and I talked for about an hour while wiring the site up with DI (and then losing a lot of code).

Authentication
Finally I've recorded about 90 minutes of hooking up Login/Registration/Membership Admin stuff - all of which is just great!

There is so much here... probably about 4 screencasts-worth; I just couldn't stop! My goal to "keep moving forward" is to just spaz out and catch 5-10 minute "coding vignettes" which I stitch together (like a reality show) into a drama-filled story. I have 20 of these vignettes sitting next to me - so expect some serious updates in the next few days.

Francois Tanguay avatar
Francois Tanguay says:
Friday, May 23, 2008

I'm looking forward to Unity integration but mainly on how you came up to need Moq and interaction-based testing.

Don't get me wrong; I love Moq but I always start with state-based testing and try to delay white box testing as long as possible.


AJ Marknette avatar
AJ Marknette says:
Friday, May 23, 2008

Sounds awesome. So when are we going to get a chance to get the new bits from CodePlex?


Steven Harman avatar
Steven Harman says:
Friday, May 23, 2008

Francois, mocking (read: behavioral/interaction based testing) is a an integral part of TDD/BDD especially when you consider the outside-in approach we typically take when going the TDD/BDD route. Of course, state-based testing still has its place, but I'm not sure how you can "delay" interaction testing and mocking if you're building out a system in a TDD/BDD manner.

Oh... and Rob, surely you're going to use a _real_ IoC container, like StructureMap, Windsor, or maybe even Ninject, right? :)


Klaus Graefensteiner avatar
Klaus Graefensteiner says:
Friday, May 23, 2008

You have been kicked. This is a good thing. :-)


Aaron Gorsky avatar
Aaron Gorsky says:
Friday, May 23, 2008

Would you consider posting both the edited versions and the full versions for us to view/listen to? Im sure there will be things that you think would "basic" and not needed in the video but others like myself would get benefit from. Consider it?


Francois Tanguay avatar
Francois Tanguay says:
Friday, May 23, 2008

@Steven: I agree. What I was trying to say(but actually didn't) is that when you go DDD, it's all about your entities first and they shouldn't have dependencies. Hence it takes a while before I end up needing to mock dependencies and do interaction testing.

And then you have domain services, which should also mainly act onto your entities by modifying state, hence state based testing.

I think it's usually only until you get into Application Services, View/App models and controllers that you really need interaction testing.


Francois Tanguay avatar
Francois Tanguay says:
Friday, May 23, 2008

@Steven: Oh and one more thing. Unity IS a real IoC container. I might be a bit biased as I participated actively in providing feedback but I sincerely think it solves way more than 80% of the issues an IoC container should solve.

Don't get me wrong, I use Windsor all the time but I think that it is probably a really straightforward container to use/show in the context of a screen cast.



Search Me
Subscribe

Index Of MVC Screencasts

You can watch all of the MVC Screencasts up at ASP.NET, and even leave comments if you like.

Popular Posts
 
My Tweets
  • @haacked must.... resist... assimilation...
  • Dinner at the Haacks. How did Phil get such a cute kid? Evidently Phil's in the doghouse though...
  • @shanselman dude turn off twitter and drive! that's gotta be illegal!
  • For D'Arcy and Justice... Scottgu goes Canuck! http://twitpic.com/mfz1
  • Working in ScottGu's office with @shanselman. Wearing an Orange Polo and saying "go ahead" a lot for some reason.
  About Me



Hi! My name is Rob Conery and I work at Microsoft. I am the Creator of SubSonic and was the Chief Architect of the Commerce Starter Kit (a free, Open Source eCommerce platform for .NET)

I live in Kauai, HI with my family, and when my clients aren't looking, I sometimes write things on my blog (giving away secrets of incalculable value).