MVC with Zend Framework

8,220 views

Published on

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

Published in: Technology, Education
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
8,220
On SlideShare
0
From Embeds
0
Number of Embeds
402
Actions
Shares
0
Downloads
0
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

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>

×