0% found this document useful (0 votes)
11 views12 pages

Revision Week

The document discusses the Model-View-Controller (MVC) design pattern. MVC divides an application into three parts - the model manages the core data and logic, the view displays the data to the user, and the controller handles user input. This separation of concerns makes the application more modular and flexible. The observer pattern is used to update views when the model changes. MVC allows different views of the same data and configurable mapping of user actions to application functions.

Uploaded by

Prestigious
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views12 pages

Revision Week

The document discusses the Model-View-Controller (MVC) design pattern. MVC divides an application into three parts - the model manages the core data and logic, the view displays the data to the user, and the controller handles user input. This separation of concerns makes the application more modular and flexible. The observer pattern is used to update views when the model changes. MVC allows different views of the same data and configurable mapping of user actions to application functions.

Uploaded by

Prestigious
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

REVISION WEEK

LAUREN SCOTT AND GRAHAM SEXTON


MODEL VIEW CONTROLLER
Observer and Observable
MVC DESIGN PATTERN

• Name

• Model View Controller MVC


• Context

• MVC is an architectural pattern that is used when developing interactive application.


• Problem
• User interfaces change often and sometimes the same information is presented in
different ways.
• Business logic and entity classes are stable.
MVC DESIGN PATTERN

• Solution

• Use the software engineering principle of “separation of concerns” to divide the application
into three areas:

• Model encapsulates the core data and functionality


• View encapsulates the presentation of the data there can be many views of the
common data
• Controller accepts input from the user and makes request from the model for the data
to produce a new view.
MVC
• Each interface has it’s own
Controller and View pair that talk
to a standard model of the
Controller
system.
• Observer pattern is used to Model
respond to changes in the model.
• MVC does not have event View
handlers where as windows
Forms are controlled via event
handlers.
MVC ADVANTAGES

• Achieves “separation of concerns”


• Separating Controller from View (application behavior from presentation)
- permits run-time selection of appropriate
Views based on workflow, user preferences,
or Model state.

• Separating Controller from Model (application behavior from data


representation)
- allows configurable mapping of user actions
on the Controller to application functions on
CLASS DIAGRAMS
And program documentation
WHAT MAKES CLEAR CODE?

• Javadoc
• @param
• @return

• Clear variable names


• Commenting complex code
• Class diagram
TESTING
And test plans
For further information on automated testing please see Week 06 – well behaved objects
Test No. Type Purpose Pre-conditions Test Data Expected Result

Test No. Type Purpose Pre- Test Data Expected Actual Result
conditions Result

You might also like