I didn't bother with any JS integration and I never mix JavaScript with PHP. I have a view helper to load required .js files and another to trigger onload events. All event handlers are attached in js using jQuery and no code is ever generated. I think it's just simpler, cleaner and doesn't limit me in any way. If you have similar concerns then you're not alone and I suggest you follow your instinct :)
Karol sprynmr wrote: > > 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. > > Am I totally off base? > Robert > -- View this message in context: http://www.nabble.com/Is-javascript-framework-integration-into-ZF-really-that-beneficial--tp21298769p21300879.html Sent from the Zend Framework mailing list archive at Nabble.com.
