Thursday, January 17, 2008

AJAX, Python and JavaScrip, Oh My!

@home, a year or so ago, I tried to play around with some AJAX stuff, but didn't get very far b/c rolling my own framework got complicated and there were too many choices getting press on the interwebs.
@home, I have been slowly trying to learn Python
@work, I need to validate some data against the DB via AJAX

---------------

So I decided to spend some time finding out about some of the leading AJAX frameworks and actually try and use a few of the best looking ones on the same task to see what each brought to the table. Also, since Java isn't the most "dynamic" language around when it comes to quickly prototyping stuff and trying to quickly change things .... I thought this also might be an interesting chance to do something "real" with Python.

Originally I was going to post my results and everything all in one post, but that was getting too long, so I will post each part separately instead.

---------------

Some of the criteria I want to look at when comparing the various frameworks includes:
  • size / # of files
  • other dependencies
  • documentation / community
  • ease of use / how much do I need to learn just to do the basics
  • usage style (collection of methods, objects, etc...)
  • JSON/XML/raw data support
  • cross browser compatibility
  • error handling (framework, transmission, application)
  • help managing/throttling simultaneous requests
  • help w/ continuous polling
  • extra features (user interface, DOM processing, etc)
My current tentative list of frameworks to look into includes:
The only requirements I have are that framework must be server-side independent. There are numerous ones out there that allow for easier integration with server-side components and/or generate the client-side javascript for you (e.g. GWT and DWR) .... but these won't work with my current work situation, so I am leaving them out ... for now.

Finally, here are some links that have been helpful to me so far:

If anyone has any suggestions of frameworks I have left off, ways to test them, or other sites I should check out, please let me know.

3 comments:

Alex said...

Prototype is more of a low-level library than most of the other ones you mentioned. In fact, many of those libraries actually use prototype to do their work. I know for a fact that at least 3 of them do. Another thing that might be interesting to test is if they have any special support for JSON(Javascript object notation) vs XML.

Jeff Scudder said...

If you want to use JSON, I recommend the implementation from json.org:

http://www.json.org/json2.js

I'd like to cast my vote for prototype, the cleaner and simpler the better. This site also had some interesting reading on JavaScript:

http://www.crockford.com/javascript/

Benjamin P Lee said...

Thanks for the links and the suggestions. I am still working on this, but as it turns out, am not going to be using it at work (after working through the problem a bit more we found that we really needed the call to be synchronous to achieve the UI feel we wanted ... which led us to realize that an AJAX call wasn't really solving the problem ...)