I may be totally wrong when saying this.. but the ZF integration benefits
with *any js framework* are minimal at best, especially when factoring in
the overhead required (as you mentioned before) and the double training that
would require on robust apps. Don't get me wrong, I am a -huge- fan of ZF,
but I do think the "integration & partnership" with JQuery or any other js
framework would and is more of a PR thing to penetrate users (of JQuery in
this instance) who may not be exposed to ZF before, and to allow developers
not familiar in the JS world to do some of the common things easier.
Just my $.02

Josh Team

On Mon, Jan 5, 2009 at 3:55 PM, Matthew Weier O'Phinney <matt...@zend.com>wrote:

> -- sprynmr <robert.sp...@hivelive.com> wrote
> (on Monday, 05 January 2009, 12:32 PM -0800):
> > I'm still learning more about the javascript integration through the
> > jquery xtra shipped with 1.7, but when I look at all the hoops you
> > have to jump through to do some basic things with javascript in the
> > "Zend" way... I just get the feeling its more trouble than its worth.
> >
> > The jquery plugin viewhelpers are nice... but do I really want my
> > javascript that tied in to my php? And for that matter do I want to
> > write a new view helper for every jquery plugin I develop (or use?) It
> > seems like its handicapping you a little bit, or at the very least
> > forcing you to do quite a bit of extra work to do anything advanced.
> >
> > I think I might go the way of dynamic javascript includes... where
> > controllers not only automatically render their associated view (via
> > name matching), but also include their associated javascript. This
> > would be great for javascript instantiation. Then you could also have
> > a library of reusable js that can be dynamically included via the
> > various classes you use in your view (identified by their matching
> > name).
> >
> > It really seems this jquery/zend integration is quite the opposite of
> > the jquery motto... write less, do more.
>
> Caveat: I'm not a jquery user, though I did review and provide feedback
> to Ben as he wrote the integration.
>
> With Dojo, at least, there are some clear benefits: Dojo is modular, and
> the view helpers and form elements help ensure that the appropriate
> dojo.require statements are created. This will help in the future, too,
> as we create functionality to create on-the-fly layer scripts for use
> with dojo. This is similiar to the iea of dynamic javascript includes
> you reference (as is the dojo.require functionality, actually).
>
> However, there's one place where it could be cleaner, and you touched on
> it with the jquery support: what about when you want to use a UI element
> that does not currently have a helper associated with it? Perhaps a
> generic helper that provides some basic scaffolding would help.
>
> That said, probably the most benefits to JS/ZF integration come when
> *prototyping*. I've found that as I've worked on the pastebin and bug
> demos that the integration helps get an initial UI ready, but that after
> I get the basics hammered out, I move it all to dedicated JS layers.
>
> The two places I tend to *keep* the integration are (1) for the
> scaffolding (generating the script and style tags and dynamic includes),
> and (2) forms (this is where integration shines, as you can have the UI
> defined in the same place you're defining the rules). Otherwise, I think
> you're correct -- such integration can only take you so far before it's
> more cumbersome than simply using the appropriate JS framework.
>
> --
> Matthew Weier O'Phinney
> Software Architect       | matt...@zend.com
> Zend Framework           | http://framework.zend.com/
>

Reply via email to