Model view controller related patterns
Download
1 / 12

Model-View-Controller Related Patterns - PowerPoint PPT Presentation


  • 64 Views
  • Uploaded on

Model-View-Controller Related Patterns. Kirk Scott. This is an introductory unit. These are the units/chapters belonging to this section of the course: Unit 30, Observer, book chapter 9 Unit 31, Memento, book chapter 19.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Model-View-Controller Related Patterns' - seamus


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Model view controller related patterns

Model-View-Controller Related Patterns

Kirk Scott


  • This is an introductory unit.

  • These are the units/chapters belonging to this section of the course:

  • Unit 30, Observer, book chapter 9

  • Unit 31, Memento, book chapter 19



Observer
Observer of patterns

  • Book definition: The intent of the Observer pattern is to define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified so that they can react to the change.


  • Comment mode on: of patterns

  • Think back to the topics of listeners and multicasting in CS 202

  • Not only can code be written to respond to external events

  • Code can also be written so that objects respond to changes in other objects within an application


Memento
Memento of patterns

  • Book definition:

  • The intent of the Memento pattern is to provide storage and restoration of an object’s state

  • Comment mode on:

  • This turns out to be as straightforward as the definition seems to imply


In summary
In Summary of patterns

  • In a sense, the observer is the heart of the MVC pattern

  • An observer is that part of an application that makes it responsive to events, whether internal or ultimately driven by things that happen externally


  • At first glance, you may wonder why I have put the memento pattern with observer

  • My idea is that the memento is based on the concept of saving the model and restoring the model and view for an application

  • You don’t have to use memento with observer—but memento deals with some of the same application components as observer



The end
The End pattern


ad