Total application design: circa 2011

Sunday, June 05, 2011

Working with a few recent projects I'm getting pretty close to a nice boilerplate for a "standard" web application built with the latest technologies.  Subject to client restraints, here's the stack:

  • UI and middle tier: ASP.NET MVC3 (using VS2010 SP1).  Note that this requires .NET 4, which has some nice features (I love Tuples) but I don't think is completely necessary otherwise.  SP1 is important, which I'll mention later.  For smaller-ish applications I've been moving away from multiple projects in a solution, mainly because I haven't been seeing a ton of real business logic besides authorization, and I've been able to productize many ancillary functions into separate DLLs.  Razor view engine is used, and templates are updated to mirror Html5Boilerplate.com's templates. jQuery is applied unobtrusively.
  • Data access: Fluent NHibernate.  This is integrated in such a way that depending on your needs, you don't need to add a direct reference to it, though.  References are needed for access to NHibernate advanced queries and the Linq provider.
  • URL Rewriting: UrlRewriter.Net. This is used for css/js versioning.  A URLHelper extension method appends the current version number (derived at build time from source control) for the application to the script or CSS filename, and the rewriter strips it back off.  We probably could use MVC3 routes here, but it seems overkill for something that could be handled by simple Url rewriting.
  • Dependency Injection: Spring.net.  Any DI/IOC container would work here.  Again, the integration with spring is very lightweight and easily replaceable.  One strike against Spring.Net is the lack of support for Mono, but this hasn't been an issue in the environments with which I've been working.
  • Other tools: Dotless is used in a development-time capacity to generate CSS, with Chirpy (customized) to keep the development experience smooth.  A handful of other custom DLLs and build tools keep the project structure relatively vanilla.  Hudson is used for continuous integration.
I'm putting together a NuGet package with this build.  When this is complete, I'll post an update.

Other technologies/tools on the radar are Entity Framework (NHibernate replacement) and Castle Windsor (IoC container that supports Mono).  DotNetOpenAuth is under consideration as a standard way to pull in authentication and authorization functions.



Emil's Wicked Cool Blog