Seva at Eclipse

Seva Lapsha working on Eclipse PDT project

Integration of Zend Framework and Prototype Ajax

Last two days I’ve worked on implementing an example of integration of Zend Framework’s MVC and Prototype’s Ajax for HTML Forms submission and validation.

The solution consist of 2 parts:

1. There is a new View Helper to create an Ajax-enabled form.

This part mostly consists of JavaScript code, which alters default HTML Form behavior to submit the input element values to the action’s URL with Ajax, if form’s method is set to ‘ajax’.

In addition the form itself listens to submission result events and (by default) marks input elements if they are invalid.

2. There is a new customized abstract base Controller which replaces default ViewRenderer with a new one, which:

a) detects whether the request was received from Ajax.
b) if true, will not render the view, but instead will output with the input validation information, if either.

Well, the development is not really over yet, but what I originally wanted to say is I’ve just realized how I miss writing good old JS. :)

By the way, I need to repeat [ad:start] how happy I am to have PHP, HTML and JavaScript editors in one powerful standardized environment (Eclipse) - what I never had in the past, before PDT, WST & ATF came to the picture [ad:end] :)).

Posted October 29th, 2007 by Seva Lapsha in category: ajax, form, html, integration, javascript, php, prototype, zend framework
You can leave a response, or trackback from your own site.

2 Responses to “Integration of Zend Framework and Prototype Ajax”


  1. gare Says:

    hi - Thanks for posting this article at
    http://sevalapsha.wordpress.com/2007/10/29/integration-of-zend-framework-and-prototype-ajax/

    Are you going to post your example?

    Seva: no


  2. SneakyWho_am_i Says:

    lol, yeah, I came looking for an example too. Mostly interested in view helpers and renderers for it. I was excited by dojo til I realised it invalidated my markup. Yuck.

    I guess I can reach the result I want by reverse engineering the dojo bits, just rewiring them to spit out yui-compatible or prototype-compatible goodies.

    Thanks for inspiring some hope that it can be done, though :)

Leave a Reply

You must be logged in using your Eclipse Bugzilla account to post a comment.

Recent Posts

Archives

Categories

Meta