Design Patterns - Model View Controller

Software Engineering
1.0x

Design Patterns - Model View Controller

Created 3 years ago

Duration 0:02:14
lesson view count 457
Select the file type you wish to download
Slide Content
  1. Design Patterns: Model View Controller

    Slide 1 - Design Patterns: Model View Controller

    • Emerson Murphy-Hill
  2. Model-View-Controller (MVC)

    Slide 2 - Model-View-Controller (MVC)

    • MVC Pattern: Isolates business or domain logic from the input and presentation
    • Can focus testing on the individual pieces
    • Model: behavior and data underlying the application
    • Provides data about state requested from the view (notifies the view)
    • Updates state when requested by the controller
    • Model abstracts and encapsulates the underlying data storage (DB, POJOs, etc.)
    • View: UI
    • A model may have many views
    • View is a composite of elements
    • Controller: receives input and initiates response by calling model
    • Strategy for the view
  3. MVC in Web Apps (like iTrust)

    Slide 3 - MVC in Web Apps (like iTrust)

    • View: HTML or XHTML
    • Generated by JSPs
    • Controller:
    • Action classes
    • Pass user input to model
    • Handle exceptions
    • Model: underlying domain logic
    • Beans and DAOs encapsulate the database