[geeklog-devel] AJAX and Javascript Libraries - request for comments

Blaine Lang devel at portalparts.com
Mon Feb 2 19:18:22 EST 2009


Dirk is in the process of moving the Wiki and had been waiting to start 
this on the Wiki but in light of some recent other discussions, I will 
start that discussion here on the DEV list. For some time (ok, a couple 
years), I have wanted to add a more comprehensive Javascript library 
with AJAX capabilities to the core GL framework.

Although, the initial focus is on adding a JS libray to make it easier 
to add AJAX, there is clearly a need for a JS library to made it easier 
to code the functions and UI components to handle and enrich the user 
interface. AJAX enabled forms or screens can all be coded in plan 
Javascript but the optimizations and proven library functions can not 
only make the coding easier, faster and cleaner but we easier to develop 
common methods and reference code. Thats without leveraging some of the 
sophisticated widgets, plugins these libraries can offer.

This thread is then to ask for suggestions on the JS Library to use and 
why. We may need to setup prototyped code for comparison.

I will start with my preference and reasons - let the debate begin ....
------

As part of our Nextide projects, we have been doing AJAX powered Geeklog 
plugins for a few years. Many of the nexpro plugins like nexFlow, 
nexList are good examples but that code was done a few years ago. Since 
then we have further optimized the coding style of using YUI and our 
latest projects (not public releases) are much cleaner.

There are probably 100 AJAX libraries that could work with PHP and I 
started into this a few years ago rolling my own to better understand 
the issues. After looking at and trying a few, I settled on YUI because 
about 2+ years ago, it was developing a strong community and had a big 
name behind it. JQuery and others like qooxdoo,MooTools, Prototype,Dojo 
where also starting out.

YUI's AJAX has some nice features like automatic linking to a target 
form and posting the form fields with no additional Javascript and can 
easily handle files. The library supports both POST and GET and easily 
used in non-form applications like links where you still want to use 
AJAX. The library has configurable timeout plus support for success and 
error handlers as well as custom event handlers. I've been using it with 
the YUI JSON library this past few months and it's been working nicely 
and easy to code.

The YUI library is quite extensive now, but we only need to use 
Connection Manager Library which needs the minimum version of 
theirYahoo-Core and Event libraries. Additionally, they have the JSON 
library which is optional but highly recommended that we standardize on 
with any AJAX returning data.

http://developer.yahoo.com/yui - main site, with links to their blog, 
examples, documentation and community forum.
http://developer.yahoo.com/yui/connection/  - the AJAX connection library

YUI has a very complete documented API, plus examples, tutorials and 
active development community.
YUI 3.0 is in Pre-Release and shows that this library has a forward 
looking roadmap.
http://developer.yahoo.com/yui/3/

Using YUI and JQuery for some of JQuery's nice UI and DOM manipulation 
is very doable and I have recently started to use JQuery for a new 
project. I really like the way JQuery has fostered active development 
and extensions and don't see any reason why we can't use both JQuery and 
YUI where they fit best. In both cases, minified and CDN hosted 
libraries are available.

- Blaine



More information about the geeklog-devel mailing list