May 20th, 2007
Love and Hate: My Relationship with ASP.NET
A while ago, when Ruby on Rails became an example of what a developer friendly web framework is, I’ve started to play with ASP.NET.
The funny thing is I didn’t want to. You see, me and my friend, we were working together for a company. Our job was to build a web app and the technology and implementation details were up to us. I lobbied for python (back then, the Rails-like python frameworks were not ready to use yet). Kamil pushed for C# and ASP.NET.
I’ve had just begun to learn C# back then. I thought it was a nice language. I also thought it was a safe choice when it comes to job market and at the same time safe choice when it comes to writing apps for linux (thanks to Mono project). But ASP.NET? I thought it was just a big bloated framework on top of another (quite decent) one, the .NET framework. I didn’t want to dive into two gigantic APIs at the same time.
But somehow I agreed to one thing: If I’ll manage to get Apache+SSL+MySQL+mod_mono running on Windows (yeah, I know that’s a lovely combination), we will do the project in ASP.NET. After spending many hours with httpd.conf etc, I did it.
We wrote the whole thing with #Develop, so we had no luxuries like drag & drop while designing web pages etc. But all went well and I actually liked how things worked in ASP.NET. I really wanted to learn more
Couple of months later I started working for another company, where I could spend even more time with asp.net. Some boring enterprise stuff. When dealing with pretty complicated business logic in a web app, the thing that will probably annoy you the most is validation. And ASP.NET just blows at validation.
Oh sure, you have standard validation controls etc, but they only look good on 5 minute demos. Additionally, you have no actual control over the order of execution of used validation controls. Well, you can hack around it by, for example, lumping all the validation logic into one custom validator (bleh) or write your own validation framework. But why would I want to use a framework if it forces me to write one. Things got only marginally better with .NET 2.0. And I think WF may be very good in that kind of stuff, but I didn’t investigate the possibilities yet.
In the next episode I’ll show some .net love.