[TriLUG] OT custom tag library - ajax

William Sutton william at trilug.org
Tue Dec 19 12:03:34 EST 2006


You may want to look at prototype.js[1] and its help guide[2].  It's 
apparently Ruby-esque, but if you read the help guide it's not too bad.  
Basically you create an Ajax updater object, run it with some various 
parameters, and then update the result.  The update can be innerHTML or 
JavaScript or (if you feel like it) you could probably handle an XML 
result (I find it easiest to do one of the two former items).  It also has 
an error handler hook that you can use.

HTH.

-- 
William Sutton

[1] http://prototype.conio.net/
[2] http://www.sergiopereira.com/articles/prototype.js.html

On Tue, 19 Dec 2006, rleathers wrote:

> Question for anyone with some ajax knowledge:
> 
>  
> 
> I think we are possibly doing things the hard way here.  It feels like
> someone should have already done what we are trying to do, but if not, then
> I want some advice on turning over what we've done so far so others might
> benefit
> 
>  
> 
> We started building an application last September.  It is written in PHP and
> uses MySQL.  To keep the user interface from being slow to render and too
> crowded to use, we decided to break things into chunks and create multiple
> independent "windows", each with a fairly narrow and obvious purpose.  To
> get the desired results, we started writing our own tag library which we
> named ARIJAX.
> 
>  
> 
> We looked at other libraries (dogo, YUI, AJForm) and found that they merely
> provide the transportation layer but not the communication layer. There are
> many instances of ajax requestor calls ( in fact we're using O'Reily's
> HTTP.js from JavaScript: The Definitive Guide ).
> 
>  
> 
> The problem with those and others that we've looked at is that they don't
> integrate the AJAX communication with the control of the DOM tree.
> 
> Additional javascript code has to be written to interpret the results of the
> Ajax call for each and every communication. Arijax integrates the ajax
> request and communication and is able to properly interpret the response to
> render and display additional HTML attributes. 
> 
>  
> 
> One of the primary issues being faced right now is writing Javascript in a
> browser neutral framework. An "outer" frame-work such as YUI may prove
> helpful. In addition, a more flexible "Verb Subject Information" pairing
> needs to be made instead of the "Verb+Subject Information" as it is now (ie:
> how the data is sent over). 
> 
>  
> 
> Does this make sense?  
> 
> Is anyone aware of a fairly complete library that already does this?  
> 
> Is there a better way than what I've described?
> 
>  
> 
> Thanks,
> 
>  
> 
> Ryan
> 
>  
> 
>  
> 
> 



More information about the TriLUG mailing list