[TYPO3-ect] AJAX: serverside logic vs. clientside logic
Michael Scharkow
michael at underused.org
Fri Sep 15 08:42:27 CEST 2006
Hi Elmar,
a few hints about prototype and xajax as I understand it:
1. Scope: prototype is a generic JS library that happens to have AJAX
functions as well as DOM manipulation, etc. It is meant to be included
and then used by a (minimal) JS of your own. xajax generates custom code
for every AJAX function call and makes sure it gets the correct data.
NEITHER of them do any fancy effects on their own! What you seem to have
in mind is rico or scriptaculous that work on top of prototype.
2. Client vs. Server: Prototype offers elegant shortcuts for iterating
over arrays etc. if you need to do more than just AJAX->innerHTML You
don't have to use it, and the AJAX part works just as well as any other
JS lib. Prototype does not encourage you to do much client-side logic,
but it makes it less pain if you need to do it.
Nobody wants to put essential stuff like validation into client-side
code, and you should really have a look at prototype to get an idea what
it actually provides.
My take: prototype.js has a superset of features of xajax, is
well-supported, has add-ons for eye-candy. xajax may be nice if you
don't want to bother with JS, and need only a little AJAX, but I don't
like to use code-generators (Rails has RJS which is very similar) and I
don't like to make my controllers/views instances of some xajax class.
Cheers,
Michael
More information about the TYPO3-team-extension-coordination
mailing list