ModelViewController - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

ModelViewController

Description:

One of the most common Design Patterns is Model-View-Controller (MVC) ... 10. The view displays the information in its own way. ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 7
Provided by: ahmedm4
Category:

less

Transcript and Presenter's Notes

Title: ModelViewController


1
Model-View-Controller
  • Ahmed Muaydh

2
MVC
  • One of the most common Design Patterns is
    Model-View-Controller (MVC)
  • It separates business, navigation and
    presentation logic
  • It is widely used in web-applications.
  • Example of MVC frameworks for web-applications
    Spring and Struts .

3
MVC Components
  • Model represents the application information. It
    is the data and the computation.
  • View represents the view to render the model
    (ex. Dynamic HTML, Swing, ...). The view can get
    results from the controller
  • Controller It is responsible for processing and
    responding to events.

4
How to works
5
A typical MVC task
1. The end user manipulates the view 2. The
user's actions are interpreted by the
view. 3. The view passes the interpreted
commands to the controller. 4. The controller
decides what should be done in a situation
like this. 5. According to its own intelligence
the controller makes the model act. 6. The
model acts independently. 7. After the model has
completed the tasks, the control returns to
the controller. It decides if the changes in
the model should cause changes in the view. 8.
If so, the controller gets all the information
needed from the model. 9. The controller passes
the information to the view. 10. The view
displays the information in its own way.
6
Advantages of MVC
  • One advantage is separation of concerns
  • Consequently, code is cleaner and easier to
    understand
  • Ease Maintenance Burden
  • Changes to business logic are less likely to
    break the presentation logic
  • Another big advantage is reusability
  • The same model used for a servlet can equally
    well be used for an application or an applet (or
    by another process
  • Facilitate Multi-team development
  • Developers can focus on business code and UI
    Designers can focus on building without worrying
    about the code
Write a Comment
User Comments (0)
About PowerShow.com