Thoughts of a multimedia madman

Monday, April 10, 2006

ASP.NET web wonder or web hell?

Recently I’ve been learning my third web development environment ASP.NET 2.0 having had prior experience in coding ColdFusion and then PHP. I knew ASP.NET would be different because I had heard it was more object orientated and like traditional Windows application development and Microsoft had developed quite a sophisticated development environment to go with it. I’ve always been a bit wary of ASP in its seemingly unpleasant merging of VB scripting and rigorous separation of code and HTML. In my experience I found ColdFusion to be very quick to get results with and easy to code for without any more assistance than the provided manuals most of the time.


When I started learning ASP.NET properly for the first time I was quite surprised at how quick it was to put together many of the basics easily from within the WYSIWYG interface. Master pages let you establish a consistent look very easily and very powerfully and a whole login architecture had been developed so you could literally drag and drop to get started. Wizards were a breeze to create compared to the custom system I spent weeks perfecting in ColdFusion. The honeymoon period didn’t last long however and once I started to serious task of putting together a web site in accordance to the specification I had I soon found that the very powerful and yet simple controls ASP.NET gives you could also prove to be it’s biggest problem. The login system was great if it didn’t require modification to suit your needs but almost all sites I’ve seen specify their own user management systems and the site I was working on was no exception. To keep things as simple and integrated as possible with ASP.NET I found I needed to write my own security providers which appeared to be a daunting task. Thought it didn’t prove to be as difficult as I thought it might be I was left unable to make it fit in completely so I’ve had to write mix my own custom pages together with their built in security mechanisms which feels a little bit uncomfortable and risky to me.


While I managed to get each small task done eventually it became very apparently that everything had to be done the Microsoft way or you would find yourself in a situation where all the power you were given would be sucked away slowly until you were left without much of the added power at all. For instance if you don’t like Microsoft’s security module and choose to completely bypass it without writing a security provider at all then you can’t take advantage of things like being able to protect certain users or types of user from accessing particular directories (e.g. a directory of admin scripts) automatically, instead you would have to code access checking and denying code into every single script. I started finding I was spending a lot of time reading up about the use of specific controls and sitting through basic examples of them in action but then when I tried using some of them I found that either they didn’t do what I wanted, looked awful or operated in an undesirable way. I also noticed when I started using CSS to try and style some of the stuff I had written that ASP.NET produces a lot of HTML code automatically for it’s controls in the form of tables and HTML 4 style formatting which is rather old fashioned and inflexible in a modern XHTML and CSS world. Microsoft say you can change the outputted HTML but it involves what appears to be a rather non-trivial exercise which quickly detracts from the simplicity that made ASP.NET appealing in the first place.


I got the impression with ASP.NET that a lot of small example projects were written in it during development which probably worked quite but I’m not sure it was thought about for larger sites with more specific requirements. A real web professional would probably be better off sticking to a traditional language like PHP or ColdFusion where the control is absolute (assuming they haven’t changed beyond recognition since I last used them) however I feel ASP.NET would be an excellent way for a hobbyist programmer to create a small custom online website quickly and easily.


I could be wrong on this and see the light, until then I feel that anyone who is thinking of using ASP.NET should think long and hard about what impact its development model will have on your project.

0 Comments:

Post a Comment

<< Home