Hi everyone,

I feel compelled to trot out my essay from last year on this subject.  It
has some concepts that apply to this discussion.

http://www.builtfromsource.com/2006/12/20/does-ajax-have-a-place-in-the-application-framework/

Handling an Ajax request is just like handling any other type of request,
and Zend_Controller_Request_Http even provides an isXmlHttpRequest()
method that's compatible "out of the box" with Prototype, jQuery, and YUI.
 And with one line of JavaScript you get that same functionality with Dojo
and MooTools.

But pairing Zend Framework with a specific JavaScript library is a bad
idea, and frankly I'm unconvinced that projects like Xajax are a net gain.
 There are so many good JavaScript-only frameworks out there
already--Prototype, jQuery, etc.--that make Ajax ridiculously simple. 
Really, it was never that difficult in the first place.  In trying to
"simplify" it by making the API PHP-only it will only complicate things
more.

-Matt

On Mon, December 3, 2007 5:09 pm, Mark Maynereid wrote:
>
> Thank you for those answers Matthew. Very encouraging. I look forward to
> the
> proposal unification keenly. Hopefully there is a good appetite for
> nailing
> this one given all the great work so far, and the features you have listed
> below are certainly what I would hope for. Perhaps they are in order of
> priority too?
>
> I see you mention AJAX for client side validation, and note others have
> commented on ZF/AJAX concerns in general. I imagine trying to deliver a
> decent quality AJAX library from scratch now would be daunting. Yet AJAX
> is
> expected these days so perhaps third party libraries are inevitable here
> (for now).
>
> Also personally, I do not particularly enjoy having to write code twice
> (first to write server side validation in PHP, and then have to write the
> code yet again in Javascript for client side validation). Then have to
> keep
> it in sync and maintain a doubled up codebase. My JS is weak anyway.
>
> Wouldn't it be cleaner to hand off the whole AJAX thing so we can treat it
> like a black box and control it purely from PHP? Those that want to are
> then
> freed from Javascript coding entirely, and as a massive bonus, the server
> side validation code potentially becomes common to the client side
> validation code! Codebase duplication eliminated :)  While trawling the
> XJAX
> libraries I came across the xajax project which appears to do precisely
> this:
>
> Here's a quick 10 minute overview:
> http://www.xajaxproject.org/docs/xajax-in-10-minutes.php
>
> I have played with xajax a little and if it is as good as it appears, I
> would love to see provision for it in ZF. My hunch is it could also prove
> the easiest and tidiest of all ZF AJAX solutions to roll out first
> precisely
> because of its apparently unique 100% PHP API. Any good?
>
>
> Regards,
> Mark

Reply via email to