Using and abusing ASP.NET MVC for fun and profit
Being a huge fan of ASP.NET MVC, I couldn’t miss the opportunity to see guys that are much smarter than I am show off how they use the MVC framework. Jeremy and Chad showed real code of how they had been using the ASP.NET MVC framework in their projects.
Because this is a brand new framework, I have these moments when I’m using it that it doesn’t feel quite right. I feel that the way I’m coding something isn’t the best way to do it, but I don’t know how to get around it. While sitting in the session I had a lot of aha-moments, I saw how other people tackled problems that I couldn’t wrap my head around until now.
These are some key points that from now on I will try to keep in mind while using the ASP.NET MVC framework:
- Keep your views light, your controllers medium and your model heavy
- HttpContext is your enemy, controllers should not come in direct contact with the HttpContext even now it’s mockable
- Get rid of magic strings (for example hashtable examples like ViewData)
- Thunderdome principle
- No if’s or foreach’s in the view, use extension methods, htmlhelpers and partial views to get rid of logic in your view
Last but not least was a demo that Jeremy gave of StoryTeller, it was a short demo but it looked very promising. I highly recommend viewing the session, you can find the video’s at the KaizenConf wiki.
This time Jeremy paired up with Glenn Block to tell us more about presentation patterns. They talked about several presentation patterns including passive view, supervising controller and view-viewmodel-model. The thing I realized is that I’m not using presentation patterns enough in my day to day job and that I should start using them where I can as soon as possible.
After the fantastic sessions it was time to kick off the open space. This was my first open space and I didn’t really know what to expect. Doc List coordinated it all and it was a great learning experience. We started with a fishbowl, after which everyone participating could propose subjects. After that everyone voted and the topics that he or she was interested in. The schedule was formed.
An open space leans on four principles:
- Whoever comes is the right people
- Whatever happens is the only thing that could have
- Whenever it starts is the right time
- When it’s over it’s over
I followed a lot of sessions and have a lot of loose notes. I had a really good feeling with the concept of open space. The sessions are more debates and the participants discuss the things they want to talk about, not only what the speaker wants to show. Because almost everyone is participating you learn a lot from each other.
This was by far the best conference I’ve ever been to. I’ve learned so many things in such a short period of time. I would like to thank everyone who we met in Austin specially Conrad and Michael for letting us tag along and of course Scott for organizing the whole thing. If you are interested, there as a LOT of material produced you can find it on the KaizenConf wiki.