A little bit of an aside from Ruby on Rails but at least it is related to Web Development.
It has been almost two years since I built an ASP.NET Web-site of any size. Back then I used the patterns outlined in the Data Access Tutorials on the ASP.NET site. This series of lessons by Scott Mitchell is very strong on using :-
- Typed DataSets
- .NET 2.0 Controls such as GridView
- Separation into Business Logic Layer (BLL) and Data Access Layer (DAL)
For my implementation I used Stored Procedures for all access to SQL Server 2000. In summary it worked well but was very cumbersome to change. Even small changes involved a lot of “turning the handle”.
So fast forward to 2008 and there are a lot more options with .NET 3.5 and other developments. So what to choose? I’ll start at the bottom of the stack and move up
Database
In the environment that I work in there is an easy default choice of SQL Server 2005. Having used SQL Server for 5 years now I am very comfortable with it and find there is a lot to like. The Management Studio makes it easy to work with the database independent of the application which is very helpful.
Database Access / Object Relational Mapper (ORM)
This is the area where there is a lot of choice. Having tried out Ruby on Rails the benefits of Active Record are clear so something similar would seem to be desirable.
Things are also evolving in this area so it does make the choice of where to invest you time in learning a new technology not that clear.
This post from Rob Conery aptly titled Choosing Your Data Access Method would seem to answer the question however it is almost a year old (December 2007) and things do move on.
I was considering LINQ to SQL as there are a lot of good tutorials on it that link to the MVC framework. Also I had not caught up with where things are heading in the space with the future development of LINQ to SQL. This is covered at here however I still feel LINQ to SQL is a “safe” choice for a light weight data access method.
So to cut a long story short I am going to try out SubSonic. For no other reason than it comes highly recommended and other members of my team are using it.
Frameworks
Frameworks may not be the right term but I am looking to use ASP.NET MVC but this still gives you lots of choices to make (C# vs VB, Data Access methods etc). The Model View Controller (MVC) pattern has clear advantages and familiarity from a Rails development perspective.
JavaScript Library
From an end user perspective I really like the addition of a bit client side “magic”. Particularly the yellow fade technique made famous by 37 Signals and partial page updates rather than page loads. Using ProtoType in Rails is really easy and I am hoping that using jQuery will be just as easy in ASP.NET. jQuery is an easy choice as it the most popular library and links in with Microsoft as Scott Guthrie explains here.
Other Bits – what have I missed
At this stage for the type of Web applications I develop I don’t think I need Silverlight . JavaScript combined with AJAX provide some fairly powerful and high performance client side functionality. JavaScript is continually evolving (TraceMonkey etc) so still has “some legs in it”. Off course Silverlight comes into it’s own for embedding video and other media.
In Conclusion
At this point this is a theoretical exercise as I don’t have first hand experience with Subsonic, ASP.NET MVC . However at some point you need to make a choice of technology and then move forward. After that as they say “you can’t learn to swim without getting in the water”.
