If you missed it, check out Part 1 of my Rails VS ASP.NET series.
At first, I didn't understand what that phrase meant. Convention over Configuration? I guess I'm a little dense sometimes. At some point, it finally clicked. Suffice to say, ASP.NET has a whole lot of configuration, but not a lot of convention.
Before I go any further, here are the components I see as being integral to Web 2.0 development.
- An ORM tool
- Unit testing framework
- Ajax library/Interface
- Javascript Extension Framework
Rails has all of the above components integrated into its framework. Each component is very well constructed and integrate seamlessly with each other, making for a very slick, easy, and, most importantly, productive developer experience.
ASP.NET, on the other hand, currently only bolsters the ajax and javascript components. which I have issue with. It's not bundled with an ORM or unit testing framework.
Side Note:
Far too many of the ASP.NET developers I've run into don't know what an ORM tool is or what a unit testing framework does. If you're one of these developers, please, please, please!, For the good of your fellow programmers and your profession, educate yourself on ORM's and Unit Testing technologies, ASAP. No one will laugh at you, I promise. We all used to be "that guy."
Yo, What Does This Have to Do With Convention?
Patience, I'm getting there! So, there are plenty of 3rd party frameworks out there to overcome the ORM/Unit Testing deficits in ASP.NET. For unit testing, we have MBunit, NUnit/NUnitAsp, et al. and for ORM's we have LLBLGEN pro, Castle ActiveRecord, NHibernate, et al. The list goes on and on. The result of all this diversity is a very separated and divided developer community. Some developers like to use LLBLGEN, others prefer Nhibernate, and more often than not, the Nhibernate guys hate the LLBLGEN guys (I don't get it!). While all of this diversification is neat because it gives us developers a lot of options, it sucks bad because it introduces a huge amount of configuration complexities.
A Confession...
We're entirely guilty of this at BrightMix. Example: for our ASP.NET projects, we typically use LLBLGEN for our ORM, MBunit as our Unit testing framework, a mix of 3rd party controls (fckeditor, obout controls, nvelocity, et. al.), and an MVC-esque framework that we rolled ourselves.
This setup is cool because:
- it's highly configured for us
- we can crap out a new ASP.NET web application pretty damn quickly.
This set up is crappy because:
- 3rd party stuff usually costs money, at least most good 3rd party stuff
- configuration and integration of 3rd party stuff requires a lot of time and understanding
- pretty much no convention
I wonder... of all the ASP.NET developers out there, what percent of them are using a configured set up similar to ours? My guess is probably not very many.
So, Why is Convention Good?
Imagine you're in charge of hiring some ASP.NET developers. Your team uses one of the many ORM and unit testing frameworks out there, a custom MVC framework, and some other miscellaneous add-ons. What you'll find is that most ASP.NET developers have never even heard of your 3rd party stuff, let alone used it. No, the reality is you will have to teach a newly hired ASP.NET developer the in's and out's of your configuration, which is probably going to take a long, long time. The more configuration, the longer it will take.
With RoR, this conundrum is practically eliminated. 99% of Rails developers will know how to use the standard issue ORM, unit testing, and javascript / ajax libraries with which rails is bundled. Talk about a time saver.
I just read through this post after writing it, and it appears as though I have a lot of bad things to say about ASP.NET, and I, inadvertently, have a lot of good things to say about Rails. Blarg! Maybe I'm just bitter after working with ASP.NET for so long and seeing (and writing) so much terrible, crappy code.
Well, my next post in this series will talk about the future of ASP.NET, which gives me a glimmer of hope for ol' Microsoft.