SlideShare a Scribd company logo
Php.MVC  InfoStretch Solutions Pvt. Ltd Prepared By Niranjan Limbachiya   Nimesh Chauhan
Overview Introduction The Benefits The MVC pattern Concepts The Web-server Directory structure Core components of Php.MVC Library XML Application Configuration System Controller The Action Form & Action Security View Resources
Introduction php.MVC  is a  M odel  V iew  C ontroller  (MVC)  framework for PHP Web applications The use of this design philosophy makes it easier for designers and programmers to focus on their respective areas of expertise This design model allows Web pages or other contents (Views) to be separated from the applications business logic, or code (Model) php.MVC is a PHP port of the  Jakarta Struts  project.
Introduction
The Benefits php.MVC is a PHP port of the  Jakarta Struts  project Enforces modularity and application partitioning Increases developer/designer role separation Increases code manageability Increase code extensibility (Ability to adapt to change)
The MVC Pattern Concepts We can see the how a typical HTTP request from a Web client (Web browser) would interact with the core framework classes and our application classes, to produce a HTTP response (Web content) to return to the Web client.
Contd.. To start the process, a client would send our  php.MVC application a request  perhaps a request to view a particular company sales report  http://www.myhost.com/mycompany/Main.php?do=salesReport
Web server Directory Structure
MVC Libraries .htaccess control who can access this directory  art  directory  Is used to hold the application graphics, and will be accessible to  the Web style  directory  is used to hold the application style sheets and will also be  accessible to the Web /WEB-INF  directory This is where we locate the application classes and resources.
Contd.. The  tpl  directory holds the applications  View  resources, such as page ModulePaths.php  file  Is used to define the application specific paths to our classes and resources phpmvc-config.xml  file  Is the central component of the php.MVC application. phpmvc-config_1_1.dtd  file  Contains the Document Type Definitions (DTD) for the  phpmvc-config.xml  file prepend.php  file is used to include application files Main.php  file  is the single entry point for an application, and is located in the application root directory
Core component of MVC The XML configuration file is the "switchboard" of a php.MVC application. This is how we bind the various components to a HTTP request  path The Controller consists of the php.MVC framework classes that are responsible for routing HTTP requests to the correct Form and Action classes and View resources, as defined in the application  phpmvc-config.xml  file. The Action Form classes can be used to handle Web form checks and validation The Action classes are used to access our business classes. We can direct the application  flow to resources based on run-time conditions The Action Dispatcher class handles the resource (template) processing
XML Application configuration system
Example
Controller The Controller component of the php.MVC framework consists of classes that handle a users request according to predefined configuration options A typical user request may look something Like:  http://www.myhost.com/mycompany/Main.php?do=salesReport The php.MVC Controller consists of two distinct sections:  The Front Controller  The Controller proper
Front Controller
The controller
Action Form An ActionForm is represented in the XML Application Configuration like this:  The use of an  ActionForm  for a particular request path is optional, and can be activated in the XML Application Configuration System using the  validate  attribute of the action mapping node like this
Action An  Action  class is represented in the  XML Application Configuration  like this:
Security regular expression (RE) such as  "^[a-z0-9]{8}$"
View Tpl comes into view Action dispatcher
Resources www.phpmvc.net php.MVC on SourceForge
Ad

More Related Content

What's hot (19)

Flows in mule
Flows in muleFlows in mule
Flows in mule
Sindhu VL
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
Prasanna Venkatesh
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
naral
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
Julia Vi
 
Mule reference
Mule referenceMule reference
Mule reference
himajareddys
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
Taranjeet Singh
 
Mule anypoint enterprise security
Mule  anypoint enterprise securityMule  anypoint enterprise security
Mule anypoint enterprise security
D.Rajesh Kumar
 
Mule edifact module
Mule edifact moduleMule edifact module
Mule edifact module
Son Nguyen
 
What is MVC?
What is MVC?What is MVC?
What is MVC?
Dom Cimafranca
 
Mule anypoint b2 b
Mule  anypoint b2 bMule  anypoint b2 b
Mule anypoint b2 b
D.Rajesh Kumar
 
Web tier-framework-mvc
Web tier-framework-mvcWeb tier-framework-mvc
Web tier-framework-mvc
KashfUlHuda1
 
Oracle_EBS
Oracle_EBSOracle_EBS
Oracle_EBS
bmujahid
 
Mvc pattern and implementation in java fair
Mvc   pattern   and implementation   in   java fairMvc   pattern   and implementation   in   java fair
Mvc pattern and implementation in java fair
Tech_MX
 
Jsf 2
Jsf 2Jsf 2
Jsf 2
Ramakrishna kapa
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
Bhavin Shah
 
CloudHub networking guide
CloudHub networking guideCloudHub networking guide
CloudHub networking guide
Shanky Gupta
 
Cake PHP
Cake PHPCake PHP
Cake PHP
Web Communications at Florida International University
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
Anton Krasnoshchok
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architecture
ravindraquicsolv
 

Viewers also liked (11)

1
11
1
Maharashtra Inst. of Tech. kothrud, pune
 
Big table
Big tableBig table
Big table
Adhinarayanan Ramanathan
 
Google Bigtable paper presentation
Google Bigtable paper presentationGoogle Bigtable paper presentation
Google Bigtable paper presentation
vanjakom
 
Innovation Case Study BitTorrent
Innovation Case Study BitTorrentInnovation Case Study BitTorrent
Innovation Case Study BitTorrent
Petter S. Rønning
 
Bigtable
BigtableBigtable
Bigtable
nextlib
 
plastic in road construction
plastic in road constructionplastic in road construction
plastic in road construction
Maharashtra Inst. of Tech. kothrud, pune
 
google Bigtable
google Bigtablegoogle Bigtable
google Bigtable
elliando dias
 
Google Bigtable Paper Presentation
Google Bigtable Paper PresentationGoogle Bigtable Paper Presentation
Google Bigtable Paper Presentation
vanjakom
 
GOOGLE BIGTABLE
GOOGLE BIGTABLEGOOGLE BIGTABLE
GOOGLE BIGTABLE
Tomcy Thankachan
 
Plastic roads
Plastic roadsPlastic roads
Plastic roads
Hema Kandpal
 
Google Big Table
Google Big TableGoogle Big Table
Google Big Table
Omar Al-Sabek
 
Ad

Similar to Php.Mvc Presentation (20)

Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
Er. Kamal Bhusal
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHP
IRJET Journal
 
Model View Controller-Introduction-Overview.pptx
Model View Controller-Introduction-Overview.pptxModel View Controller-Introduction-Overview.pptx
Model View Controller-Introduction-Overview.pptx
MarioCaday2
 
Overview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company indiaOverview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company india
Jignesh Aakoliya
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handson
Prashant Kumar
 
cakephp UDUYKTHA (1)
cakephp UDUYKTHA (1)cakephp UDUYKTHA (1)
cakephp UDUYKTHA (1)
Varsha Krishna
 
Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVC
John Lewis
 
Spring mvc 2.0
Spring mvc 2.0Spring mvc 2.0
Spring mvc 2.0
Rudra Garnaik, PMI-ACP®
 
MVC Interview Questions PDF By ScholarHat
MVC Interview Questions PDF By ScholarHatMVC Interview Questions PDF By ScholarHat
MVC Interview Questions PDF By ScholarHat
Scholarhat
 
MVC by asp.net development company in india
MVC by asp.net development company in indiaMVC by asp.net development company in india
MVC by asp.net development company in india
iFour Institute - Sustainable Learning
 
Jinal desai .net
Jinal desai .netJinal desai .net
Jinal desai .net
rohitkumar1987in
 
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
dioduong345
 
Mvc
MvcMvc
Mvc
Furqan Ashraf
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
tola99
 
ASP .NET MVC
ASP .NET MVC ASP .NET MVC
ASP .NET MVC
eldorina
 
Oracle Applications R12 architecture
Oracle Applications R12 architectureOracle Applications R12 architecture
Oracle Applications R12 architecture
Sekhar Byna
 
Zend Framework Quick Start Walkthrough
Zend Framework Quick Start WalkthroughZend Framework Quick Start Walkthrough
Zend Framework Quick Start Walkthrough
Bradley Holt
 
MVC
MVCMVC
MVC
akshin
 
MVC in PHP
MVC in PHPMVC in PHP
MVC in PHP
Vineet Kumar Saini
 
Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9
AHM Pervej Kabir
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHP
IRJET Journal
 
Model View Controller-Introduction-Overview.pptx
Model View Controller-Introduction-Overview.pptxModel View Controller-Introduction-Overview.pptx
Model View Controller-Introduction-Overview.pptx
MarioCaday2
 
Overview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company indiaOverview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company india
Jignesh Aakoliya
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handson
Prashant Kumar
 
Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVC
John Lewis
 
MVC Interview Questions PDF By ScholarHat
MVC Interview Questions PDF By ScholarHatMVC Interview Questions PDF By ScholarHat
MVC Interview Questions PDF By ScholarHat
Scholarhat
 
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
dioduong345
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
tola99
 
ASP .NET MVC
ASP .NET MVC ASP .NET MVC
ASP .NET MVC
eldorina
 
Oracle Applications R12 architecture
Oracle Applications R12 architectureOracle Applications R12 architecture
Oracle Applications R12 architecture
Sekhar Byna
 
Zend Framework Quick Start Walkthrough
Zend Framework Quick Start WalkthroughZend Framework Quick Start Walkthrough
Zend Framework Quick Start Walkthrough
Bradley Holt
 
Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9
AHM Pervej Kabir
 
Ad

Recently uploaded (20)

Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 

Php.Mvc Presentation

  • 1. Php.MVC InfoStretch Solutions Pvt. Ltd Prepared By Niranjan Limbachiya Nimesh Chauhan
  • 2. Overview Introduction The Benefits The MVC pattern Concepts The Web-server Directory structure Core components of Php.MVC Library XML Application Configuration System Controller The Action Form & Action Security View Resources
  • 3. Introduction php.MVC is a M odel V iew C ontroller (MVC) framework for PHP Web applications The use of this design philosophy makes it easier for designers and programmers to focus on their respective areas of expertise This design model allows Web pages or other contents (Views) to be separated from the applications business logic, or code (Model) php.MVC is a PHP port of the Jakarta Struts project.
  • 5. The Benefits php.MVC is a PHP port of the Jakarta Struts project Enforces modularity and application partitioning Increases developer/designer role separation Increases code manageability Increase code extensibility (Ability to adapt to change)
  • 6. The MVC Pattern Concepts We can see the how a typical HTTP request from a Web client (Web browser) would interact with the core framework classes and our application classes, to produce a HTTP response (Web content) to return to the Web client.
  • 7. Contd.. To start the process, a client would send our php.MVC application a request perhaps a request to view a particular company sales report http://www.myhost.com/mycompany/Main.php?do=salesReport
  • 9. MVC Libraries .htaccess control who can access this directory art directory Is used to hold the application graphics, and will be accessible to the Web style directory is used to hold the application style sheets and will also be accessible to the Web /WEB-INF directory This is where we locate the application classes and resources.
  • 10. Contd.. The tpl directory holds the applications View resources, such as page ModulePaths.php file Is used to define the application specific paths to our classes and resources phpmvc-config.xml file Is the central component of the php.MVC application. phpmvc-config_1_1.dtd file Contains the Document Type Definitions (DTD) for the phpmvc-config.xml file prepend.php file is used to include application files Main.php file is the single entry point for an application, and is located in the application root directory
  • 11. Core component of MVC The XML configuration file is the "switchboard" of a php.MVC application. This is how we bind the various components to a HTTP request path The Controller consists of the php.MVC framework classes that are responsible for routing HTTP requests to the correct Form and Action classes and View resources, as defined in the application phpmvc-config.xml file. The Action Form classes can be used to handle Web form checks and validation The Action classes are used to access our business classes. We can direct the application flow to resources based on run-time conditions The Action Dispatcher class handles the resource (template) processing
  • 14. Controller The Controller component of the php.MVC framework consists of classes that handle a users request according to predefined configuration options A typical user request may look something Like: http://www.myhost.com/mycompany/Main.php?do=salesReport The php.MVC Controller consists of two distinct sections: The Front Controller The Controller proper
  • 17. Action Form An ActionForm is represented in the XML Application Configuration like this: The use of an ActionForm for a particular request path is optional, and can be activated in the XML Application Configuration System using the validate attribute of the action mapping node like this
  • 18. Action An Action class is represented in the XML Application Configuration like this:
  • 19. Security regular expression (RE) such as "^[a-z0-9]{8}$"
  • 20. View Tpl comes into view Action dispatcher