Sunday, January 16, 2011

MVC3 Boilerplate

Every time I create a new ASP.NET MVC3 project there are certain libraries and code I re-use regularly. One of them being HTML5 Boilerplate which I love. I did some googling for "MVC3 Boilerplate" and didn't find anything, so I decided to start my own and placed it here on GitHub.


With every release MVC3 included more awesome out of the box (finally has jQuery AND jQuery UI!), but I'd like to see the option to go further. One of the things I love about Ruby on Rails is it includes more of what you need to get you straight to coding like a de facto ORM (ActiveRecord). I also don't like how complicated AspNetSqlMembershipProvider is and the fact it doesn't store data in cleanly named "Users" table so I decided to add my own simple User class that can be modified and extended.


I'd love to see someone with more experience then me clean up, take over, re-do or otherwise improve on this idea. So feel free to fork my project or make suggestions. I'm not always the best and keeping projects up to date but I'll see what I can do.


Some of the features I've included are:
  • HTML5 Boilerplate
  • Elmah (error logging)
  • JSON Parser (comes in handy when making JSON based ajax calls)
  • Modernizr (part of HTML5 Boilerplate, but awesome enough to warrant its own mention)
  • AntiXSS Library (Most of the places this is used was based on the Tekpub MVC2 Starter Site, I'm probably doing it wrong and/or not using it enough)
  • Ninject (dependency injection)
  • SquishIt (used to compress and minimize javascript and CSS)
  • Sql Server CE (included so you don't need full MS SQL or SQL Express)
  • EF Code First (used as the ORM)
  • Bits from Tekpub MVC 2 Starter Site
  • Basic User Signup using simple POCO User object

I really don't know how much I'll keep this project up to date but even if it helps one person that's enough for me. ;)