SlideShare a Scribd company logo
1 of 6
Download to read offline
Zend Framework Basic Request Workflow Chart
                                                                                                                                           V 1.0, Created by Polley Wong
End User’s
 Browser




                       Request for a
                          page




                            URL
   public/index.php




                          Requires

                        application/
                       bootstrap.php
bootstrap.php




                                                                                       Register Custom Plugin
 application/




                                                                                          Initializer that runs
                                                                                         $this->initDb();
                                                                                                                                                       Runs
                                                                   Pass in
                      Configure include   Prepares Front                                 $this->initHelpers();       Pass in Optional Custom
                                                                 Environment
                            paths           Controller                                   $this->initView();           Request & Response
                                                                                                                                                  Front Controller
                                                           (development/staging/...)     $this->initPlugins();                Object
                                                                                                                                                     Dispatch
                                                                                         $this->initRoutes();
                                                                                         $this->initControllers();
Runs


Front Controller Dispatch Workflow Chart                                                                 Front Controller
                                                                                                            Dispatch
                                                                                                                                                                  V 1.0, Created by Polley Wong
 Front Controller




                                                                       Register
                      Instantiate            Instantiate            Request Object          Notify                                                  Notify
                    Default Request            Default                    and           Plugin Broker                                           Plugin Broker
                                                                                                                            Start Routing
                     Object if none      Response Object           Response Object            of                                                      of
                       provided          if none provided                 with          Router Startup                                        Router Completion
                                                                     Plugin Broker


                                                            No
                                                                                                                                                          No
 Plugin Broker




                                                                                                                                            More Plugins with
                       More Plugins with              Run Plugin’s                                                                                                         Run Plugin’s
                                              Yes                                                                                           routeShutdown()       Yes
                    routeStartup() method?           routeStartup()                                                                                                      routeShutdown()
                                                                                                                                                method?




                    Find a matching                                                Inject
                                               Extract Module,
 Router




                      route to the                                                returning
                                              Controller, Action
                        current                                                values to the
                                              and Parameters
                      PATH_INFO                                               Request Object
Runs


Front Controller Dispatch Workflow Chart                                                                 Front Controller
                                                                                                            Dispatch
                                                                                                                                                                   V 1.0, Created by Polley Wong

                                                                                                                                            Routing Process
 Front Controller




                                                                       Register
                      Instantiate            Instantiate            Request Object          Notify                                                   Notify
                    Default Request            Default                    and           Plugin Broker                                            Plugin Broker
                                                                                                                            Start Routing
                     Object if none      Response Object           Response Object            of                                                       of
                       provided          if none provided                 with          Router Startup                                         Router Completion                             cont.
                                                                     Plugin Broker


                                                            No
                                                                                                                                                          No
 Plugin Broker




                                                                                                                                             More Plugins with
                       More Plugins with              Run Plugin’s                                                                                                          Run Plugin’s
                                              Yes                                                                                            routeShutdown()       Yes
                    routeStartup() method?           routeStartup()                                                                                                       routeShutdown()
                                                                                                                                                 method?




                    Find a matching                                                 Inject
                                               Extract Module,
 Router




                      route to the                                                 returning
                                              Controller, Action
                        current                                                values to the
                                              and Parameters
                      PATH_INFO                                               Request Object
Front Controller Dispatch Workflow Chart
                                                                                                                                                                                      V 1.0, Created by Polley Wong

                                                                                                                               Yes

                                                                                                 Replace current Action
                                                       Replace current Action                             OR                                    Skip current action
 Front Controller




                                                                                                  Skip current action


                                                                                                                                                                 postDispatch Process
                    preDispatch Process
                                                                                                         Yes


                              Notify                    Set                     Notify                                                                                   Notify
                                                                                                         Did any                                 Action                                           Did any
                          Plugin Broker          Request Object'’s          Plugin Broker                                      Request Object                         Plugin Broker
                cont.                                                                             preDispatch() reset                           Controller                                 postDispatch() reset
                                of              “isDispatched Flag”               of                                      No:      and                                      of
                                                                                                  “isDispatched Flag”                           Dispatch                                   “isDispatched Flag”
                          Dispatch Loop                  to                   Dispatch                                        Response Object                           Dispatch
                                                                                                       to FALSE?                                Process                                         to FALSE?
                             Startup                   TRUE                    Startup                                                                                 Completion
                                                                                                                                                                                                                  cont.

                                                                                            No
                              Request
                                                                                                                                                                        Request
                               Object No                                        Request
                                                                                                                                                                         Object No
                                                                                 Object
 Plugin Broker




                          More Plugins with                                       More Plugins with                                                                    More Plugins with
                                                            Run Plugin’s                                       Run Plugin’s                                                                            Run Plugin’s
                        dispatchLoopStartup()   Yes                                preDispatch()        Yes                                                             postDispatch()        Yes
                                                       dispatchLoopStartup()                                   preDispatch()                                                                          postDispatch()
                               method?                                                method?                                                                             method?
Front Controller Dispatch Workflow Chart
                                                                                                                                                                                                                       V 1.0, Created by Polley Wong


                                                                                                                                                       Yes

                                                                                                                     Replace current Action
                                                                         Replace current Action                               OR                                                 Skip current action
                                                                                                                      Skip current action
    Front Controller




                                                                                                                                                                                                    postDispatch Process
                                preDispatch Process
                                                                                                                              Yes


                                           Notify                         Set                     Notify                                                                                                   Notify
                                                                                                                             Did any                                              Action                                               Did any
                                       Plugin Broker               Request Object'’s          Plugin Broker                                                                                            Plugin Broker
                                                                                                                                                        Request Object
                            cont.                                                                                      preDispatch() reset                                      Controller                                       postDispatch() reset
                                             of                   “isDispatched Flag”               of                                             No:      and                                              of
                                                                                                                       “isDispatched Flag”                                      Dispatch                                         “isDispatched Flag”
                                       Dispatch Loop                       to                   Dispatch                                               Response Object                                   Dispatch
                                                                                                                           to FALSE?                                             Process                                             to FALSE?
                                          Startup                        TRUE                    Startup                                                                                                Completion
                                                                                                                                                                                                                                                        cont.

                                                                                                              No
                                            Request
                                                                                                                                                                                                         Request
                                             Object No                                             Request
                                                                                                                                                                                                          Object No
                                                                                                    Object
    Plugin Broker




                                      More Plugins with                                              More Plugins with                                                                                  More Plugins with
                                                                              Run Plugin’s                                          Run Plugin’s                                                                                             Run Plugin’s
                                    dispatchLoopStartup()         Yes                                 preDispatch()         Yes                                                                          postDispatch()             Yes
                                                                         dispatchLoopStartup()                                      preDispatch()                                                                                           postDispatch()
                                           method?                                                      method?                                                                                             method?
    Controller Dispatcher




                                                                                                                                                                                                   FALSE                           Append buffered
                                                                                                                                                                                                                                     content into
                                                                                                                                                                                                                                  Response Object’s
                                                                                                                                                                            Call
                                                                                    Set                                                                                                                                      TRUE       body
                                                                                                                                                                    Action Controller’s
                                                          Rretrieve                                         Is parameter                                                                              Is parameter
                                                                             Request Object'’s
                                      Load
                                                                                                                                                                    dispatch() method
                                                        Action Method                                  disableOutputBuffering                   output buffer                                    disableOutputBuffering
                                                                            “isDispatched Flag”
                                    Controller                                                                                      TRUE
                                                                                                                                                                        (Passes the
                                                         Name from                                         TRUE (default)                           start                                            TRUE (default)
                                                                                     to
                                    class file
                                                                                                                                                                     Name of Action
                                                        Request Object                                       or FALSE?                                                                                 or FALSE?
                                                                                   TRUE                                                                                                                                                  Destroy Action
                                                                                                                                                                      to the method)
                                                                                                                                       FALSE                                                                                            Controller Object
 Controller




                                                                  Register                             Notify                                                 Is                                                                             Notify
  Action




                                                                                                                                 Run                                                                              Run
                                    Initialize Action         Action Controller                    Helper Broker                                        “isDispatched               Call of the                                          Helper Broker
                                                                                                                          Action Controller’s                                                              Action Controller’s
                                     Helper Broker                  with                                 of                                                Flag” ==               Action Method                                                of
                                                                                                                            preDispatch()                                                                   postDispatch()
                                                               Helper Broker                      Dispatch Startup                                         TRUE?                                                                      Dispatch Completion

                                                                                                                                                                                                                         No
                                                            No
 Action Helper




                                                                                                                              No

                                                                                                   Run
    Broker




                                                                          Run                                      More Helpers with                                                         More Helpers with
                                    More helper in                                           init() method                                          Run Helper’s                                                                  Run Helper’s
                                                                  setActionController()                             preDispatch()
                                                           Yes                                                                           Yes                                                  postDispatch()           Yes
                                       stack?                                                       in                                              preDispatch()                                                                postDispatch()
                                                                    method in helper                                   method?                                                                   method?
                                                                                                 helper
Front Controller Dispatch Workflow Chart
                                                                                                                                V 1.0, Created by Polley Wong




                                                               Return the
                                                             Response Object
  Front Controller




                                                                   Yes


                                    Notify
                                Plugin Broker
                                                            Is “returnResponse”
                                      of                                              sendResponse()
                                                             Flag set to TRUE?
                                Dispatch Loop
                     cont.
                                 Completion


                                   Request
                                    Object No
  Plugin Broker




                                 More Plugins with
                                                                   Run Plugin’s
                             dispatchLoopShutdown()   Yes
                                                             dispatchLoopShutdown()
                                     method?




                         postDispatch Process (cont.)
  Response Object




                                                                                                            Output Body
                                                                                      Send Headers
                                                                                                          (echo $content)
End User’s
 Browser




                                                                                                       Waiting for User Input

More Related Content

Similar to Zend Framework Request Workflow

Reusable bootstrap resources zend con 2010
Reusable bootstrap resources   zend con 2010Reusable bootstrap resources   zend con 2010
Reusable bootstrap resources zend con 2010Hector Virgen
 
How to customize Spring Boot?
How to customize Spring Boot?How to customize Spring Boot?
How to customize Spring Boot?GilWon Oh
 
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0Frost
 
Testing of javacript
Testing of javacriptTesting of javacript
Testing of javacriptLei Kang
 
Introduction to Struts
Introduction to StrutsIntroduction to Struts
Introduction to Strutselliando dias
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introductionJonathan Holloway
 
The Google App Engine Oil Framework
The Google App Engine Oil FrameworkThe Google App Engine Oil Framework
The Google App Engine Oil FrameworkEric ShangKuan
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudCarlos Sanchez
 
Developer Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for BeginnersDeveloper Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for BeginnersJiaxuan Lin
 
Reactive programming with tracker
Reactive programming with trackerReactive programming with tracker
Reactive programming with trackerDesignveloper
 
TYPO3 Flow 2.0 (T3CON13 San Francisco)
TYPO3 Flow 2.0 (T3CON13 San Francisco)TYPO3 Flow 2.0 (T3CON13 San Francisco)
TYPO3 Flow 2.0 (T3CON13 San Francisco)Robert Lemke
 
Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...
Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...
Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...Gosuke Miyashita
 
Android the Agile way
Android the Agile wayAndroid the Agile way
Android the Agile wayAshwin Raghav
 
SCWCD 2. servlet req - resp (cap3 - cap4)
SCWCD 2. servlet   req - resp (cap3 - cap4)SCWCD 2. servlet   req - resp (cap3 - cap4)
SCWCD 2. servlet req - resp (cap3 - cap4)Francesco Ierna
 
Oracle Release 12 E-Business Suite Patching Best Practices
Oracle Release 12 E-Business Suite Patching Best PracticesOracle Release 12 E-Business Suite Patching Best Practices
Oracle Release 12 E-Business Suite Patching Best PracticesScott Jenner
 
Seven Peaks Speaks - Compose Screenshot Testing Made Easy
Seven Peaks Speaks - Compose Screenshot Testing Made EasySeven Peaks Speaks - Compose Screenshot Testing Made Easy
Seven Peaks Speaks - Compose Screenshot Testing Made EasySeven Peaks Speaks
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet Sagar Nakul
 

Similar to Zend Framework Request Workflow (20)

Reusable bootstrap resources zend con 2010
Reusable bootstrap resources   zend con 2010Reusable bootstrap resources   zend con 2010
Reusable bootstrap resources zend con 2010
 
How to customize Spring Boot?
How to customize Spring Boot?How to customize Spring Boot?
How to customize Spring Boot?
 
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
 
Maven
MavenMaven
Maven
 
Testing of javacript
Testing of javacriptTesting of javacript
Testing of javacript
 
Introduction to Struts
Introduction to StrutsIntroduction to Struts
Introduction to Struts
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
 
The Google App Engine Oil Framework
The Google App Engine Oil FrameworkThe Google App Engine Oil Framework
The Google App Engine Oil Framework
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The Cloud
 
Php unit (eng)
Php unit (eng)Php unit (eng)
Php unit (eng)
 
Developer Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for BeginnersDeveloper Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for Beginners
 
Reactive programming with tracker
Reactive programming with trackerReactive programming with tracker
Reactive programming with tracker
 
TYPO3 Flow 2.0 (T3CON13 San Francisco)
TYPO3 Flow 2.0 (T3CON13 San Francisco)TYPO3 Flow 2.0 (T3CON13 San Francisco)
TYPO3 Flow 2.0 (T3CON13 San Francisco)
 
Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...
Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...
Yapc::Asia 2008 Tokyo - Easy system administration programming with a framewo...
 
Android the Agile way
Android the Agile wayAndroid the Agile way
Android the Agile way
 
SCWCD 2. servlet req - resp (cap3 - cap4)
SCWCD 2. servlet   req - resp (cap3 - cap4)SCWCD 2. servlet   req - resp (cap3 - cap4)
SCWCD 2. servlet req - resp (cap3 - cap4)
 
Oracle Release 12 E-Business Suite Patching Best Practices
Oracle Release 12 E-Business Suite Patching Best PracticesOracle Release 12 E-Business Suite Patching Best Practices
Oracle Release 12 E-Business Suite Patching Best Practices
 
Seven Peaks Speaks - Compose Screenshot Testing Made Easy
Seven Peaks Speaks - Compose Screenshot Testing Made EasySeven Peaks Speaks - Compose Screenshot Testing Made Easy
Seven Peaks Speaks - Compose Screenshot Testing Made Easy
 
Struts,Jsp,Servlet
Struts,Jsp,ServletStruts,Jsp,Servlet
Struts,Jsp,Servlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 

Recently uploaded

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Recently uploaded (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Zend Framework Request Workflow

  • 1. Zend Framework Basic Request Workflow Chart V 1.0, Created by Polley Wong End User’s Browser Request for a page URL public/index.php Requires application/ bootstrap.php bootstrap.php Register Custom Plugin application/ Initializer that runs $this->initDb(); Runs Pass in Configure include Prepares Front $this->initHelpers(); Pass in Optional Custom Environment paths Controller $this->initView(); Request & Response Front Controller (development/staging/...) $this->initPlugins(); Object Dispatch $this->initRoutes(); $this->initControllers();
  • 2. Runs Front Controller Dispatch Workflow Chart Front Controller Dispatch V 1.0, Created by Polley Wong Front Controller Register Instantiate Instantiate Request Object Notify Notify Default Request Default and Plugin Broker Plugin Broker Start Routing Object if none Response Object Response Object of of provided if none provided with Router Startup Router Completion Plugin Broker No No Plugin Broker More Plugins with More Plugins with Run Plugin’s Run Plugin’s Yes routeShutdown() Yes routeStartup() method? routeStartup() routeShutdown() method? Find a matching Inject Extract Module, Router route to the returning Controller, Action current values to the and Parameters PATH_INFO Request Object
  • 3. Runs Front Controller Dispatch Workflow Chart Front Controller Dispatch V 1.0, Created by Polley Wong Routing Process Front Controller Register Instantiate Instantiate Request Object Notify Notify Default Request Default and Plugin Broker Plugin Broker Start Routing Object if none Response Object Response Object of of provided if none provided with Router Startup Router Completion cont. Plugin Broker No No Plugin Broker More Plugins with More Plugins with Run Plugin’s Run Plugin’s Yes routeShutdown() Yes routeStartup() method? routeStartup() routeShutdown() method? Find a matching Inject Extract Module, Router route to the returning Controller, Action current values to the and Parameters PATH_INFO Request Object
  • 4. Front Controller Dispatch Workflow Chart V 1.0, Created by Polley Wong Yes Replace current Action Replace current Action OR Skip current action Front Controller Skip current action postDispatch Process preDispatch Process Yes Notify Set Notify Notify Did any Action Did any Plugin Broker Request Object'’s Plugin Broker Request Object Plugin Broker cont. preDispatch() reset Controller postDispatch() reset of “isDispatched Flag” of No: and of “isDispatched Flag” Dispatch “isDispatched Flag” Dispatch Loop to Dispatch Response Object Dispatch to FALSE? Process to FALSE? Startup TRUE Startup Completion cont. No Request Request Object No Request Object No Object Plugin Broker More Plugins with More Plugins with More Plugins with Run Plugin’s Run Plugin’s Run Plugin’s dispatchLoopStartup() Yes preDispatch() Yes postDispatch() Yes dispatchLoopStartup() preDispatch() postDispatch() method? method? method?
  • 5. Front Controller Dispatch Workflow Chart V 1.0, Created by Polley Wong Yes Replace current Action Replace current Action OR Skip current action Skip current action Front Controller postDispatch Process preDispatch Process Yes Notify Set Notify Notify Did any Action Did any Plugin Broker Request Object'’s Plugin Broker Plugin Broker Request Object cont. preDispatch() reset Controller postDispatch() reset of “isDispatched Flag” of No: and of “isDispatched Flag” Dispatch “isDispatched Flag” Dispatch Loop to Dispatch Response Object Dispatch to FALSE? Process to FALSE? Startup TRUE Startup Completion cont. No Request Request Object No Request Object No Object Plugin Broker More Plugins with More Plugins with More Plugins with Run Plugin’s Run Plugin’s Run Plugin’s dispatchLoopStartup() Yes preDispatch() Yes postDispatch() Yes dispatchLoopStartup() preDispatch() postDispatch() method? method? method? Controller Dispatcher FALSE Append buffered content into Response Object’s Call Set TRUE body Action Controller’s Rretrieve Is parameter Is parameter Request Object'’s Load dispatch() method Action Method disableOutputBuffering output buffer disableOutputBuffering “isDispatched Flag” Controller TRUE (Passes the Name from TRUE (default) start TRUE (default) to class file Name of Action Request Object or FALSE? or FALSE? TRUE Destroy Action to the method) FALSE Controller Object Controller Register Notify Is Notify Action Run Run Initialize Action Action Controller Helper Broker “isDispatched Call of the Helper Broker Action Controller’s Action Controller’s Helper Broker with of Flag” == Action Method of preDispatch() postDispatch() Helper Broker Dispatch Startup TRUE? Dispatch Completion No No Action Helper No Run Broker Run More Helpers with More Helpers with More helper in init() method Run Helper’s Run Helper’s setActionController() preDispatch() Yes Yes postDispatch() Yes stack? in preDispatch() postDispatch() method in helper method? method? helper
  • 6. Front Controller Dispatch Workflow Chart V 1.0, Created by Polley Wong Return the Response Object Front Controller Yes Notify Plugin Broker Is “returnResponse” of sendResponse() Flag set to TRUE? Dispatch Loop cont. Completion Request Object No Plugin Broker More Plugins with Run Plugin’s dispatchLoopShutdown() Yes dispatchLoopShutdown() method? postDispatch Process (cont.) Response Object Output Body Send Headers (echo $content) End User’s Browser Waiting for User Input