Computer Science 313 – Advanced Programming Topics.

Slides:



Advertisements
Similar presentations
18-1 Verifying Object Behavior and Collaboration Role playing – the act of simulating object behavior and collaboration by acting out an object’s behaviors.
Advertisements

Computer Science 313 – Advanced Programming Topics.
C15: Design Patterns Gamma,Helm,Johnson,Vlissides (GOF)
Computer Science 313 – Advanced Programming Topics.
PATTERNS -STRUCTURAL PATTERNS WATTANAPON G SUTTAPAK Software Engineering, School of Information Communication Technology, University of PHAYAO 1.
CSE116: Introduction to Computer Science 2 Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
Bridge The decoupling of abstraction and implementation.
Design Patterns. What are design patterns? A general reusable solution to a commonly occurring problem. A description or template for how to solve a problem.
March Ron McFadyen1 Design Patterns In software engineering, a design pattern is a generally repeatable solution to a commonly-occurring problem.
Fall 2009ACS-3913 R. McFadyen1 Polymorphism Indirection Pure Fabrication Protected Variations (Law of Demeter) More GRASP Patterns.
Design Patterns Part IV (TIC++V2:C10) Yingcai Xiao 10/01/08.
Algorithm Programming Structural Design Patterns Bar-Ilan University תשס " ו by Moshe Fresko.
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
Generics, Proxy, and The Compile Time Type Checking Debate You are either with us or against us. Please snarf the code for today’s class.
Proxy Design Pattern Source: Design Patterns – Elements of Reusable Object- Oriented Software; Gamma, et. al.
Client/Server Software Architectures Yonglei Tao.
CSC 313 – Advanced Programming Topics. Why Recurse?  Recursion is useful, powerful technique  Often yields compact, easy-to-read code  Highlights all.
CS 106 Introduction to Computer Science I 04 / 13 / 2007 Friday the 13 th Instructor: Michael Eckmann.
1 Dept. of Computer Science & Engineering, York University, Toronto CSE3311 Software Design Adapter Pattern Façade pattern.
Smart Reference Proxy Provides additional actions whenever an object is referenced (e.g., counting the number of references to the object) Firewall Proxy.
ADAPTER PATTERN BY Sravanthi Karumanchi. Structure Pattern Structure patterns are concerned with how classes and objects are composed to form large structures.
Lists and More About Strings CS303E: Elements of Computers and Programming.
Computer Science 313 – Advanced Programming Topics.
1 Ivan Marsic Rutgers University LECTURE 18: Design Patterns Command, Decorator, State, Proxy.
Prof. Hertz (as told by xkcd.com)‏. Computer Science 313 – Advanced Programming Topics.
Albert Einstein Two things are infinite: the universe & human stupidity; and I'm not sure about the universe.
CSC 313 – Advanced Programming Topics. Design Pattern Intent  Each design pattern is a tool  Like all tools, have reason for being.
18 April 2005CSci 210 Spring Design Patterns 1 CSci 210.
Object Oriented Software Engineering Chapter 16 and 17 review 2014/06/03.
Lesson 4: Lesson 4: Integers (Group Lesson) Per 3, 5: 10/1/15 Per 2, 4, 6: 10/2/15.
More Design Patterns Horstmann ch.10.1,10.4. Design patterns Structural design patterns –Adapter –Composite –Decorator –Proxy Behavioral design patterns.
Génie logiciel Software Engineering Summary C. Petitpierre.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns V More Structural Patterns.
Title Carolina First Steering Committee October 9, 2010 Online Voting System Design Yinpeng Li and Tian Cao May 3, 2011.
Producing Data: Toward Statistical Inference PSBE Chapters 3.3 © 2011 W.H. Freeman and Company.
Creational Patterns
CSC 313 – Advanced Programming Topics. What Is the Factory Method?  Creation details hidden by AbstractCreator  Does effective job of limiting concrete.
Computer Science 313 – Advanced Programming Topics.
CSC 313 – Advanced Programming Topics. Strategy Pattern Usage public class RubberDuck extends Duck { FlightBehavior flyBehavior; QuackBehavior quackBehavior;
Proxy, Observer, Symbolic Links Rebecca Chernoff.
08 - StructuralCSC4071 Structural Patterns concerned with how classes and objects are composed to form larger structures –Adapter interface converter Bridge.
Structural Patterns1 Nour El Kadri SEG 3202 Software Design and Architecture Notes based on U of T Design Patterns class.
Proxy.
Proxy Design Pattern By:Diksha Agarwal.
Class & Object Adapter Patterns (with a focus on Class Adapter) Tim Gutowski CSPP 51023, Winter 2008.
CS212: Object Oriented Analysis and Design Lecture 38: Design Pattern-II.
Design Patterns Introduction
Adapter and Façade Patterns By Wode Ni and Leonard Bacon-Shone.
Advanced Object-oriented Design Patterns Creational Design Patterns.
Proxy Pattern defined The Proxy Pattern provides a surrogate or placeholder for another object to control access to it by creating a representative object.
The Proxy Pattern (Structural) ©SoftMoore ConsultingSlide 1.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Broker Design Patterns: Adapters and Proxy.
Computer Science 313 – Advanced Programming Topics.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
XuanTung Hoang 1 Something to discuss Feedbacks on Midterm Exam Final exam and term project  Final exam requires solid knowledge/skills in Java  Be more.
Design Patterns Lecture part 2.
Section 11.1 Class Variables and Methods
Chapter 9 Pointers Objectives
Adapter Pattern 1.
O.
Informatics 122 Software Design II
Design Patterns Part 2: Factory, Builder, & Memento
Structural Patterns: Adapter and Bridge
4-2 Functions in C In C, the idea of top–down design is done using functions. A C program is made of one or more functions, one and only one of which.
Adapter Design Pattern
Informatics 122 Software Design II
Adapter Pattern Jim Fawcett
Adapter Pattern Jim Fawcett
GoF Patterns Ch. 26.
Presentation transcript:

Computer Science 313 – Advanced Programming Topics

Why Do We Use Proxy Pattern?  Discussed word proxy in Friday's lecture  When and why would we ever use a proxy?

Real-World Uses of Proxy

Why We Use Proxy  Add level of indirection before real subject  Continue actions, but protect subject from harm  Create plausible deniability – "But it wasn't me!"  Get tasks done, but eliminate need to be local  Improve performance by using saved results  Same design needs met using Proxy Pattern  In all cases, proxy appears identical to real subject  Proxy acts first then lets subject do the real work  Real subject stays hidden – client does not know

Proxy versus… Adapter Proxy PatternAdapter Pattern

Proxy versus… Adapter Proxy PatternAdapter Pattern  Client thinks it does work  Uses interface client needs  Subject does all work  Interface identical to the real subjects  Does not change each calls' parameters & return value  Cannot access real subject  Client thinks it does work  Uses interface client needs  Adaptee(s) does all work  Interface differs with that of adaptee(s)  Modifies, adds or removes parameters & return value  Can access real subject

Proxy versus… Composite Proxy PatternComposite Pattern

Proxy versus… Composite Proxy PatternComposite Pattern  Structural pattern  Common interface defined  One of GoF's patterns  Only one subject used  Proxy acts as a gatekeeper  Structural pattern  Common interface defined  One of GoF's patterns  Many leaves can be used  Composite collects leaves

Proxy versus… Decorator Proxy PatternDecorator Pattern

Proxy versus… Decorator Proxy PatternDecorator Pattern  Client thinks it has subject  Hides subject from others  Proxy can intercept call  One proxy per pattern  Does not add or modify basic functionality  Client thinks has concept  Hides concept from others  Decorator can intercept call  Many decorators per pattern  Adds or modifies concept's basic functionality

Proxy versus… Observer Proxy PatternObserver Pattern

Proxy versus… Observer Proxy PatternObserver Pattern

For Next Class  Last lab due Friday at end of lab time  Start now == more committing acts against man & beast  Finish reading on our last design pattern  Lots of interesting code on Wednesday  Will be presenting many cool & useful hacks  Follow the white rabbit – going through the looking glass -----censored 'till tenure-----