Many thanks to Chris Bowen who was the guest speaker at the August 2010 Boston Azure user group meeting. The topic was ASP.NET MVC, with an Azure perspective.
- Check out Chris’ blog at: http://blogs.msdn.com/cbowen/
Here are my rough notes:
There was no slide deck – Chris jumped right into the code. Here are a few of my rough notes.
Consider Web Platform Installer 2.0 to install Azure tooling.
- Windows Azure Platform Tools
- Visual Web Developer 2010 Express
ASP.NET MVC concepts / benefits:
- “A lot of convention” – great in the long run, hard to grasp at first…
- Separation of Concerns – controller then view
- ASP.NET MVC is closer to the metal than traditional ASP.NET – if you want to implement, say, XHTML, then nothing stands in your way.
- Strongly-typed Controllers and Views can be generated once your model is in place.
- Controller may choose to pass along only a ViewModel – subset of full Model, or perhaps enhanced
- Model Binding is also by convention
- Hackable URLs
Tips and Tricks:
- Ctrl-Shift-Click on Visual Studio in Win 7 will launch in Admin mode which Azure requires.
- Can modify the T4 template for MVC to alter its UI options in wizards.
- Ctrl-M-G – bring me to the appropriate View for this Action
New in MVC 2 / ASP.NET 4:
- RenderActions – new in MVC 2
- New in ASP.NET 4 (not just ASP.NET MVC 2) is <%: “foo” %> where the “:” is a new feature as shortcut for HTML.Encode for the content.
- MVC 2 has powerful client-side validation based on characteristics of your model. Does not require a server-side round trip. You specify e.g., [Required] attribute on Model data – and you don’t need to write any imperative code.
http://asp.net/mvc – many great resources.
Windows Azure developer fabric – also known as “the fog” – is the Azure cloud simulator running locally.
There were around 30 people in attendance at the meeting.