SlideShare a Scribd company logo
Institute Name: Shree P.M.Patel Institute of Post Graduation Studies and Research in
Applied Science
Managed By: Anand People Medicare Society, Anand
Seminar Topic: MVC in PHP
Seminar By,
Kavankumar Nileshkumar Solanki
MSc.IT 2ND Semester
Roll No.: 03
Objectives
Challenges Faced when Designing an Application Without Framework
Introduction to MVC
What is MVC?
Benefits of MVC
Popular MVC Frameworks
DRY
Bibliography
Challenges Faced when Designing
an Application without a Framework
Complexity in Coding in straight
PHP
Everything must be tested; which is difficult
Difficult to re-use code
Hard code everything from scratch
Teamwork challenges -parallel programming cannot be done efficiently
Introduction to MVC
• Software development is not a new idea. Ada Lovelace is said to have written
the first computer program in the mid-nineteenth century for the Analytical
Engine, the first mechanical computer prototyped by Charles Babbage.
• Designing good software is hard.
• It involves taking into consideration all aspects of the application you need to
build, and is complicated further by the need to be specific enough to your
current requirements to get the job done, while being generic enough to
address future problems.
• Many experienced developers have had these problems and, over time,
common patterns have emerged that assist in solving them.
• Christopher Alexander, a structural architect, first described patterns in such
a way that they can be applied to software development. He said, “Each
pattern describes a problem which occurs over and over again in our
environment, and then describes the core of the solution to that problem, in
such a way that you can use this solution a million times over, without ever
doing it the same way twice.”
What is MVC?
MVC (Model-View-Controller) is a software design pattern built around the
interconnection of three main component types, in a programming language
such as PHP, often with a strong focus on object-oriented programming
(OOP) software paradigms.
The three component types are loosely termed models, views, and
controllers.
Model
The model is where all the business logic of an application is kept.
Business logic can be anything specific to how an application stores data,
or uses third-party services, in order to fulfill its business requirements.
If the application should access information in a database, the code to do
that would be kept in the model.
View
The view is where all of the user interface elements of our application
are kept. This can include our HTML markup, CSS style sheets, and
JavaScript files.
Anything a user sees or interacts with can be kept in a view, and
sometimes what the user sees is actually a combination of many different
views in the same request.
Controller
The controller is the component that connects models and views
together. Controllers isolate the business logic of a model from the user
interface elements of a view, and handle how the application will
respond to user interaction in the view.
Controllers are the first point of entry into this trio of components,
because the request is first passed to a controller, which will then
instantiate the models and views required to fulfill a request to the
application.
Benefits of MVC
• There is no point explaining what MVC is without knowing why you
should use it. Remember Christopher Alexander’s patterns that I
mentioned earlier?
• MVC is one of the many patterns that will be explained in this book, but
to understand the usefulness of this design pattern, we must look toward
the problems it helps to alleviate.
Popular MVC Frameworks
• There are many great PHP frameworks availible, but if we limit our view
to just three, I think we can get a good idea of what they have in
common, and what makes each special.
• These are not the best or the only PHP MVC frameworks, but simply a
good cross-section of the different approaches to PHP MVC
development.
CodeIgniter
• CodeIgniter is the first and simplest of the frameworks we will be looking
into.
• It is developed and maintained by Ellis Lab and can be described as an
open source Expression Engine.
• You can download CodeIgniter at http://codeigniter.com.
• You can also learn more about EllisLab and ExpressionEngine at
http://ellislab.com.
Zend Framework
• Zend Framework is an extensive collection of loosely coupled
code libraries that can form the basis of an MVC architecture.
• Zend Framework takes quite a bit of effort to understand and
master relative to other popular MVC frameworks.
• It is developed by Zend Technologies and enjoys all the benefits
of a large, stable community and wide adoption.
• Whereas frameworks like CodeIgniter strive to be lightweight,
favoring just the essentials, Zend Framework includes libraries
that help developers utilize a wide range of third-party services
and APIs.
• You can download Zend Framework at
http://framework.zend.com.
• You can also learn more about Zend at http://zend.com.
CakePHP
• CakePHP is arguably the most popular of the three frameworks.
• Unlike the previous two frameworks, it is not governed by any one
corporate entity.
• It has a large community and is widely adopted.
• It favors convention over configuration, which means a lot of the finer
details are assumed and automated.
• This is apparent in every area of the framework, and you will often find
yourself wondering how CakePHP is doing something you didn’t ask it to
do, both good and bad.
• This means you can develop an application quickly, but also that you
might have a hard time when you need to make very specific changes.
Continue
• This is even seen in the code-generation command-line tool: Bake.
• Within minutes, it can generate a working application, just by following
command-line prompts and filling in the blanks with default parameters
and behaviors.
• You can download CakePHP at http://cakephp.org.
DRY
• DRY just means "Don't Repeat Yourself". Make sure that when you write
code, you only write it one time.
• The DRY principle is stated as "Every piece of knowledge must have a
single, unambiguous, authoritative representation within a system."
Ps02 cint24 mvc in php
Bibliography
Pro PHP MVC Chris Pitt APRESS Nov-2012
• Webinar on Principles of MVC For PHP Developers by EDUREKA ON
04/Aug./15
[ http://www.edureka.co/php-mysql]
Ps02 cint24 mvc in php
Ps02 cint24 mvc in php

More Related Content

What's hot (18)

PPTX
MVC & CodeIgniter
Harshit Gupta
 
PPTX
PHP Frameworks & Introduction to CodeIgniter
Jamshid Hashimi
 
PPTX
Choose the right PHP framework for your website?
XHTML Champs
 
PPTX
Asp net mvc series for beginers part 1
Gaurav Arora
 
PDF
Web application development with laravel php framework version 4
Untung D Saptoto
 
PPTX
Java useful in Mule
Shahid Shaik
 
PPTX
Introduction To Model View Presenter
saeed shargi ghazani
 
PPTX
Mvc3 part1
Muhammad Younis
 
PDF
Top Web Development Frameworks Comparison: All You Need To Know
PixelCrayons
 
PPTX
List of 7 popular java frameworks for 2019
kritikumar16
 
DOCX
Month 2 report
PRIYANKA FNU
 
PPTX
Java for beginners
Ducat
 
PDF
Web Application Frameworks - Lecture 05 - Web Information Systems (4011474FNR)
Beat Signer
 
PPT
A Simple MVC Framework for Widget Development
Martin Ebner
 
PPTX
Introduction to asp.net mvc
Lohith Goudagere Nagaraj
 
PDF
Laravel 9 is now out – how is an improvement over its predecessors
Moon Technolabs Pvt. Ltd.
 
PPTX
PHP Frameworks
Dumindu Pahalawatta
 
PPTX
Test automation-framework
Thessaloniki Software Testing and QA meetup
 
MVC & CodeIgniter
Harshit Gupta
 
PHP Frameworks & Introduction to CodeIgniter
Jamshid Hashimi
 
Choose the right PHP framework for your website?
XHTML Champs
 
Asp net mvc series for beginers part 1
Gaurav Arora
 
Web application development with laravel php framework version 4
Untung D Saptoto
 
Java useful in Mule
Shahid Shaik
 
Introduction To Model View Presenter
saeed shargi ghazani
 
Mvc3 part1
Muhammad Younis
 
Top Web Development Frameworks Comparison: All You Need To Know
PixelCrayons
 
List of 7 popular java frameworks for 2019
kritikumar16
 
Month 2 report
PRIYANKA FNU
 
Java for beginners
Ducat
 
Web Application Frameworks - Lecture 05 - Web Information Systems (4011474FNR)
Beat Signer
 
A Simple MVC Framework for Widget Development
Martin Ebner
 
Introduction to asp.net mvc
Lohith Goudagere Nagaraj
 
Laravel 9 is now out – how is an improvement over its predecessors
Moon Technolabs Pvt. Ltd.
 
PHP Frameworks
Dumindu Pahalawatta
 

Similar to Ps02 cint24 mvc in php (20)

PPTX
Php Framework
cncwebworld
 
PPT
Why MVC?
Wayne Tun Myint
 
PPTX
MVC.pptx
HassanAliKhan36
 
PPTX
An Introduction To Model  View  Controller In XPages
Ulrich Krause
 
PPTX
MWLUG 2015 - An Introduction to MVC
Ulrich Krause
 
PPTX
Asp.net c# MVC-5 Training-Day-1 of Day-9
AHM Pervej Kabir
 
DOCX
Codeigniter
Chirag Parmar
 
PDF
Presentation 1 Web--dev
altsav
 
PDF
MVC 3.0 KU Day 1 v 1.1
Lek Pongpatimet
 
PDF
Generic repository pattern with ASP.NET MVC and Entity Framework
Md. Mahedee Hasan
 
PDF
Asp 1a-aspnetmvc
Fajar Baskoro
 
PDF
Aspnetmvc 1
Fajar Baskoro
 
ODP
A Good PHP Framework For Beginners Like Me!
Muhammad Ghazali
 
PPTX
Laravel overview
Obinna Akunne
 
PDF
Avigma Tech LLC- Why the MVC pattern so popular?
Mike Brown
 
PPT
Mvc 130330091359-phpapp01
Jennie Gajjar
 
PPTX
Introduction to MVC Web Framework with CodeIgniter
Pongsakorn U-chupala
 
PDF
Php and-mvc
Manoj Sahoo
 
PDF
A Brief Note On Asp.Net And Cloud Computing Essay
Lanate Drummond
 
PPTX
Framework_Model_Overview for App Develop
MARIESTELLAGERODIAS
 
Php Framework
cncwebworld
 
Why MVC?
Wayne Tun Myint
 
MVC.pptx
HassanAliKhan36
 
An Introduction To Model  View  Controller In XPages
Ulrich Krause
 
MWLUG 2015 - An Introduction to MVC
Ulrich Krause
 
Asp.net c# MVC-5 Training-Day-1 of Day-9
AHM Pervej Kabir
 
Codeigniter
Chirag Parmar
 
Presentation 1 Web--dev
altsav
 
MVC 3.0 KU Day 1 v 1.1
Lek Pongpatimet
 
Generic repository pattern with ASP.NET MVC and Entity Framework
Md. Mahedee Hasan
 
Asp 1a-aspnetmvc
Fajar Baskoro
 
Aspnetmvc 1
Fajar Baskoro
 
A Good PHP Framework For Beginners Like Me!
Muhammad Ghazali
 
Laravel overview
Obinna Akunne
 
Avigma Tech LLC- Why the MVC pattern so popular?
Mike Brown
 
Mvc 130330091359-phpapp01
Jennie Gajjar
 
Introduction to MVC Web Framework with CodeIgniter
Pongsakorn U-chupala
 
Php and-mvc
Manoj Sahoo
 
A Brief Note On Asp.Net And Cloud Computing Essay
Lanate Drummond
 
Framework_Model_Overview for App Develop
MARIESTELLAGERODIAS
 
Ad

More from Conestoga Collage (13)

PPTX
Networking and Security in Java
Conestoga Collage
 
PPTX
Ps02 eint21 electronic data interchange
Conestoga Collage
 
PPTX
Ps02 cint21 enterprise information system
Conestoga Collage
 
PPTX
Ps02 cint23 ado
Conestoga Collage
 
PPTX
PS02CINT22 SE Software Maintenance
Conestoga Collage
 
PPTX
Operating systems & its future
Conestoga Collage
 
PPTX
Bluetooth
Conestoga Collage
 
PPTX
Blue Brain project
Conestoga Collage
 
PPTX
AI programming languages
Conestoga Collage
 
PPTX
Artificial intelligence
Conestoga Collage
 
PPTX
Web Based Claim Processing System
Conestoga Collage
 
PPTX
Blue Brain Project
Conestoga Collage
 
PPTX
Menu stripe
Conestoga Collage
 
Networking and Security in Java
Conestoga Collage
 
Ps02 eint21 electronic data interchange
Conestoga Collage
 
Ps02 cint21 enterprise information system
Conestoga Collage
 
Ps02 cint23 ado
Conestoga Collage
 
PS02CINT22 SE Software Maintenance
Conestoga Collage
 
Operating systems & its future
Conestoga Collage
 
Blue Brain project
Conestoga Collage
 
AI programming languages
Conestoga Collage
 
Artificial intelligence
Conestoga Collage
 
Web Based Claim Processing System
Conestoga Collage
 
Blue Brain Project
Conestoga Collage
 
Menu stripe
Conestoga Collage
 
Ad

Recently uploaded (20)

PPTX
Mastering-Full-Stack-Web-Development-An-NIELIT-Perspective.pptx
VedprakashArya13
 
PPTX
Avoid These Costly Blunders_ Critical Mistakes When Selecting CA Services in ...
Sachin Gujar & Associates
 
PPTX
Demand Management jjbdsfjsnfjnodfds.pptx
pparthmurdeshwar
 
PPTX
Judaism-group-1.pptx for reporting grade 11
ayselprettysomuch
 
PDF
Behind the Curtains of Big Fat Indian Weddings 2.pdf
GAURAV. H .TANDON
 
PDF
European Exchange Report 2024 - FESE Statistics
secretariat4
 
PDF
Why Most People Misunderstand Risk in Personal Finance.
Harsh Mishra
 
PPTX
Commercial Bank Economic Capsule - July 2025
Commercial Bank of Ceylon PLC
 
PDF
Eni 2023 Second Quarter Results - July 2025
Eni
 
PDF
CH 1_Managers and Economics - Introduction.pdf
AhmadM65
 
PPT
The reporting entity and financial statements
Adugna37
 
PPTX
Agrarian Distress by Dr. S. Malini. ppt.
MaliniHariraj
 
PDF
ONS Economic Forum Slidepack – 21 July 2025
Office for National Statistics
 
PDF
STEM Education in Rural Maharashtra by Abhay Bhutada Foundation
Heera Yadav
 
PDF
2025 Mid-year Budget Review_SPEECH_FINAL_23ndJuly2025_v5.pdf
JeorgeWilsonKingson1
 
PDF
10 Budgeting Mistakes Local Entrepreneurs Make
RAJ KISHAN CPA INC.
 
PDF
Mining Beneficiation as a Catalyst for Broad-Based Socio-Economic Empowerment...
Matthews Bantsijang
 
PDF
Pyramid_of_Financial_Priorities_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
An Uncut Conversation With ChatGPT | PDF Document
Mike Hydes
 
DOCX
Corporate Governance Requirements for NCD Listed Companies – PART A.docx
ConnectAffluence
 
Mastering-Full-Stack-Web-Development-An-NIELIT-Perspective.pptx
VedprakashArya13
 
Avoid These Costly Blunders_ Critical Mistakes When Selecting CA Services in ...
Sachin Gujar & Associates
 
Demand Management jjbdsfjsnfjnodfds.pptx
pparthmurdeshwar
 
Judaism-group-1.pptx for reporting grade 11
ayselprettysomuch
 
Behind the Curtains of Big Fat Indian Weddings 2.pdf
GAURAV. H .TANDON
 
European Exchange Report 2024 - FESE Statistics
secretariat4
 
Why Most People Misunderstand Risk in Personal Finance.
Harsh Mishra
 
Commercial Bank Economic Capsule - July 2025
Commercial Bank of Ceylon PLC
 
Eni 2023 Second Quarter Results - July 2025
Eni
 
CH 1_Managers and Economics - Introduction.pdf
AhmadM65
 
The reporting entity and financial statements
Adugna37
 
Agrarian Distress by Dr. S. Malini. ppt.
MaliniHariraj
 
ONS Economic Forum Slidepack – 21 July 2025
Office for National Statistics
 
STEM Education in Rural Maharashtra by Abhay Bhutada Foundation
Heera Yadav
 
2025 Mid-year Budget Review_SPEECH_FINAL_23ndJuly2025_v5.pdf
JeorgeWilsonKingson1
 
10 Budgeting Mistakes Local Entrepreneurs Make
RAJ KISHAN CPA INC.
 
Mining Beneficiation as a Catalyst for Broad-Based Socio-Economic Empowerment...
Matthews Bantsijang
 
Pyramid_of_Financial_Priorities_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
An Uncut Conversation With ChatGPT | PDF Document
Mike Hydes
 
Corporate Governance Requirements for NCD Listed Companies – PART A.docx
ConnectAffluence
 

Ps02 cint24 mvc in php

  • 1. Institute Name: Shree P.M.Patel Institute of Post Graduation Studies and Research in Applied Science Managed By: Anand People Medicare Society, Anand Seminar Topic: MVC in PHP Seminar By, Kavankumar Nileshkumar Solanki MSc.IT 2ND Semester Roll No.: 03
  • 2. Objectives Challenges Faced when Designing an Application Without Framework Introduction to MVC What is MVC? Benefits of MVC Popular MVC Frameworks DRY Bibliography
  • 3. Challenges Faced when Designing an Application without a Framework Complexity in Coding in straight PHP Everything must be tested; which is difficult Difficult to re-use code Hard code everything from scratch Teamwork challenges -parallel programming cannot be done efficiently
  • 4. Introduction to MVC • Software development is not a new idea. Ada Lovelace is said to have written the first computer program in the mid-nineteenth century for the Analytical Engine, the first mechanical computer prototyped by Charles Babbage. • Designing good software is hard. • It involves taking into consideration all aspects of the application you need to build, and is complicated further by the need to be specific enough to your current requirements to get the job done, while being generic enough to address future problems. • Many experienced developers have had these problems and, over time, common patterns have emerged that assist in solving them. • Christopher Alexander, a structural architect, first described patterns in such a way that they can be applied to software development. He said, “Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice.”
  • 5. What is MVC? MVC (Model-View-Controller) is a software design pattern built around the interconnection of three main component types, in a programming language such as PHP, often with a strong focus on object-oriented programming (OOP) software paradigms. The three component types are loosely termed models, views, and controllers.
  • 6. Model The model is where all the business logic of an application is kept. Business logic can be anything specific to how an application stores data, or uses third-party services, in order to fulfill its business requirements. If the application should access information in a database, the code to do that would be kept in the model.
  • 7. View The view is where all of the user interface elements of our application are kept. This can include our HTML markup, CSS style sheets, and JavaScript files. Anything a user sees or interacts with can be kept in a view, and sometimes what the user sees is actually a combination of many different views in the same request.
  • 8. Controller The controller is the component that connects models and views together. Controllers isolate the business logic of a model from the user interface elements of a view, and handle how the application will respond to user interaction in the view. Controllers are the first point of entry into this trio of components, because the request is first passed to a controller, which will then instantiate the models and views required to fulfill a request to the application.
  • 9. Benefits of MVC • There is no point explaining what MVC is without knowing why you should use it. Remember Christopher Alexander’s patterns that I mentioned earlier? • MVC is one of the many patterns that will be explained in this book, but to understand the usefulness of this design pattern, we must look toward the problems it helps to alleviate.
  • 10. Popular MVC Frameworks • There are many great PHP frameworks availible, but if we limit our view to just three, I think we can get a good idea of what they have in common, and what makes each special. • These are not the best or the only PHP MVC frameworks, but simply a good cross-section of the different approaches to PHP MVC development.
  • 11. CodeIgniter • CodeIgniter is the first and simplest of the frameworks we will be looking into. • It is developed and maintained by Ellis Lab and can be described as an open source Expression Engine. • You can download CodeIgniter at http://codeigniter.com. • You can also learn more about EllisLab and ExpressionEngine at http://ellislab.com.
  • 12. Zend Framework • Zend Framework is an extensive collection of loosely coupled code libraries that can form the basis of an MVC architecture. • Zend Framework takes quite a bit of effort to understand and master relative to other popular MVC frameworks. • It is developed by Zend Technologies and enjoys all the benefits of a large, stable community and wide adoption. • Whereas frameworks like CodeIgniter strive to be lightweight, favoring just the essentials, Zend Framework includes libraries that help developers utilize a wide range of third-party services and APIs. • You can download Zend Framework at http://framework.zend.com. • You can also learn more about Zend at http://zend.com.
  • 13. CakePHP • CakePHP is arguably the most popular of the three frameworks. • Unlike the previous two frameworks, it is not governed by any one corporate entity. • It has a large community and is widely adopted. • It favors convention over configuration, which means a lot of the finer details are assumed and automated. • This is apparent in every area of the framework, and you will often find yourself wondering how CakePHP is doing something you didn’t ask it to do, both good and bad. • This means you can develop an application quickly, but also that you might have a hard time when you need to make very specific changes.
  • 14. Continue • This is even seen in the code-generation command-line tool: Bake. • Within minutes, it can generate a working application, just by following command-line prompts and filling in the blanks with default parameters and behaviors. • You can download CakePHP at http://cakephp.org.
  • 15. DRY • DRY just means "Don't Repeat Yourself". Make sure that when you write code, you only write it one time. • The DRY principle is stated as "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system."
  • 17. Bibliography Pro PHP MVC Chris Pitt APRESS Nov-2012 • Webinar on Principles of MVC For PHP Developers by EDUREKA ON 04/Aug./15 [ http://www.edureka.co/php-mysql]