These sessions were a bit more technical, which I liked – except for the Scott Hanselman keynote, which covered VS2012 features (which were amazing!). More on that in a minute.
Here’s a quick synopsis of the things I got out of the sessions, in no particular order:
- Some MVC best-practices
- Use model validation, embrace HTML5 validation
- Use ViewModels to organize the “Model” data you want to give to your view.
- Handle unknown controller actions with HandleUnknownAction override.
- Write “razor helpers” in partial views (or I argue, don’t use them at all – use HTML Helpers instead because they are testable, FXCop-able, and reusable)
- Remove unused view engines: ViewEngines.Engines.Clear() in your global.asax, and then explicitly add: ViewEngines.Engines.Add(new RazorViewEngine()) for example
- Add namespaces to your directory-specific web.configs so you don’t have to keep adding @using statements in your views
- Great write-up and samples: Test-Driving ASP.NET MVC for test-driven development.
- Have a .Core namespace for things that don’t have dependencies like .Interfaces, .Services, .Models (this came from Jeffrey Palermo)
- Have a .Infrastructure namespace for external dependencies.
- Alternatively, there is the Onion Architecture, for laying out your namespaces.
- Here’s an interesting post from SO on solution and project layout too.
- The Steve Smith New Is Glue article (with a firestorm of comments that follow!)
- People referenced “Put your controllers on a diet”, but I can’t seem to view or download this video…
- From ObjectMentor: “The deep synergy between testability and good design” – just re-iterates everything we already know from Bob Martin and the rest of the “right way” to write code. REALLY good video!
- Create goldilocks Visual Studio Solutions: too many projects, incorrect abstraction; too few, not enough abstraction/ball o’ mud!
- Common Closure Principle – classes that change together, are packaged together
- Common Reuse Principle – classes that are used together, are packaged together
- Stable Dependencies Principle – depend in the direction of stability
- Stable Abstractions Principle – abstractness increases with stability
- Steve Smith’s fork of the MVC Music Store on codeplex, which applies many design patterns – his fork is here.
- Six Design Patterns Every Developer Should Know
- Singleton (and why not to use it) – single instance
- Strategy – writing to an interface/ctor injection
- Repository – abstracts data access
- Proxy – used for caching, to get between a consumer and provider
- Command – delayed execution or “undo” functionality
- Factory – deferred creation of objects
- In the Nancy talk, they talked about the Richardson Maturity Model for REST, which I hadn’t heard of before then.
Now, about Scott Hanselman’s keynote, I am not sure what to say. I was shocked. There were 1200+ people on, and he wasted 6 MINUTES of time with showing his toys in his office and covering logistics issues with the moderators, like “wait, can you hear me now… what if I click this..” kind of stuff. They didn’t capture that, they just starting recording after he settled in – here is the video.
Next, his IM and e-mail were constantly popping up notifications. It was distracting and frankly came across as just unprofessional. More specifically, it came across like he was clearly phoning it in. That was a disappointment because aspConf is a community-organized event that has a lot of great content – and it was clear that he wasn’t really invested. It was really surprising too, to see it go so badly because he is sort of known for his good public-speaking and see here, especially.
Anyhow, my critique aside, what he showed was pretty cool. He had a more recent build of Visual Studio 2012 (as of this writing the release candidate is available to the public). At this stage in .NET development, it is very clear that they have a very solid foundation. .NET 4.5 and Visual Studio 2012 clearly are going after the “nice to haves”. They have spent a ton of effort in increasing developer productivity. All of those little tiny annoying things, they seem to have addressed! Here are some of the notable things for VS2012:
- Summary of .NET 4.5 and VS2012 changes.
- SignalR will become part of ASP.NET
- All ASP.NET features and volatile parts of .NET will become versionable, open-source NuGet packages so that they can be versioned out-of-band. NuGet is a critical piece of VS2012.
- Social logins (via DotNetOpenAuth) will be part of the standard web templates (where you can login to the MembershipProvider via twitter, facebook, google, or microsoft login)
- Support for async HttpHandlers and HttpModules
- Support for HTML5 WebSockets
- ASP.NET WebForms “model binding”, similar to WPF!!
- No .sln or .csproj format changes with VS2012 – so you can open and re-save solutions and projects, and still open them in VS2010
- Lots more, but these ones stuck out to me…
So, I personally am very much looking forward to the release – hopefully in the first week of August, along with the RTM of Windows 8.
Overall, this year was even better than last! There was a lot of great content with some pretty good presenters. I wish they didn’t have so many tracts – they had 6. So at any given time, there were 6 different sessions going on. It would’ve been a little nicer if they would’ve turned it into 4 days with 3 tracts on each day.
The good part (I guess) is that they did record everything, so they will all be made available here:
The bad part is there are SIXTY (60) x 1.5 hour = 90 hours of sessions to catch up on, if you didn’t attend!