SlideShare uma empresa Scribd logo
1 de 14
Baixar para ler 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

Mais conteúdo relacionado

Mais procurados

Mais procurados (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
 

Destaque

Evaluation Question 4
Evaluation Question 4Evaluation Question 4
Evaluation Question 4
danielbruce22
 
Top industry Producers
Top industry ProducersTop industry Producers
Top industry Producers
danielbruce22
 
Creativity in AS piece
Creativity in AS pieceCreativity in AS piece
Creativity in AS piece
danielbruce22
 
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 society
conchin_ddz
 
Conventions of Opening Title Sequences
Conventions of Opening Title SequencesConventions of Opening Title Sequences
Conventions of Opening Title Sequences
danielbruce22
 

Destaque (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
 

Semelhante a 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-phpapp01
Jennie Gajjar
 

Semelhante a 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
 

Último

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Último (20)

%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
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
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...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%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
 
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
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 

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