l9 - CS 290C: Formal Models for Web Software Lecture 9: MVC...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 290C: Formal Models for Web Software Lecture 9: MVC Architecture and Navigation Analysis Based on the MVC Architecture Instructor: Tevfik Bultan
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Model-View-Controller (MVC) Architecture MVC is a design structure for separating representation from presentation using a subscribe/notify protocol The basic idea is to separate where and how data (or more generally some state) is stored, i.e., the model from how it is presented, i.e., the views Follows basic software engineering principles: Separation of concerns Abstraction
Background image of page 2
Model-View-Controller (MVC) Architecture MVC consists of three kinds of objects Model is the application object View is its screen presentation Controller defines the way the user interface reacts to user input a=50% b=30% c=20% model views
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Model-View-Controller (MVC) Architecture MVC decouples views and models by establishing a subscribe/notify protocol between them whenever model changes it notifies the views that depend on it in response each view gets an opportunity to update itself This architecture allows you to attach multiple views to a model it is possible to create new views for a model without rewriting it
Background image of page 4
Model-View-Controller (MVC) Architecture Taken at face value this may be seen as an architecture for user interface design It is actually addresses a more general problem: decoupling objects so that changes to one can affect any number of others without requiring the changed object to know the details of the others This is called Observer pattern in the design patterns catalog Observer pattern is a design pattern that is used as part of the Model-View-Controller (MVC) architecture to handle notification of multiple views that depend on a single model
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
A Brief Overview of Design Patterns Think about the common data structures you learned Trees, Stacks, Queues, etc. These data structures provide a set of tools on how to organize data Probably you implement them slightly differently in different projects
Background image of page 6
A Brief Overview of Design Patterns Main concepts about these data structures, such as how to store them manipulation algorithms are well understood You can easily communicate these data structures to another software developer by just stating their name Knowing them helps you when you are dealing with data organization in your software projects Better than re-inventing the wheel
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the question: Are there common ideas in architectural design of software that we can learn (and give a name to) so that We can communicate them to other software developers We can use them in architectural design in a lot of different contexts (rather than re-inventing the wheel) The answer is yes according to E. Gamma, R. Helm, R. Johnson, J. Vlissides
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/27/2011 for the course CMPSC 290h taught by Professor Chong during the Fall '09 term at UCSB.

Page1 / 38

l9 - CS 290C: Formal Models for Web Software Lecture 9: MVC...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online