Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
View
Templates to present that data (e.g. HTML for browser)
Front Controller
Include paths
Configurations
Location of MVC components (if necessary)
Logging, db (perhaps), authentication/authorization
Receives exceptions
http://example.com/controller/action/param1/value1...
Controller maps
to class name
Action maps to
method name
Param/value pairs
are passed to
action
http
reques
t
Controller1
action1()
action2()
Bootstrap:
index.php
Front
Controller
Controller2
action1()
action2()
redirects requests
to bootstrap script
(index.php)
2. index.php
instantiates
Front Controller
Action Controller
Action Controller
Controller classes handle groups of request URLs
http://example.com/controller/action
Default: IndexController
Organizes and groups functionality
One class (extending Zend_Controller_Action) for each controller
requests
http://example.com/controller/action
Default: indexAction()
Named like actionAction()
Utility methods
Controller example
Action helpers
They extendZend_Controller_Action_Helper_Abstract
ActionStack
AjaxContext
AutoComplete: Dojo, Scriptaculous
ContextSwitch
FlashMessenger
Json
Redirector
Url
ViewRenderer
Placein the "My/Helper/" directory of your library (or any directory on your
includepath)
Questions?
Send me your thoughts: kamlesh@apextgi.com