Alex Tech Adventures The webs best tutorials!

jQuery with ZF

E-mail Print PDF
(0 votes, average 0 out of 5)
jQuery works very similar to Zend_Dojo. However, not being in the core library there are some differences that need to be addressed.


Key notes in the presentation:
  • Getting the jQuery javascript library folder to show up in the public folder so that the web browser has access to it.
  • Enabling ZendX_JQuery view helpers.
  • Linking jquery library in the layout on demand.
  • Organizing data using containers and panes.
  • Including individual datum into panes.
  • Capturing a group of data from panes into a container.

Download soarce

Links mentioned:
ZendX_JQuery manual
jQuery UI
jQuery Accordion

Last Updated ( Sunday, 18 October 2009 21:13 )  
Discuss (16 posts)
Re:jQuery with ZF
Oct 19 2009 08:42:11
hmmm, well when I saw a while back that zend had native support for the dojo framework, I went out and had a look at it. I had come from prototype which has no support. I didn't much care for it though- it didn't _look_ nice, both in code and on the page without some work done.

So I went to check out some other frameworks- I looked at mootools and jQuery, and after using them both for a while, I prefer jQuery to anything else.

Therefore I am happy to see that it is pretty easy to do the same things in the zend framework with jQuery. Thanks
#113
Re:jQuery with ZF
Nov 01 2009 12:25:57
Do you have a complete working downloadable tutorial? I followed all the steps to create an jquery form... but it won't work... would by nice to have a complete working tutorial so I can find out what went wrong.
#148
Re:jQuery with ZF
Nov 01 2009 12:28:07
All tutorials have a source code archive attached to them. I did not get to jquery forms yet though
#149
Re:jQuery with ZF
Nov 01 2009 13:16:36
I downloaded tutorial 13, only thing is that is isn't working, it is missing a lot of files.... a bit more help would be appreciated!
#150
Re:jQuery with ZF
Nov 01 2009 13:25:56
Checking the file seems alright to me :/
This is my checksum: 8e6d29758fb3071c3552c9c58ea23f02
check if it downloaded properly.
#151
Re:jQuery with ZF
Nov 01 2009 13:35:22
there is only a application directory, no library no public ...
#152
Re:jQuery with ZF
Nov 01 2009 13:40:20
That's all you need- just plug that into a basic project, i.e replace the default application directory with that one ^_^
#153
Re:jQuery with ZF
Nov 01 2009 14:43:36
Ahhhh great I found it...missed a very crucial .... "$this->jQuery()->enable();" somewhere in my phtml....

thnx!
#154
Re:jQuery with ZF
Nov 11 2009 16:07:54
Hi!
Currently I'm experiencing problems with Jquery enabling
I have a bit different configuration and maybe it have influence on my problem.
The error is simple :
Plugin by name 'JQuery' was not found in the registry
My application.ini is:
Code:


includePaths.library = APPLICATION_PATH "/../library"
includePaths.purifier = APPLICATION_PATH "/../library/HTMLPurifier/library"

bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"

resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.defaultControllerName = "main"
resources.frontController.defaultAction = "index"
resources.frontController.defaultModule = "default"
resources.modules = ""

# Layout
resources.view[] = ""
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"

# Views
resources.view.encoding = "UTF-8"
resources.view.basePath = APPLICATION_PATH "/views/"
resources.view.helperPath.Tinymce_View_Helper = APPLICATION_PATH "/../library/Tinymce/View/Helper"
resources.view.helperPath.Ig_View_Helper = APPLICATION_PATH "/../library/Ig/Form/"



And bootstrap looks:
Code:


protected function _initViewHelpers()
__FBTAB__{
__FBTAB____FBTAB__$view = new Zend_View();
__FBTAB____FBTAB__$view->setEncoding('UTF-8');
__FBTAB____FBTAB__$view->doctype('XHTML1_STRICT');
__FBTAB____FBTAB__$view->headTitle('GM');
__FBTAB____FBTAB__$view->env = APPLICATION_ENV;
__FBTAB____FBTAB__$view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8')
__FBTAB____FBTAB__->appendName('keywords', 'Gitaros meistrai');
__FBTAB____FBTAB__$view->addHelperPath("Ig/View/Helper/","Ig_View_Helper_")
                ->addHelperPath("ZendX/JQuery/View/Helper/", "ZendX_JQuery_View_Helper")
__FBTAB____FBTAB__->setHelperPath(APPLICATION_PATH.'/helpers', '');
__FBTAB____FBTAB__ZendX_JQuery::enableView($view);
__FBTAB__    
        /*
      __FBTAB__ $view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
    __FBTAB__ $view->jQuery()->addStylesheet('/js/jquery/css/hot-sneaks/jquery-ui-1.7.2.custom.css')
        ->setLocalPath('/js/jquery/js/jquery-1.3.2.min.js')
        ->setUiLocalPath('/js/jquery/js/jquery-ui-1.7.2.custom.min.js');*/
        
__FBTAB____FBTAB__$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer($view);
__FBTAB____FBTAB__
__FBTAB____FBTAB__$viewRenderer->setView($view);
__FBTAB____FBTAB__
__FBTAB____FBTAB__Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
__FBTAB____FBTAB__
__FBTAB____FBTAB__Zend_Layout::startMvc(
            array(
__FBTAB____FBTAB____FBTAB____FBTAB__'layout' => 'layout',
                'layoutPath' => '/application/views/layouts',
            __FBTAB__'pluginClass' => 'ZFBlog_Layout_Controller_Plugin_Layout'
            )
        );
        
        $view = Zend_Layout::getMvcInstance()->getView();
        
__FBTAB____FBTAB__$this->bootstrap('layout');
__FBTAB____FBTAB__$layout=$this->getResource('layout');
__FBTAB____FBTAB__
__FBTAB____FBTAB__$config=new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation.xml', 'nav');
__FBTAB____FBTAB__$navigation=new Zend_Navigation($config);
__FBTAB____FBTAB__
__FBTAB____FBTAB__$view->navigation($navigation)->setAcl($this->_acl)->setRole(Zend_Registry::get('role')); 
__FBTAB____FBTAB__
__FBTAB__}


Any ideas?
Thank you!
#166
Re:jQuery with ZF
Nov 12 2009 17:58:09
Do you have zend extra library in include path (either php's include path or inside library directory of your project)?
#169
Re:jQuery with ZF
Nov 12 2009 18:09:33
Yes, I've added ZendX folder into Library.
I noticed, that firstly I must add view helper's directory in application.ini and then repeat it in bootstrap.
Really strange behaviour :/
#170
jQuery with ZF
Nov 17 2009 15:23:35
Hi alex,
first of all, i'd like to thank you for these tutorials, i've already made applications using ZF, but i rally like the way you present things.
This post is just to tell you that th video is not working
Anyway, best wishes for your career in app dev.
#182
jQuery with ZF
Nov 18 2009 08:33:01
All is right now,
Might have been a server problem the vdo is working fine ...
thx
#184
Re:jQuery with ZF
Nov 18 2009 12:04:29
Hehe, good thing i could not find the time to re-upload the video, since it wasn't necessery
Must be a blip.tv glitch
Thanks for noting.
#188
jQuery with ZF
Jan 25 2010 20:11:32
awesome tutorial thanks! zend took the ZendX jquery docs off their doc server do you know how to use the ajaxlink() function to grab data from the page before it sends to a get or post ajax request? i can't figure it out...

ps your rating thing isn't working...
#414
Re:jQuery with ZF
Jan 25 2010 23:37:29
You can find the manual for zendx jquery in the directory /extras/documentation/manual/ where you downloaded the zend-framework to.
#422

You need to login or register to post comments.
Discuss...
You are here: Home Development Zend Framework jQuery with ZF

Statistics

Members : 574
Content : 36
Web Links : 1
Content View Hits : 41026

Who's Online

We have 32 guests online