1 / 13

Week 8, Class 3: Model-View-Controller

Week 8, Class 3: Model-View-Controller. Get ready for poll everywhere (teams) Quiz tomorrow Model-View-Controller Finish Simon Proxy Pattern Final Exam Preparation Final: Monday 8:00 - 10:00 AM - S359 2014 (Web wrong so far). Simon Concluded Implementing Simon. Model

ronnie
Download Presentation

Week 8, Class 3: Model-View-Controller

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. Week 8, Class 3:Model-View-Controller • Get ready for poll everywhere (teams) • Quiz tomorrow • Model-View-Controller • Finish Simon • Proxy Pattern • Final Exam Preparation • Final: • Monday 8:00 - 10:00 AM - S359 2014 • (Web wrong so far) SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder

  2. Simon ConcludedImplementing Simon • Model • Maintaining scores • Simon’s count • Player’s count • View • Playing sounds • Loading sounds • Controller • Initiating sounds • Playing the sequence SE-2811 Dr.Yoder

  3. The Proxy Pattern has many variations, but in general: The Proxy Pattern uses an proxy object as a surrogate (aka stand-in or placeholder) that acts like another object When might you do this? SE-2811 Dr. Mark L. Hornick

  4. SE-2811 Dr. Josiah Yoder

  5. Generic Proxy Pattern: A Client programs to a Subject, which may be a RealSubject or a Proxy SE-2811 Dr. Mark L. Hornick

  6. The Stub Proxy is a (temporary) placeholder for the Real Subject Sometimes the Real Subject is not available • For example: still under development The Stub Proxy can provide implementation of the Subject interface to varying degrees: • Just enough to compile without error • To allow rudimentary Subject functionality • To provide a complete emulation of the RealSubject

  7. Stub Proxy – the Real Subject emulator SE-2811 Dr. Mark L. Hornick

  8. The Protection Proxy controls access to a resource (the Real Subject) that is restricted by access rights The Protection Proxy provides predefined access to certain functionality implemented by the Real Subject, but • Purposely limited by the access rights builtinto the Protection Proxy • For example, the ability to query (but not modify) a protected database

  9. The Protection Proxy limits access to the Real Subject ProtectionProxy SE-2811 Dr. Mark L. Hornick

  10. The Virtual Proxy controls access to a resource (the Real Subject) that is expensive to create or use The Virtual Proxy provides access to all of the functionality implemented by the Real Subject, but • More quicky/cheaply • Acts as a surrogate until the Real Subject becomes available

  11. The Virtual Proxy provides all functionality of the Real Subject The Virtual Proxy controls access to the Real Subject, and is oftenresponsible for creation of the Real Subject SE-2811 Dr. Mark L. Hornick

  12. The Remote Proxy provides local access to a remote resource (the Real Subject) The Remote Proxy handles the details of accessing a remote resource • Remote Access can be implemented in many different ways, using different communication protocols • Simple sockets • Remote Method Invocation • HTTP-based (e.g. web-services) • …

  13. The Remote Proxy allows the Client to think it is accessing a local resource SE-2811 Dr. Mark L. Hornick

More Related