SlideShare a Scribd company logo
1 of 14
Download to read offline
MVC
Reducing software project failures by design pattern(MVC)
Prepared By : Iman Mehmandoust
Contents
• MVC Definition
• MVC Example
• Model
• View
• Controller
• Software Failures
• Why MVC?
• Clarity of design
• Efficient modularity
• Multiple views
• Powerful user interfaces
• Ease of growth
Tuesday, June 9, 2015
Definition
• The Model-View-Controller (MVC) pattern, originally formulated in
the late 1970s
• MVC is an architectural pattern used in software engineering.
• MVC is a software design pattern that separates application logic from
presentation. In this case MVC has a front-end developer and a
back-end developer to work with the same system without
interfering or editing there files by their permeations
• The MVC pattern is most commonly used to create interfaces for
software applications, and, as the name implies, consists of three
elements:(Model View Controller)
Tuesday, June 9, 2015
• The pattern’s title is a collation of its three core parts: Model, View, and
Controller. A visual representation of a complete and correct MVC pattern
looks like the following diagram:
Tuesday, June 9, 2015
Model
• The Model represents your data structures. Typically your model classes will
contain functions that help you retrieve, insert, and update information in your
database.
Tuesday, June 9, 2015
View
• The View is the information that is being presented to a user. A View will
normally be a web page, but in CodeIgniter, a view can also be a page fragment
like a header or footer. It can also be an RSS page, or any other type of "page".
Tuesday, June 9, 2015
Controller
• The Controller serves as an intermediary between the Model, the View, and any
other resources needed to process the HTTP request and generate a web page
Tuesday, June 9, 2015
Example:
A simple way to think of this would be to consider the following:
• A user interacts with the view - by clicking on a link or submitting a form.
• The Controller handles the user input, and transfers the information to the model
• The Model receives the information and updates it's state (adds data to a database or
database interaction, or perform complex calculation for example, calculates todays date)
• The View checks the state of the Model and responds accordingly to the requester or
user (listing the newly entered data, maybe)
• The View waits for another interaction from the user.
Tuesday, June 9, 2015
Software Failures
• Difficult to use the data outside that object.
• Hard to use multiple views of the same data.
• Difficult to synchronize multiple view of the same data.
• Hard to change the UI, when UI and data are locked in the same object.
Tuesday, June 9, 2015
Why MVC?
Just by breaking the program down into the three MVC components, one gains
many advantages. These are the most significant ones I've found through my own
experience:
• Clarity of design:
the public methods in the model stand as an API for all the commands available
to manipulate its data and state. this trait makes the entire program easier to
implement and maintain.
• Efficient modularity:
Changes to one aspect of the program aren't coupled to other aspects,
eliminating many nasty debugging situations. Also, development of the various
components can progress in parallel, once the interface between the components
is clearly defined.
Tuesday, June 9, 2015
• Multiple views:
the application can display the state of the model in a variety of ways, and
create/design them in a scalable, modular way. This comes up in games, with a
cockpit and a radar view, and in my research applications, where I have a view to
display the state of the model and another view that collects data, calculates
statistics, then to saves the data to disk. Both views are using the same data, they
just use the information differently. During the development process, I usually
start out with a text based view, which just prints out the data that the model is
generating. Later, as I create new views, I can use the text based view to verify
the performance of the new views.
• Powerful user interfaces:
using the model's API, the user interface can combine the method calls when
presenting commands to the user. Macros can be seen as a series of "standard"
commands sent to the model, all triggered by a single user action. This allows the
program to present the user with a cleaner, friendlier interface.
Tuesday, June 9, 2015
• Ease of growth:
controllers and views can grow as the model grows; and older versions of the
views and controllers can still be used as long as a common interface is
maintained (the text view just mentioned is an example). For instance, if an
application needs two types of users, regular and administrator, they could use
the same model, but just have different controller and view implementations.
This is related to the similarity with the client/server architecture - where the new
views and servers are analogous to the clients.
Tuesday, June 9, 2015
References
• Definition of MVC:
https://ellislab.com/codeigniter/user-guide/overview/mvc.html
• MVC Advantages:
http://cristobal.baray.com/indiana/projects/mvc2.html
• E-Book
Model-View-Controller: A Design Pattern for Software June 2004
Tuesday, June 9, 2015
MVC

More Related Content

What's hot

What's hot (20)

MVC architecture by Mohd.Awais on 18th Aug, 2017
MVC architecture by Mohd.Awais on 18th Aug, 2017MVC architecture by Mohd.Awais on 18th Aug, 2017
MVC architecture by Mohd.Awais on 18th Aug, 2017
 
MVC architecture
MVC architectureMVC architecture
MVC architecture
 
Mvc, mvp, mvvm...
Mvc, mvp, mvvm...Mvc, mvp, mvvm...
Mvc, mvp, mvvm...
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
 
Slide Presentation of MVP Pattern Concept
Slide Presentation of MVP Pattern ConceptSlide Presentation of MVP Pattern Concept
Slide Presentation of MVP Pattern Concept
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architecture
 
Ui design patterns
Ui design patternsUi design patterns
Ui design patterns
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
Why Use MVC?
Why Use MVC?Why Use MVC?
Why Use MVC?
 
Why MVC?
Why MVC?Why MVC?
Why MVC?
 
Acrhitecture deisign pattern_MVC_MVP_MVVM
Acrhitecture deisign pattern_MVC_MVP_MVVMAcrhitecture deisign pattern_MVC_MVP_MVVM
Acrhitecture deisign pattern_MVC_MVP_MVVM
 
MVVM with WPF
MVVM with WPFMVVM with WPF
MVVM with WPF
 
Model View Controller (MVC)
Model View Controller (MVC)Model View Controller (MVC)
Model View Controller (MVC)
 
Model view controller (mvc)
Model view controller (mvc)Model view controller (mvc)
Model view controller (mvc)
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC Structure
 
Model View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In AspnetModel View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In Aspnet
 
MVVM
MVVMMVVM
MVVM
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
 

Viewers also liked

Take Charge of Your Data to Meet Fundraising Goals
Take Charge of Your Data to Meet Fundraising GoalsTake Charge of Your Data to Meet Fundraising Goals
Take Charge of Your Data to Meet Fundraising Goalsfundchat
 
Basic finance and retirement dilshad final
Basic finance and retirement dilshad finalBasic finance and retirement dilshad final
Basic finance and retirement dilshad finalGeorge Philip
 
Analysis Of Magazine Posters and Digipaks
Analysis Of Magazine Posters and DigipaksAnalysis Of Magazine Posters and Digipaks
Analysis Of Magazine Posters and Digipaksdanielbruce22
 
ブロフェス2014 タムカイ ブログを捨てよ、町へ出よう 〜ハッピーラクガキライフの場合〜
ブロフェス2014 タムカイ ブログを捨てよ、町へ出よう 〜ハッピーラクガキライフの場合〜ブロフェス2014 タムカイ ブログを捨てよ、町へ出よう 〜ハッピーラクガキライフの場合〜
ブロフェス2014 タムカイ ブログを捨てよ、町へ出よう 〜ハッピーラクガキライフの場合〜Kai Tamura
 
Evaluation Question 4
Evaluation Question 4Evaluation Question 4
Evaluation Question 4danielbruce22
 
Top industry Producers
Top industry ProducersTop industry Producers
Top industry Producersdanielbruce22
 
Audience Feedback on Final Cut
Audience Feedback on Final CutAudience Feedback on Final Cut
Audience Feedback on Final Cutdanielbruce22
 
Creativity in AS piece
Creativity in AS pieceCreativity in AS piece
Creativity in AS piecedanielbruce22
 
What would be the media audience for your media product?
What would be the media audience for your media product?What would be the media audience for your media product?
What would be the media audience for your media product?danielbruce22
 
Technology and society
Technology and societyTechnology and society
Technology and societyconchin_ddz
 
Conventions of Opening Title Sequences
Conventions of Opening Title SequencesConventions of Opening Title Sequences
Conventions of Opening Title Sequencesdanielbruce22
 
My Music Video's Institution
My Music Video's InstitutionMy Music Video's Institution
My Music Video's Institutiondanielbruce22
 
Representation Of Women
Representation Of WomenRepresentation Of Women
Representation Of Womendanielbruce22
 

Viewers also liked (20)

Take Charge of Your Data to Meet Fundraising Goals
Take Charge of Your Data to Meet Fundraising GoalsTake Charge of Your Data to Meet Fundraising Goals
Take Charge of Your Data to Meet Fundraising Goals
 
Basic finance and retirement dilshad final
Basic finance and retirement dilshad finalBasic finance and retirement dilshad final
Basic finance and retirement dilshad final
 
My Target Audience
My Target AudienceMy Target Audience
My Target Audience
 
Ir presentation
Ir presentationIr presentation
Ir presentation
 
BFI Trip Notes
BFI Trip NotesBFI Trip Notes
BFI Trip Notes
 
A2 media coursework
A2 media courseworkA2 media coursework
A2 media coursework
 
Analysis Of Magazine Posters and Digipaks
Analysis Of Magazine Posters and DigipaksAnalysis Of Magazine Posters and Digipaks
Analysis Of Magazine Posters and Digipaks
 
Star Construction
Star ConstructionStar Construction
Star Construction
 
ブロフェス2014 タムカイ ブログを捨てよ、町へ出よう 〜ハッピーラクガキライフの場合〜
ブロフェス2014 タムカイ ブログを捨てよ、町へ出よう 〜ハッピーラクガキライフの場合〜ブロフェス2014 タムカイ ブログを捨てよ、町へ出よう 〜ハッピーラクガキライフの場合〜
ブロフェス2014 タムカイ ブログを捨てよ、町へ出よう 〜ハッピーラクガキライフの場合〜
 
Evaluation Question 4
Evaluation Question 4Evaluation Question 4
Evaluation Question 4
 
Top industry Producers
Top industry ProducersTop industry Producers
Top industry Producers
 
Audience Feedback on Final Cut
Audience Feedback on Final CutAudience Feedback on Final Cut
Audience Feedback on Final Cut
 
Creativity in AS piece
Creativity in AS pieceCreativity in AS piece
Creativity in AS piece
 
What would be the media audience for your media product?
What would be the media audience for your media product?What would be the media audience for your media product?
What would be the media audience for your media product?
 
Technology and society
Technology and societyTechnology and society
Technology and society
 
Conventions of Opening Title Sequences
Conventions of Opening Title SequencesConventions of Opening Title Sequences
Conventions of Opening Title Sequences
 
figures of speech
figures of speechfigures of speech
figures of speech
 
Brand Chant
Brand ChantBrand Chant
Brand Chant
 
My Music Video's Institution
My Music Video's InstitutionMy Music Video's Institution
My Music Video's Institution
 
Representation Of Women
Representation Of WomenRepresentation Of Women
Representation Of Women
 

Similar to MVC

Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)Shubham Goenka
 
Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Jennie Gajjar
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxWhat Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxQuickwayInfoSystems3
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxWhat Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxQuickwayInfoSystems3
 
Architectural Design & Patterns
Architectural Design&PatternsArchitectural Design&Patterns
Architectural Design & PatternsInocentshuja Ahmad
 
Android DesignArchitectures.pptx
Android DesignArchitectures.pptxAndroid DesignArchitectures.pptx
Android DesignArchitectures.pptxSafnaSaff1
 
Pattern oriented architecture for web based architecture
Pattern oriented architecture for web based architecturePattern oriented architecture for web based architecture
Pattern oriented architecture for web based architectureshuchi tripathi
 
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...CrimsonpublishersPRSP
 
Web engineering - MVC
Web engineering - MVCWeb engineering - MVC
Web engineering - MVCNosheen Qamar
 
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and WorkingIRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and WorkingIRJET Journal
 
An overview of microsoft mvc dot net
An overview of microsoft mvc dot netAn overview of microsoft mvc dot net
An overview of microsoft mvc dot netneha sharma
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the informationToushik Paul
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCAnton Krasnoshchok
 
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-9AHM Pervej Kabir
 
Interaction-Oriented Architecture.pptx
Interaction-Oriented Architecture.pptxInteraction-Oriented Architecture.pptx
Interaction-Oriented Architecture.pptxGodwin Monserate
 

Similar to MVC (20)

Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)
 
Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01
 
Design Pattern
Design PatternDesign Pattern
Design Pattern
 
Design pattern
Design patternDesign pattern
Design pattern
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxWhat Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxWhat Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
 
MVC
MVCMVC
MVC
 
Architectural Design & Patterns
Architectural Design&PatternsArchitectural Design&Patterns
Architectural Design & Patterns
 
Android DesignArchitectures.pptx
Android DesignArchitectures.pptxAndroid DesignArchitectures.pptx
Android DesignArchitectures.pptx
 
Pattern oriented architecture for web based architecture
Pattern oriented architecture for web based architecturePattern oriented architecture for web based architecture
Pattern oriented architecture for web based architecture
 
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
 
Web engineering - MVC
Web engineering - MVCWeb engineering - MVC
Web engineering - MVC
 
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and WorkingIRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
 
An overview of microsoft mvc dot net
An overview of microsoft mvc dot netAn overview of microsoft mvc dot net
An overview of microsoft mvc dot net
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the information
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
MVC - In Details
MVC - In DetailsMVC - In Details
MVC - In Details
 
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
 
Interaction-Oriented Architecture.pptx
Interaction-Oriented Architecture.pptxInteraction-Oriented Architecture.pptx
Interaction-Oriented Architecture.pptx
 
MVC.pptx
MVC.pptxMVC.pptx
MVC.pptx
 

Recently uploaded

WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
WSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 

Recently uploaded (20)

WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in Uganda
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid Environments
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - Kanchana
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 

MVC

  • 1. MVC Reducing software project failures by design pattern(MVC) Prepared By : Iman Mehmandoust
  • 2. Contents • MVC Definition • MVC Example • Model • View • Controller • Software Failures • Why MVC? • Clarity of design • Efficient modularity • Multiple views • Powerful user interfaces • Ease of growth Tuesday, June 9, 2015
  • 3. Definition • The Model-View-Controller (MVC) pattern, originally formulated in the late 1970s • MVC is an architectural pattern used in software engineering. • MVC is a software design pattern that separates application logic from presentation. In this case MVC has a front-end developer and a back-end developer to work with the same system without interfering or editing there files by their permeations • The MVC pattern is most commonly used to create interfaces for software applications, and, as the name implies, consists of three elements:(Model View Controller) Tuesday, June 9, 2015
  • 4. • The pattern’s title is a collation of its three core parts: Model, View, and Controller. A visual representation of a complete and correct MVC pattern looks like the following diagram: Tuesday, June 9, 2015
  • 5. Model • The Model represents your data structures. Typically your model classes will contain functions that help you retrieve, insert, and update information in your database. Tuesday, June 9, 2015
  • 6. View • The View is the information that is being presented to a user. A View will normally be a web page, but in CodeIgniter, a view can also be a page fragment like a header or footer. It can also be an RSS page, or any other type of "page". Tuesday, June 9, 2015
  • 7. Controller • The Controller serves as an intermediary between the Model, the View, and any other resources needed to process the HTTP request and generate a web page Tuesday, June 9, 2015
  • 8. Example: A simple way to think of this would be to consider the following: • A user interacts with the view - by clicking on a link or submitting a form. • The Controller handles the user input, and transfers the information to the model • The Model receives the information and updates it's state (adds data to a database or database interaction, or perform complex calculation for example, calculates todays date) • The View checks the state of the Model and responds accordingly to the requester or user (listing the newly entered data, maybe) • The View waits for another interaction from the user. Tuesday, June 9, 2015
  • 9. Software Failures • Difficult to use the data outside that object. • Hard to use multiple views of the same data. • Difficult to synchronize multiple view of the same data. • Hard to change the UI, when UI and data are locked in the same object. Tuesday, June 9, 2015
  • 10. Why MVC? Just by breaking the program down into the three MVC components, one gains many advantages. These are the most significant ones I've found through my own experience: • Clarity of design: the public methods in the model stand as an API for all the commands available to manipulate its data and state. this trait makes the entire program easier to implement and maintain. • Efficient modularity: Changes to one aspect of the program aren't coupled to other aspects, eliminating many nasty debugging situations. Also, development of the various components can progress in parallel, once the interface between the components is clearly defined. Tuesday, June 9, 2015
  • 11. • Multiple views: the application can display the state of the model in a variety of ways, and create/design them in a scalable, modular way. This comes up in games, with a cockpit and a radar view, and in my research applications, where I have a view to display the state of the model and another view that collects data, calculates statistics, then to saves the data to disk. Both views are using the same data, they just use the information differently. During the development process, I usually start out with a text based view, which just prints out the data that the model is generating. Later, as I create new views, I can use the text based view to verify the performance of the new views. • Powerful user interfaces: using the model's API, the user interface can combine the method calls when presenting commands to the user. Macros can be seen as a series of "standard" commands sent to the model, all triggered by a single user action. This allows the program to present the user with a cleaner, friendlier interface. Tuesday, June 9, 2015
  • 12. • Ease of growth: controllers and views can grow as the model grows; and older versions of the views and controllers can still be used as long as a common interface is maintained (the text view just mentioned is an example). For instance, if an application needs two types of users, regular and administrator, they could use the same model, but just have different controller and view implementations. This is related to the similarity with the client/server architecture - where the new views and servers are analogous to the clients. Tuesday, June 9, 2015
  • 13. References • Definition of MVC: https://ellislab.com/codeigniter/user-guide/overview/mvc.html • MVC Advantages: http://cristobal.baray.com/indiana/projects/mvc2.html • E-Book Model-View-Controller: A Design Pattern for Software June 2004 Tuesday, June 9, 2015