Wednesday, October 14, 2009

Picking Javascript Web Framework Poison (jQuery and Dojo)

This is the first in a two part serious that I wanted to document my experiences building a web application with different frameworks. The first part I will talk about my experience with two of what I call "lightweight frameworks" and then the second blog I will discuss the two "heavyweight frameworks". I will not be covering any of the why use a framework in this or discussion about user experience however if you are not concerned about user experience and using a framework to support the X number of browsers out there then dust off you resume you are going to be looking for work soon.

Lightweight vs Heavyweight
All though all of the javascript frameworks I am going to write about you "can" do the same thing some make things easier than others. In fact I believe that there is a spectrum based on the user interface of the application I am trying to build or said better "the right tool for the job". Also some other consideration are prototyping and one offs.

jQuery
jQuery was one of the first javascript frameworks I used. Mainly because of how simple it is to use and how much I was trying to avoid writing javascript. My favorite feature with jQuery is how terse the syntax is. This is probably why I like Python so much over Java just the speed of getting simple easy things done. jQuery is great for doing all kinds of simple DOM traversal and manipulation. There are a lot of plugins for doing all kinds of other things however I have found the jQuery UI and a lot of the plugins much to be desired in ease of setup and functional (cross browser ect).
Dojo
Dojo was another framework that I followed and managed building a rather large embedded project with it. Mainly because at the time the support for UI windows and things was much better. The syntax is kinda bloated and it takes some time getting things setup and coding but once you have the compile process working well it was very stable and functioned extremely well.

Picking Poison
As I have already mentioned it depends on the project. I would choose jQuery for any project that is mainly content but needs some simple quick DOM manipulation and maybe use of a plugin or two. The full UI is usable and I built a prototype with it but there was more typing and cross platform issues than I wanted. Dojo is kinda the next step in the spectrum if you have a product you need just a small amount of UI features like the occasional dialog box or small amounts of embedded pieces. Dojo I found to be a bit slow at times even with all the compression tools they have. I generally don't use Dojo any more because I use jQuery for simple things and use YUI because ... well that is the next blog .

0 comments:

Post a Comment