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

PDF
Php framework
PPTX
PHP framework difference
PPT
PHP Framework
PPSX
C#.net applied OOP - Batch 3
PPSX
Oop principles
PPTX
Generic Repository Pattern with ASP.NET MVC and EF
PPTX
Mobile App Architectures & Coding guidelines
PDF
The world of enterprise solution development with asp.net and C#
Php framework
PHP framework difference
PHP Framework
C#.net applied OOP - Batch 3
Oop principles
Generic Repository Pattern with ASP.NET MVC and EF
Mobile App Architectures & Coding guidelines
The world of enterprise solution development with asp.net and C#

What's hot (18)

PPTX
MVC & CodeIgniter
PPTX
PHP Frameworks & Introduction to CodeIgniter
PPTX
Choose the right PHP framework for your website?
PPTX
Asp net mvc series for beginers part 1
PDF
Web application development with laravel php framework version 4
PPTX
Java useful in Mule
PPTX
Introduction To Model View Presenter
PPTX
Mvc3 part1
PDF
Top Web Development Frameworks Comparison: All You Need To Know
PPTX
List of 7 popular java frameworks for 2019
DOCX
Month 2 report
PPTX
Java for beginners
PDF
Web Application Frameworks - Lecture 05 - Web Information Systems (4011474FNR)
PPT
A Simple MVC Framework for Widget Development
PPTX
Introduction to asp.net mvc
PDF
Laravel 9 is now out – how is an improvement over its predecessors
PPTX
PHP Frameworks
PPTX
MVC & CodeIgniter
PHP Frameworks & Introduction to CodeIgniter
Choose the right PHP framework for your website?
Asp net mvc series for beginers part 1
Web application development with laravel php framework version 4
Java useful in Mule
Introduction To Model View Presenter
Mvc3 part1
Top Web Development Frameworks Comparison: All You Need To Know
List of 7 popular java frameworks for 2019
Month 2 report
Java for beginners
Web Application Frameworks - Lecture 05 - Web Information Systems (4011474FNR)
A Simple MVC Framework for Widget Development
Introduction to asp.net mvc
Laravel 9 is now out – how is an improvement over its predecessors
PHP Frameworks
Ad

Similar to Ps02 cint24 mvc in php (20)

PPTX
Php Framework
PPT
Why MVC?
PPTX
MVC.pptx
PPTX
An Introduction To Model  View  Controller In XPages
PPTX
MWLUG 2015 - An Introduction to MVC
PPTX
Asp.net c# MVC-5 Training-Day-1 of Day-9
DOCX
Codeigniter
PDF
Presentation 1 Web--dev
PDF
MVC 3.0 KU Day 1 v 1.1
PDF
Generic repository pattern with ASP.NET MVC and Entity Framework
PDF
Asp 1a-aspnetmvc
PDF
Aspnetmvc 1
ODP
A Good PHP Framework For Beginners Like Me!
PPTX
Laravel overview
PDF
Avigma Tech LLC- Why the MVC pattern so popular?
PPT
Mvc 130330091359-phpapp01
PPTX
Introduction to MVC Web Framework with CodeIgniter
PDF
Php and-mvc
PDF
A Brief Note On Asp.Net And Cloud Computing Essay
PPTX
Framework_Model_Overview for App Develop
Php Framework
Why MVC?
MVC.pptx
An Introduction To Model  View  Controller In XPages
MWLUG 2015 - An Introduction to MVC
Asp.net c# MVC-5 Training-Day-1 of Day-9
Codeigniter
Presentation 1 Web--dev
MVC 3.0 KU Day 1 v 1.1
Generic repository pattern with ASP.NET MVC and Entity Framework
Asp 1a-aspnetmvc
Aspnetmvc 1
A Good PHP Framework For Beginners Like Me!
Laravel overview
Avigma Tech LLC- Why the MVC pattern so popular?
Mvc 130330091359-phpapp01
Introduction to MVC Web Framework with CodeIgniter
Php and-mvc
A Brief Note On Asp.Net And Cloud Computing Essay
Framework_Model_Overview for App Develop
Ad

More from Conestoga Collage (13)

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

Recently uploaded (20)

PDF
Bladex Earnings Call Presentation 2Q2025
PDF
NAPF_RESPONSE_TO_THE_PENSIONS_COMMISSION_8 _2_.pdf
PDF
Dialnet-DynamicHedgingOfPricesOfNaturalGasInMexico-8788871.pdf
PDF
Understanding University Research Expenditures (1)_compressed.pdf
PPTX
Globalization-of-Religion. Contemporary World
PDF
discourse-2025-02-building-a-trillion-dollar-dream.pdf
PPTX
Introduction to Essence of Indian traditional knowledge.pptx
PPTX
Who’s winning the race to be the world’s first trillionaire.pptx
PDF
caregiving tools.pdf...........................
PPTX
Basic Concepts of Economics.pvhjkl;vbjkl;ptx
PDF
how_to_earn_50k_monthly_investment_guide.pdf
PDF
Dr Tran Quoc Bao the first Vietnamese speaker at GITEX DigiHealth Conference ...
PPTX
FL INTRODUCTION TO AGRIBUSINESS CHAPTER 1
PPTX
Introduction to Customs (June 2025) v1.pptx
PDF
Corporate Finance Fundamentals - Course Presentation.pdf
PDF
ABriefOverviewComparisonUCP600_ISP8_URDG_758.pdf
PDF
ECONOMICS AND ENTREPRENEURS LESSONSS AND
PPTX
Session 11-13. Working Capital Management and Cash Budget.pptx
PPTX
4.5.1 Financial Governance_Appropriation & Finance.pptx
PDF
Mathematical Economics 23lec03slides.pdf
Bladex Earnings Call Presentation 2Q2025
NAPF_RESPONSE_TO_THE_PENSIONS_COMMISSION_8 _2_.pdf
Dialnet-DynamicHedgingOfPricesOfNaturalGasInMexico-8788871.pdf
Understanding University Research Expenditures (1)_compressed.pdf
Globalization-of-Religion. Contemporary World
discourse-2025-02-building-a-trillion-dollar-dream.pdf
Introduction to Essence of Indian traditional knowledge.pptx
Who’s winning the race to be the world’s first trillionaire.pptx
caregiving tools.pdf...........................
Basic Concepts of Economics.pvhjkl;vbjkl;ptx
how_to_earn_50k_monthly_investment_guide.pdf
Dr Tran Quoc Bao the first Vietnamese speaker at GITEX DigiHealth Conference ...
FL INTRODUCTION TO AGRIBUSINESS CHAPTER 1
Introduction to Customs (June 2025) v1.pptx
Corporate Finance Fundamentals - Course Presentation.pdf
ABriefOverviewComparisonUCP600_ISP8_URDG_758.pdf
ECONOMICS AND ENTREPRENEURS LESSONSS AND
Session 11-13. Working Capital Management and Cash Budget.pptx
4.5.1 Financial Governance_Appropriation & Finance.pptx
Mathematical Economics 23lec03slides.pdf

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]