SlideShare a Scribd company logo
What is MVC? A Primer in 10 Slides Dominique Gerald M Cimafranca [email_address] http://villageidiotsavant.com By
Model-View-Controller an  architectural pattern  in software engineering
a way of  designing  and  building  applications
object-oriented  software development
separates   application logic  from  presentation
loose coupling  between components
Without MVC Client database db=connect(database); var1=$_POST[“data1”]; var2=$_POST[“data2”]; db.query(“insert into db values var1,var2”); print “<HTML><H1>Success</H1></HTML>”; http://myapp/create.php http://myapp/read.php http://myapp/update.php http://myapp/delete.php database application presentation All in one program! delete.php update.php read.php create.php
What happens when you... change the database settings?
change the database design?
change the database?

More Related Content

PPTX
Introduction to mvc architecture
PDF
MVC architecture
PPT
MVC Architecture in ASP.Net By Nyros Developer
PPT
MVC(Model View Controller),Web,Enterprise,Mobile
PPTX
ASP.NET MVC Presentation
PDF
MVC Seminar Presantation
PPT
Why MVC?
Introduction to mvc architecture
MVC architecture
MVC Architecture in ASP.Net By Nyros Developer
MVC(Model View Controller),Web,Enterprise,Mobile
ASP.NET MVC Presentation
MVC Seminar Presantation
Why MVC?

What's hot (20)

PPTX
MVC Framework
PDF
Model View Controller (MVC)
PPTX
ASP .NET MVC Introduction & Guidelines
PPT
MVC ppt presentation
PPTX
Mvc fundamental
PPTX
Mvc pattern and implementation in java fair
PPT
Ppt of Basic MVC Structure
PPT
MVC Architecture
PPTX
Model view controller (mvc)
PPT
Asp.net mvc
PPTX
MVC architecture by Mohd.Awais on 18th Aug, 2017
PPTX
ASP.NET MVC.
 
ODP
Why Use MVC?
PDF
MVC Architecture
PPT
MSDN - ASP.NET MVC
PDF
Just a View: An Introduction To Model-View-Controller Pattern
PPTX
Design Pattern - MVC, MVP and MVVM
PPT
Silver Light By Nyros Developer
PDF
Principles of MVC for Rails Developers
MVC Framework
Model View Controller (MVC)
ASP .NET MVC Introduction & Guidelines
MVC ppt presentation
Mvc fundamental
Mvc pattern and implementation in java fair
Ppt of Basic MVC Structure
MVC Architecture
Model view controller (mvc)
Asp.net mvc
MVC architecture by Mohd.Awais on 18th Aug, 2017
ASP.NET MVC.
 
Why Use MVC?
MVC Architecture
MSDN - ASP.NET MVC
Just a View: An Introduction To Model-View-Controller Pattern
Design Pattern - MVC, MVP and MVVM
Silver Light By Nyros Developer
Principles of MVC for Rails Developers
Ad

Similar to What is MVC? (20)

PPT
MVC Pattern. Flex implementation of MVC
PDF
Spring Framework-II
DOCX
ASP.NET MVC3 RAD
PDF
IRJET- Lightweight MVC Framework in PHP
PPT
Introduction To Code Igniter
DOCX
Adding a view
PDF
Principles of MVC for PHP Developers
DOCX
LearningMVCWithLINQToSQL
PDF
Introduction To CodeIgniter
DOCX
A report on mvc using the information
PPTX
Fundaments of Knockout js
PPT
Vanjs backbone-powerpoint
PPTX
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
PPS
Introduction To Mvc
PPTX
Planbox Backbone MVC
PDF
MVC in PHP
PDF
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
PDF
ASP.NET MVC 5 Building Your First Web Application (A Beginner S Guide
PPT
Getting Started with Zend Framework
PPTX
CodeIgniter 101 Tutorial
MVC Pattern. Flex implementation of MVC
Spring Framework-II
ASP.NET MVC3 RAD
IRJET- Lightweight MVC Framework in PHP
Introduction To Code Igniter
Adding a view
Principles of MVC for PHP Developers
LearningMVCWithLINQToSQL
Introduction To CodeIgniter
A report on mvc using the information
Fundaments of Knockout js
Vanjs backbone-powerpoint
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
Introduction To Mvc
Planbox Backbone MVC
MVC in PHP
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ASP.NET MVC 5 Building Your First Web Application (A Beginner S Guide
Getting Started with Zend Framework
CodeIgniter 101 Tutorial
Ad

More from Dom Cimafranca (18)

PDF
Welcome Address - CS Cluster Orientation
PDF
Story a meditation
PDF
Video Games as Culture and Experience
PDF
Privacy and how the Internet works
PDF
Why you can't write filipino science fiction
ODP
Thesis proposal checklist
PDF
FOSS and social development
PDF
Metadata 101
PDF
Creative nonfiction
PDF
Speculative Fiction
PDF
Online Literature
PDF
Writing Short Fiction
PDF
Teaching Open Source In The University
PDF
PDF
Architecture Of The Linux Kernel
PDF
Understanding The Boot Process
ODP
Ubuntu For Intranet Services
PDF
Open Source In Education
Welcome Address - CS Cluster Orientation
Story a meditation
Video Games as Culture and Experience
Privacy and how the Internet works
Why you can't write filipino science fiction
Thesis proposal checklist
FOSS and social development
Metadata 101
Creative nonfiction
Speculative Fiction
Online Literature
Writing Short Fiction
Teaching Open Source In The University
Architecture Of The Linux Kernel
Understanding The Boot Process
Ubuntu For Intranet Services
Open Source In Education

Recently uploaded (20)

PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Top Generative AI Tools for Patent Drafting in 2025.pdf
PPTX
Web Security: Login Bypass, SQLi, CSRF & XSS.pptx
PDF
Sensors and Actuators in IoT Systems using pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Reimagining Insurance: Connected Data for Confident Decisions.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
ABU RAUP TUGAS TIK kelas 8 hjhgjhgg.pptx
PDF
Dell Pro 14 Plus: Be better prepared for what’s coming
PDF
CIFDAQ's Token Spotlight: SKY - A Forgotten Giant's Comeback?
PDF
creating-agentic-ai-solutions-leveraging-aws.pdf
PDF
Transforming Manufacturing operations through Intelligent Integrations
PDF
Chapter 2 Digital Image Fundamentals.pdf
PPTX
How to Build Crypto Derivative Exchanges from Scratch.pptx
PPTX
CroxyProxy Instagram Access id login.pptx
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
PDF
DevOps & Developer Experience Summer BBQ
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Chapter 3 Spatial Domain Image Processing.pdf
Top Generative AI Tools for Patent Drafting in 2025.pdf
Web Security: Login Bypass, SQLi, CSRF & XSS.pptx
Sensors and Actuators in IoT Systems using pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Reimagining Insurance: Connected Data for Confident Decisions.pdf
Understanding_Digital_Forensics_Presentation.pptx
ABU RAUP TUGAS TIK kelas 8 hjhgjhgg.pptx
Dell Pro 14 Plus: Be better prepared for what’s coming
CIFDAQ's Token Spotlight: SKY - A Forgotten Giant's Comeback?
creating-agentic-ai-solutions-leveraging-aws.pdf
Transforming Manufacturing operations through Intelligent Integrations
Chapter 2 Digital Image Fundamentals.pdf
How to Build Crypto Derivative Exchanges from Scratch.pptx
CroxyProxy Instagram Access id login.pptx
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
DevOps & Developer Experience Summer BBQ

What is MVC?

  • 1. What is MVC? A Primer in 10 Slides Dominique Gerald M Cimafranca [email_address] http://villageidiotsavant.com By
  • 2. Model-View-Controller an architectural pattern in software engineering
  • 3. a way of designing and building applications
  • 5. separates application logic from presentation
  • 6. loose coupling between components
  • 7. Without MVC Client database db=connect(database); var1=$_POST[“data1”]; var2=$_POST[“data2”]; db.query(“insert into db values var1,var2”); print “<HTML><H1>Success</H1></HTML>”; http://myapp/create.php http://myapp/read.php http://myapp/update.php http://myapp/delete.php database application presentation All in one program! delete.php update.php read.php create.php
  • 8. What happens when you... change the database settings?
  • 13. change the look and feel?
  • 14. How does MVC work? Client http://myapp/customer/create http://myapp/customer/read http://myapp/customer/update http://myapp/customer/delete customer (controller) function create() { : : } function read() { : : } function update() { : : } function delete() { : : } function read($id) { Customer->get($id); $data=Customer->read(); : : render($data,”template.tpl”); } Controller handles application logic
  • 15. A single controller may have multiple methods
  • 16. A controller collects all the actions that takes place
  • 17. Several controllers may comprise an application
  • 18. How does MVC work? Client customer (controller) function create() { : : } function read() { : : } function update() { : : } function delete() { : : } function read($id) { Customer->get($id); $data=Customer->read(); : : render($data,”template.tpl”); } Controller invokes models
  • 21. Models can invoke other models Customer http://myapp/customer/create http://myapp/customer/read http://myapp/customer/update http://myapp/customer/delete name category quantity : read() save() :
  • 22. How does MVC work? Client customer (controller) function create() { : : } function read() { : : } function update() { : : } function delete() { : : } function read($id) { Customer->get($id); $data=Customer->read(); : : render($data,”template.tpl”); } name category quantity : read() save() : Customer http://myapp/customer/create http://myapp/customer/read http://myapp/customer/update http://myapp/customer/delete Controller combines data with template
  • 23. Template may perform additional processing
  • 24. Return combination as HTML $header $sidebar for($item in $data) { echo $item; } Our Customers : : : : Charlie Brown Lucy Van Pelt Linus Van Pelt
  • 25. Or we could do it with XML Client customer (controller) function create() { : : } function read() { : : } function update() { : : } function delete() { : : } function read($id) { Customer->get($id); $data=Customer->read(); : : render($data,”template.tpl”); } name category quantity : read() save() : Customer XML request XML response $xml->serialize($data) Whatever... Java C / C++ JavaScript Client does not need to be a web browser
  • 26. Can be any client that speaks XML
  • 28. With this, we can talk about web services XML, JSON, YAML, ...
  • 29. Some MVC web frameworks Ruby on Rails (www.rubyonrails.org)
  • 37. Mojolicious (www.mojolicio.us) Frameworks make things easier BUT you don't need to use them to practice MVC
  • 38. License You are free: to Share: to copy, distribute and transmit the work
  • 39. to Remix: to adapt the work Under the following conditions: Attribution: You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
  • 40. Share Alike: If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one. With the understanding that: Waiver: Any of the above conditions can be waived if you get permission from the copyright holder.
  • 41. Public Domain: Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license. Other Rights: In no way are any of the following rights affected by the license: Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations;
  • 43. Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights. Notice: For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page .