Microsoft Visual Studio and out-of-the-box ASP.NET has long taken a Rapid Application Development (RAD) approach to web site construction which is quite different from the Model-View-Controller (MVC) approach most famously used in the popular Ruby On Rails platform.
Rails-style development seeks to achieve “separation of concerns”. Objects called controllers handle application flow; a persistable object model is provided for the data; and viewers are purely concerned with presentation. In the long run this can result in cleaner designs and more maintainable applications. ASP.NET embeds a great deal of messy code within each “web form” and does little to encourage separation of data tiers, much less “concerns”.
I have little trouble buying into this and would love to escape the inelegance of stock ASP.NET development using something like Castle MonoRail, which provides C# templates and libraries for rails-style development under either the Microsoft or Mono runtimes. And soon, a couple of Ruby implementations will work with Visual Studio and will probably allow Ruby On Rails development with a pretty good degree of interoperability with standard .NET assemblies and components.
The question is, do these alternate platforms have legs? My guess is, in the .NET world, they will only be the province of True Believers for the present. Here’s why.
If you’re anything like me, you have little alternative than to be deeply committed to the components, tools and APIs that Microsoft provides. That’s because customers and employers feel safe with the “approved” way of doing things. We’re expected to dive into the middle of existing code bases and that requires that we invest significant time and effort in our continuing education so that we understand those existing code bases.
In addition, most companies have investments in third party libraries and components which themselves are deeply entangled with and exclusively tested on Microsoft-standard code base configurations. On top of this you frequently encounter popular frameworks such as DotNetNuke in the field, which aside from being written with standard ASP.NET environments in mind, have extensive peculiarities of their own — not to mention their own development ecosystems. None of this can be readily leveraged in an alternate reality such as a rails-style MVC code base.
How many developers have the energy and lack of a personal life to pursue something like MonoRail in any depth using their “spare time”? For most, this has “fun to play with but gets no paying real-world use” written all over it.
MonoRail not only requires that you go through a complete change of approach and a significant learning curve with little or no support from your paying work; it anticipates that you’ll also buy into related technologies such as NHibernate that you may not be familiar with or sold on, either.
Hopefully you’ve progressed beyond straight ADO.NET data access code embedded in forms and have some kind of n-tier strategy worked out. You may use custom entity objects in the business layer rather than DataReaders or DataSets. But if the vast majority of .NET code bases I’ve been exposed to are any indication, you haven’t cast your lot wholeheartedly with some full blown object-relational mapping (ORM) implementation.
The issues are similar: it’s difficult to acheive reuse of ORM code unless you lock-in to one implementation (NHibernate for example) with all its particular performance and maintainability trade-offs. And it’s hard to lock-in unless you work for an organization that has buy-in to that particular solution. It’s even harder if you’re an independent contractor like myself, because the odds of most of your clients magically standardizing on a particular ORM library / platform is next to nil.
As an independent contractor I do have one advantage: some of my clients don’t know or care what specific technology I use, and I can decide to do a small project using MonoRail, NHibernate, or even Eiffel.NET and so long as it works they won’t care. I am currently hunting for such an opportunity. I’m also thinking of exploring Umbraco as an alternative to DotNetNuke on an upcoming site rewrite. If nothing else these will be broadening experiences … but I just don’t see the vast majority of day to day .NET applications being done any way but the Microsoft Way, love it or not!