Vincent Cohen
Vincent Cohen

Reputation: 878

Zend Framework dispatching frontcontroller or run Zend Application?

Recently I started out with developing in Zend Framework. I am using Zend Framework 1.11 since 2.0 is still in development and I can find more information on 1.11.

I have followed multiple tutorials and am trying to combine them for a project I am working on.

The thing is, and I just dont quite understand this. In the one tutorial the bootstrap file initialises Zend_Application and then bootstraps it and then runs this.

The other tutorial I was following is using Zend_Layout with MVC and dispatches the Frontcontroller.

What is the best practice for this? I need to use Zend_Layout and dispatching this and running the Frontcontroller/Zend_application gives me the exact same result.

I tried looking for the correct anwser but I cant find it..

Thanks in Advance

Upvotes: 0

Views: 549

Answers (2)

Bartosz Grzybowski
Bartosz Grzybowski

Reputation: 1179

Zend_Application, ofcourse You can easily dispatch from the Frontcontroller, but it's the old way of dispatching ZF based apps.

Zend_Application was added later, and now it's best way to dispatch Your App 'coz of bootstrap & its resources :) You still can use frontcontroller's plugins etc.

Zend_Tool can create project for You and enable the layout. You can do it all from config file, thanks to Zend_Application :)

Upvotes: 2

WayneC
WayneC

Reputation: 5740

Your best bet is using Zend_Application. You can configure your layout in your config file.

resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"

Here is a good tutorial to look at

Upvotes: 0

Related Questions