Thursday, March 10, 2011

Second life of ZendX JQuery

Benjamin Eberlei - the maintainer of jQuery component for Zend Framework 1.0 discontinues his maintenance of this component for Zend Framework 2.0

"2 years ago I was pretty sure of the Dojo and jQuery components/integration into ZF. I have since changed my mind radically. I do maintained the jQuery component but I would suggest to drop it for 2.0..." - he said.

The main reasons are:

  • It takes more time to write PHP code than jQuery itself.
  • It doesn't let you to reuse JavaScript code, for example by creating your own jQuery plug-in.
  • Its harder to deal with front-end designers that are familiar with JavaScript rather than PHP.
  • Writing of PHP code that generates required JavaScript code is a bad idea in general :)

Benjamin's message started the hot discussion on the contributors mailing-list and IRC channel on Freenode.

Here are some pros to continue maintenance of ZendX_JQuery highlighted from  discussions:

  • The ability to dynamically enable/disable jQuery for some specific pages.
  • It simplifies the usage of jQuery UI with Zend_Form form elements (auto-complete, date picker) and AJAX form validation.
  • Please don't drop JQuery support from Zend Framework!!!11 :)

The Project Lead of Zend Framework Matthew Weier O'Phinney said:

"...If you talk to experienced front-end and UI/UX designers,
you'll find that they prefer having plain old semantic HTML served to
them. They will then write JS and CSS to work with that HTML in order to
deliver the final UI.

As such, the various head*() and inline view helpers probably provide
the most value. Any JS integration we have will typically be more
relevant for prototyping or simple sites that do not have many UI needs...

And finally I want to finish this post with the words of Ralph Schindler, member of ZF core development team:

"There is a strong use case for keeping Zend_Jquery in the small-project  / sprinkle some Javascript in / just-get-it-done use cases.  That said,  it makes sense to evaluate this again after MVC and forms are done in 2.0.  I am sure we'll have no problem finding someone who loves Jquery enough  to give this component some attention should the community decide to  keep it around."

My own opinion, like it was already mentioned by other participants, is to look at the jQuery integration in ASP.NET MVC3 and move this component development in that direction.

In case you love jQuery enough to bring a second life for its component within Zend Framework feel free to express that for community and take the responsibility of maintenance.