Friday, 13 March 2009

AJAX DIY

It’s been a long time between blogs and a very busy start to the year for me. One of my clients has some pretty hefty requirements for a web based, SQL Server backed, SharePoint integrated production system to be accessible world wide via their less than super fast WAN. I’ve been kept very busy and I’m yet to hit the really tricky bits.

Whilst designing and building this system, I’ve found myself writing a lot of bespoke AJAX. I’m used to working on a fast company LAN so I’ve always talked about AJAX as being an efficient use of bandwidth. I now had my eyes opened to just how badly conceived some AJAX frameworks actually are. For example, Microsoft’s AJAX control toolkit offers a wide range of easy to use components but partial page renderings often end up costing as much (if not more) in bandwidth as a full page refresh! This is something which I was only vaguely aware of until I tried running my AJAX pages from an office in Shenzhen!

It quickly became obvious that Microsoft’s AJAX tools weren’t up the job at hand so I had a look at what else was out there. There are some excellent toolkits available, Telerik's RAD Controls are undoubtedly one of the best with some very flashy looking elements and some very good reviews (from people I know as well as on their site). But though they are more efficient than the Microsoft tools, I would still have had to work extensively to craft the feature rich GUI which my client was looking for. In my mind it seems silly to pay for something which ultimately isn’t going to save time or increase the value of the build. Also, even the Telerik controls had performance problems in the environment in question.

This was when I started thinking back many years to a time before .NET, when possibly the most powerful tool in a web developer’s arsenal was their knowledge of JavaScript. I spent quite a few years making the DOM dance to my tune long before I discovered asp.NET and server controls. There are so many AJAX ‘helper’ kits out there that it’s easy to forget how straight forward an AJAX call is to make. In fact, over the last few months I’ve realised that much of what is provided by these tools is pretty straight forward to code yourself.

My message to any developer is this:

Don’t automatically think that because something is available for download and looks flashy that it will make your application better / quicker / smarter. Just because something is for sale doesn’t make it any better than what you could build yourself. Think about what your client REALLY needs and how much work it would take both with or without 3rd party kit. You might just find that you’re quite capable of going it alone!

No comments:

Post a Comment