Introduction to Design Patterns. Questions What is a design pattern? Who needs design patterns? How different are classes and objects in APL compared.

Slides:



Advertisements
Similar presentations
Welcome to. Who am I? A better way to code Design Patterns ???  What are design patterns?  How many are there?  How do I use them?  When do I use.
Advertisements

18-1 Verifying Object Behavior and Collaboration Role playing – the act of simulating object behavior and collaboration by acting out an object’s behaviors.
Patterns Reusable solutions to common object-oriented programming problems When given a programming problem, re-use an existing solution. Gang of Four.
Dept. of Computer Engineering, Amirkabir University of Tech. 1 Design Patterns Dr. Noorhosseini Introduction.
IEG3080 Tutorial 7 Prepared by Ryan.
Design Patterns CS is not simply about programming
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.
DESIGN PATTERNS Redesigning Applications And
Design Patterns Module Name - Object Oriented Modeling By Archana Munnangi S R Kumar Utkarsh Batwal ( ) ( ) ( )
Katie C. O’Shea Dennis T. Tillman 11 February 2K2 Flyweight.
CERN – European Organization for Nuclear Research GS Department – Administrative Information Services Design Patterns in Groovy Nicolas Décrevel Advanced.
Software Design Patterns Anton Danshin Moscow Institute of Physics and Technology Dolgoprudny
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
Vrije Universiteit amsterdamPostacademische Cursus Informatie Technologie Idioms and Patterns polymorphism -- inheritance and delegation idioms -- realizing.
Design Patterns Standardized Recurring model Fits in many location Opposite of customization Fundamental types of pattern Choose and use as desired and.
Software Waterfall Life Cycle Requirements Construction Design Testing Delivery and Installation Operations and Maintenance Concept Exploration Prototype.
05 - Patterns Intro.CSC4071 Design Patterns Designing good and reusable OO software is hard. –Mix of specific + general –Impossible to get it right the.
CSSE 374: Introduction to Gang of Four Design Patterns
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Design Patterns in Java Chapter 1 Introduction Summary prepared by Kirk Scott 1.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
DESIGN PATTERNS CSC532 Adv. Topics in Software Engineering Shirin A. Lakhani.
18 April 2005CSci 210 Spring Design Patterns 1 CSci 210.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
Object Oriented Software Engineering Chapter 16 and 17 review 2014/06/03.
Design Patterns CS 124 Reference: Gamma et al (“Gang-of-4”), Design Patterns.
Testing Extensible Design Patterns in OO Frameworks through Scenario Templates D.S. Sanders Software Verification & Validation.
Methods: Deciding What to Design In-Young Ko iko.AT. icu.ac.kr Information and Communications University (ICU) iko.AT. icu.ac.kr Fall 2005 ICE0575 Lecture.
ECE450S – Software Engineering II
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
Creational Patterns
What to know for the exam. Smalltalk will be used for questions, but there will not be questions about the grammar. Questions might ask – how particular.
Proxy.
FACTORY METHOD. Design Pattern Space Purpose ScopeCreationalStructuralBehavioral ClassFactory MethodAdapterInterpreter Template Method ObjectAbstract.
Behavioral Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
CS616: Software Engineering Spring 2009 Design Patterns Sami Taha.
© 2011 Autodesk Popular Design Patterns and How to Implement Them in.NET Gopinath Taget Senior Developer Consultant.
Software Design Patterns Curtsy: Fahad Hassan (TxLabs)
Design Patterns. 1 Paradigm4 Concepts 9 Principles23 Patterns.
Design Patterns Introduction
Introduction to Patterns. Introduction to Patterns Pattern: Webster definition of Pattern: Something regarded as a normative example to be copied.
Design Patterns SE464 Derek Rayside images from NetObjectives.com & Wikipedia.
Java Design Patterns Java Design Patterns. What are design patterns? the best solution for a recurring problem a technique for making code more flexible.
Five Minute Design Patterns Doug Marttila Forest and the Trees May 30, 2009 Template Factory Singleton Iterator Adapter Façade Observer Command Strategy.
PROTOTYPE. Design Pattern Space Purpose ScopeCreationalStructuralBehavioral ClassFactory MethodAdapterInterpreter Template Method ObjectAbstract factory.
7 April 2004CSci 210 Spring Design Patterns 2 CSci 210.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
Design Patterns Spring 2017.
The Object-Oriented Thought Process Chapter 15
Chapter 10 Design Patterns.
Chapter 5:Design Patterns
Software Design Patterns
MPCS – Advanced java Programming
Introduction to Design Patterns
Common Design Patterns
Design Patterns Lecture part 2.
Introduction to Design Patterns
How to be a Good Developer
Design Patterns with C# (and Food!)
object oriented Principles of software design
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2005 Instructor: Patrice Chalin.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
How to be a Good Developer
Software Engineering Lecture 7 - Design Patterns
Design Patterns in Game Design
Chapter 8, Design Patterns Singleton
CIS 644 Tues. Nov. 30, 1999 W15A … patterns.
Chapter 8, DesignPatterns Facade
Presentation transcript:

Introduction to Design Patterns

Questions What is a design pattern? Who needs design patterns? How different are classes and objects in APL compared to the rest of the world? How different are patterns in APL?

What are design patterns? Design patterns are solution templates for frequently occurring problems. This term is widely applied to the design of Objects and their relations with each other.

Who needs design patterns? The only classes in my first application using Object Oriented programming where static classes. If you are in the same boat why do we need Object Orientation at all.

How different are classes and objects in APL? Type less nature of variables/objects – Type of variable is defined at the runtime.. State full nature of workspace – workspace at every point in time has preexisting state. Something else …

Effect of type-less nature on classes/objects Strong typing of results helps resolving data type compatibility problems at a time of compilation. Absence of strong typing gives flexibility for developers at implementation time, but may cause type compatibility issues at a runtime. Properties/fields and method’s results of classes are not strongly typed. As we will see it may be good or bad

Effect of state full workspace on classes State of class is defined by static members (fields, properties) of class (State of object is defined by dynamic members) State full nature of workspace may be described as the fact that at every point in time workspace is continuation of previous work rather then start from scratch. Static members are assigned at the time of class initialization. And may already change several times during test run before workspace will be saved. So application will start with static members which comes not from class definition but from intermediate state prior workspace saving.

Creational patterns Singleton Abstract Factory Factory Method Prototype Builder

Structural Patterns Adapter Bridge Composite Decorator Façade Flyweight Proxy

Behavioral patterns Chain of Responsibility. Command Interpreter Iterator Mediator Memento Observer State Strategy Template Method Visitor

Singleton Definition: Singleton is a class of which only a single instance may exist at every given time. Features: 1.Provide alternative mechanism for object creation. 2.Prevent regular object creation.

Singleton Possible use: 1.Load Balancers 2.Configuration class 3.Access to the object pool 4.Iterators 5.…

Prototype Definition: Create an object by copying existing rather then using []NEW. Features: 1.Utilize cloning of objects as alternative way to create instance instead of regular object creation. 2.No need to prevent regular object creation.

Prototype Possible use: 1.Classes with time and resource consuming initialization process

Abstract Factory Definition: Creates a series of objects without specifying object class. Features: 1.Need for interface structure defined. 2.Need for multiple interface implementations

Abstract Factory Note: It is more relevant to the strongly typed world as strong typing puts limitations, which this pattern trying to resolve. Possible use: 1. Tools which operate/generate different classes with the same interface

Adapter Definition: Creates an interface representing another interface/class. Features: 1.Need for interface structure defined. 2.Need for multiple interface implementations

Adapter Definition: Creates an interface to represent another interface/class. Features: 1.Allows encapsulation of class behavior.

Proxy Definition: Creates an interface representing another interface/class. Features: 1.Need for interface structure defined. 2.Need for multiple interface implementations