CPSC 410.  Build on previous Connector lectures  Learn how to implement flexible connector implementations  Learn the Dependency Injection pattern.

Slides:



Advertisements
Similar presentations
Chapter 3: The Decorator Pattern
Advertisements

Message Forwarding Semi-automatic proxy delegation.
Advanced Programming in Java
Sadegh Aliakbary Sharif University of Technology Fall 2010.
DESIGN PATTERNS OZGUR RAHMI DONMEZ.
 Consists of Creational patterns  Each generator pattern has a Client, Product, and Generator.  The Generator needs at least one operation that creates.
2 Object-Oriented Analysis and Design with the Unified Process Objectives  Explain how statecharts can be used to describe system behaviors  Use statecharts.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
A Switch For Network Behavior Study Hadar Vitaly Udi
Design Patterns Module Name - Object Oriented Modeling By Archana Munnangi S R Kumar Utkarsh Batwal ( ) ( ) ( )
Design Patterns academy.zariba.com 1. Lecture Content 1.What are Design Patterns? 2.Creational 3.Structural 4.Behavioral 5.Architectural 6.Design Patterns.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. The Factory Method Design Pattern (1) –A creational design.
Dependency Injection and Model-View-Controller. Overview Inversion of Control Model-View-Controller.
Design Patterns Standardized Recurring model Fits in many location Opposite of customization Fundamental types of pattern Choose and use as desired and.
Singleton Christopher Chiaverini Software Design & Documentation September 18, 2003.
Design Patterns.
IAdaptable Interface and Its Usage Te-Hsin Shih 03/26/2013.
Creational Patterns (1) CS350, SE310, Fall, 2010.
ECE 452 / CS 446 / SE464 Design Patterns: Part 2 - Answers A Tutorial By Peter Kim Partially based on the tutorial by Michał Antkiewicz.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Advanced Programming Rabie A. Ramadan 7.
Factory Method A Creational Design Pattern. Factory Method Key Features  Defines an interface for creating objects without needing to know each object’s.
Design Pattern. The Observer Pattern The Observer Pattern defines a one-to-many dependency between objects so that when one object changes state, all.
Reviewing Recent ICSE Proceedings For:.  Defining and Continuous Checking of Structural Program Dependencies  Automatic Inference of Structural Changes.
The Factory Patterns SE-2811 Dr. Mark L. Hornick 1.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
Unit 4 Object-Oriented Design Patterns NameStudent Number CAI XIANGHT082182A KYAW THU LINHT082238Y LI PENGFEIHT082220L NAUNG NAUNG LATTHT082195L PLATHOTTAM.
Java Dynamic Proxy Bibliography: reflection/proxy.html
Génie logiciel Software Engineering Summary C. Petitpierre.
Define an interface for creating an object, but let subclasses decide which class to instantiate Factory Method Pattern.
CS 4233 Review Feb February Review2 Outline  Previous Business – My.wpi.edu contains all grades to date for course – Review and contact.
Define an interface for creating an object, but let subclasses decide which class to instantiate.
11 CORE Architecture Mauro Bruno, Monica Scannapieco, Carlo Vaccari, Giulia Vaste Antonino Virgillito, Diego Zardetto (Istat)
Reflecting Proxies Mini != Small Jon Babbage Tony Lambert Michael Malinak Paul Middlin CSE870 Advanced Software Engineering, Spring 2001 Instructor: Dr.
Slide 1 Extending Tuscany Raymond Feng Apache Tuscany committer.
Design Patterns Software Engineering CS 561. Last Time Introduced design patterns Abstraction-Occurrence General Hierarchy Player-Role.
Clotho in Kepler Help sharing Clotho’s awesomeness to the world Use scientific workflow to create, reuse, share and extend Clotho’s operations.
Slide 1 Extending Tuscany Raymond Feng Apache Tuscany committer.
Faculty Advisor – Dr. Suraj Kothari Client – Jon Mathews Team Members – Chaz Beck Marcus Rosenow Shaun Brockhoff Jason Lackore.
Inheritance Inheritance is the process of extending the functionality of a class by defining a new class that inherit,all the features of extending class.
Proxy Pattern defined The Proxy Pattern provides a surrogate or placeholder for another object to control access to it by creating a representative object.
Decorator Design Pattern Phillip Shin. Overview Problem Solution Example Key points.
CS 210 Proxy Pattern Nov 16 th, RMI – A quick review A simple, easy to understand tutorial is located here:
Reflections CSC207 – Software Design. Background Turing's great insight: programs are just another kind of data. Source code is text that is interpreted.
Plug-In Architecture Pattern. Problem The functionality of a system needs to be extended after the software is shipped The set of possible post-shipment.
Factory Method. Intent/Purpose Factory Method is used to deal with a problem of creating objects without specifying the EXACT class of object that we.
Facade Pattern Jim Fawcett CSE776 – Design Patterns Summer 2010
Design Patterns: MORE Examples
Advanced Programming in Java
Advanced Programming in Java
Factory Method Pattern
Software Design and Architecture
Factory Method Pattern
Facade Pattern Jim Fawcett CSE776 – Design Patterns Summer 2010
object oriented Principles of software design
Software Engineering Lecture 7 - Design Patterns
Kayra Hopkins Loretta Macklem
Frameworks And Patterns
Decorator Pattern Richard Gesick.
Interfaces.
Singleton design pattern
Advanced Programming in Java
CS 350 – Software Design Principles and Strategies – Chapter 14
CS 350 – Software Design Singleton – Chapter 21
Structural Patterns: Adapter and Bridge
Could Jiro™ Extend the Jini™ Pattern Lanuguage?
Designing For Testability
OOP Aga private institute for computer science 5th grade
Chapter 8, Design Patterns Introduction
Plug-In Architecture Pattern
Presentation transcript:

CPSC 410

 Build on previous Connector lectures  Learn how to implement flexible connector implementations  Learn the Dependency Injection pattern  Learn the basics of Java Reflection

 A methodology for software design to provide plugin-based extensibility  Each application class (i.e. domain type) refers to (depends on) other application classes only through interfaces  Classes use Factory to obtain references to dependencies

 Concrete types of interfaces are decided by configuration files  Allows the wrapper-oriented patterns to be applied at any time  Wrapper-oriented patterns: ◦ Decorator ◦ Adaptor ◦ Proxy ◦ …

 a class that provides methods which generally forwards responsibility for application- specific feature implementation to another object called the delegate  has a delegate  application-generic connector features are implemented by the delegator ◦ before forwarding to the delegate ◦ after forwarding to the delegate

 extends Delegator  implements the same interface as it’s delegate ◦ implements T where T is the type of the delegate  acts as a transparent layer where connector features can be inserted  example: AccountSecurityDecorator

 extends Delegator  implements a different interface as it’s delegate ◦ implements T where T is not the type of the delegate  mediates between connector differences of T and the delegate type  Example: AccountAdaptor

 implements some application type T  forwards responsibility for implementation of T over a network  example: AccountRemoteProxy

 Creates instances of an application type that are wrapped by any number of Delegators given in a configuration file  Provides plug-and-play connector features without changing source code  Forms the basis of extensibility features ◦ Eclipse Plugins ◦ Firefox plugins ◦ etc…  example: SimpleDependencyInjectionFactory

 the class for objects that represent Java classes  part of the Java Reflection API ◦ helps implements programs that work on programs ◦ forms the basis for meta-programming in Java static Class forName(String name) ◦ get an object representing the class called name Object newInstance() ◦ automagically calls the no-arg constructor for the class and returns a new instance of the class

 INPUT: ◦ A sequence of Java class names: C 0 … C n  PRE-CONDITION: ◦ forall(C i ): i < n C i is a delegator for C i+1  IMPLEMENTATION: ◦ Use java.lang.Class to instantiate all C and link delegators to delegates  OUTPUT: ◦ An instance of C 0