Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MVC with Zend Framework

8,506 views

Published on

A 5 min presentation about the implementation of the MVC pattern in Zend Framework.

Published in: Technology, Education
  • Be the first to comment

MVC with Zend Framework

  1. 1. MVC with Mario Volke
  2. 2. What is ? • Popular PHP Framework • Component Library • Application Framework • Open-source (New BSD License) • High unit-test coverage • Main goals • Flexibility • Extensibility • Simplicity • Productivity
  3. 3. Patterns related to MVC • Zend_M...? • Models can be very different: DB, WebService, Feeds,... • But: • Zend_Db (Adapter pattern) • Zend_Service • Zend_Feed • etc. • Zend_Crontroller • Front Controller pattern • Zend_Controller_Action •action methods correspond to the various actions you wish the controller to handle • Zend_View • template system agnostic • Zend_Layout implements Two Step View pattern
  4. 4. Structure
  5. 5. Behaviour
  6. 6. Sample Code index.php require_once 'Zend/Application.php'; // Create application, bootstrap, and run $application = new Zend_Application(); $application->bootstrap()->run(); HelloController.php class HelloController extends Zend_Controller_Action { public function worldAction() { } } world.php <html> <head><title>Hello World!</title></head> <body> <h1>Hello World!</h1> </body> </html> -> http://example.com/hello/world
  7. 7. Further info Introduction • http://framework.zend.com/docs/quickstart Reference • http://framework.zend.com/manual/en/ Webinars • http://www.zend.com/en/resources/webinars/framework </talk>

×