Wednesday, 16 February 2011

DotNetDevNet Usergroup meeting

Mike and I went to a great .Net usergroup meeting yesterday. After sitting through a couple of 10 minute presentations on Fogbugz(!) and Android development, the main part of the meeting kicked off. Presented by Steve Sanderson it was basically a quick run through of asp.net MVC3. I definitely recommend seeing Steve if you have the chance - no powerpoint, and lots of code!



The main things he showed us:

  • MVC Scaffolding
    • This packages up a bunch of different libraries and allows you to write a couple of classes, and then go to the powershell to generate some default databases, repositories, controllers and views that allow you to carry out basic CRUD tasks on those classes. It's pretty clever, as you can template it, add your own libraries, use various etc., but it was hard to see how we could really benefit from it in an enterprise environment.
  • SQL Server Compact
    • Free file system based SQL server. Looks like it could be very useful for smaller sites where you don't want to pay for SQL server hosting. Possibly useful for unit testing?
  • IIS Express
    • Need a .Net 4.0 web server that fits onto two floppy disks? IIS Express is for you! I can only think that this might be useful for allowing the sales guys to have a copy of our site on their laptops without loads of hassle (come to think of it, maybe that's what SQL Server Compact is for too.
  • Razor View Engine
    • OK, I'm sold. IF you are writing a normal view or partial view that has HTML, server code and JavaScript, then Razor looks far superior to the normal webforms syntax. No more <%, you don't need to close off your server code, and it magically knows when you've put some HTML in and treats it properly. That's it though really.
  • Knockout.js
    • Nifty little JavaScript library for binding JSON to your html in an MVVM pattern. Am unsure of it's worth in an Enterprise setting, especially if we use Ext.JS, which I believe binds JSON to the controls anyway (correct me if I'm wrong).
All of the stuff above means you can knock up a reasonably decent MVC site with AJAX etc in an hour or so - not really what we are looking for so you'd be forgiven for thinking it was a waste of our time. Actually it was incredibly useful, for the following reasons:

  • We saw how MVC3 has some hooks for IoC/DI that Mike will be investigating further. 
  • We saw how Code First EF was incredibly powerful, though we will need to have a better understanding of it to use it well. Also not sure how you deploy changes in that model, which could be an issue.
  • As part of the Knockout.js demo Steve was using some powerful looking JSON commands that parsed between C# classes and JSON objects - obviously a subject close to our heart!
Anyway, I'll keep an eye out for when the code files are posted up, and add the links in here, but the definite highlight of the whole night was when I won some Visual Studio silly putty!

Mike won...nothing...

No comments:

Post a Comment