1 / 12

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.

seamus
Download Presentation

Model-View-Controller Related Patterns

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Model-View-Controller Related Patterns Kirk Scott

  2. 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

  3. Although there are only two units, this is a significant set of patterns • Memento is pretty much a sideshow • The implementation of Observer in the Java API is the basis for the development of fully model-view-controller designs • The second homework assignment addresses this

  4. Observer • 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.

  5. Comment mode on: • 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

  6. Memento • 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

  7. In Summary • 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

  8. 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

  9. I don’t have any silly mnemonics for these patterns

  10. The End

More Related