05/26/2004www.indyjug.net1 Indy Java User’s Group May 26 2004 Knowledge Services, Inc.

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

 Recent researches show that predicative programming can be used to specify OO concepts including classes, objects, interfaces, methods, single and multiple.
SE2811 Week 7, Class 2 The Gang of Four and more … Lab Thursday: Quiz SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder.
Plab – Tirgul 12 Design Patterns
Design Patterns for Object Oriented systems CSC 515 Ashwin Dandwate.
Design Patterns Yes, they are important Robert Cotton April 23, 2009.
Patterns Reusable solutions to common object-oriented programming problems When given a programming problem, re-use an existing solution. Gang of Four.
05/26/2004www.indyjug.net1 Indy Java User’s Group June Knowledge Services, Inc.
. Plab – Tirgul 12 Design Patterns. Design Patterns u The De-Facto Book on Design Patterns:
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.
James Tam Introduction To Design Patterns You will learn about design techniques that have been successfully applied to different scenarios.
Spring 2010CS 2251 Design Patterns. Spring 2010CS 2252 What is a Design Pattern? "a general reusable solution to a commonly occurring problem in software.
Design Patterns Based on Design Patterns. Elements of Reusable Object-Oriented Software. by E.Gamma, R. Helm, R. Johnson,J. Vlissides.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Design Patterns.
Design Patterns Module Name - Object Oriented Modeling By Archana Munnangi S R Kumar Utkarsh Batwal ( ) ( ) ( )
ECE 355 Design Patterns Tutorial Part 2 (based on slides by Ali Razavi) Presented by Igor Ivković
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Design Patterns Alan Shalloway, James Trott, Design Patterns Explained, Addison-Wesley, Gamma, Helm, Johnson, Vlissides, Design Patterns, Elements.
Design Patterns Trends and Case Study John Hurst June 2005.
Design Patterns.
Implementing Design Patterns Using Java St. Louis Java Special Interest Group Eric M. Burke Object Computing, Inc. Presented on July 9, 1998 (updated July.
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.
DaveAndAl.net Do Application Design Patterns Make Sense in ASP.NET? Alex Homer You may like to write these down now...
Aniruddha Chakrabarti
January 12, Introduction to Design Patterns Tim Burke References: –Gamma, Erich, et. al. (AKA, The Gang of Four). Design Patterns: Elements of Reusable.
Patterns in programming 1. What are patterns? “A design pattern is a general, reusable solution to a commonly occurring problem in software. A design.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 27. Review UML dynamic view – State Diagrams.
Y2 eProjects Session 4 – Advanced Topics. Objectives  Dynamic Models  Design Patterns (Optional)  Software testing (for S4) ACCP i7.1\Sem3_4\eProject\T4.
Indy Java User’s Group May 29, 2002 Sallie Mae 6:00p.m.
Behavioral Design Patterns Morteza Yousefi University Of Science & Technology Of Mazandaran 1of 27Behavioral Design Patterns.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
Design Patterns Introduction General and reusable solutions to common problems in software design SoftUni Team Software University
ECE450S – Software Engineering II
Patterns in programming1. 2 What are patterns? Answers to common design problems. A language used by developers –To discuss answers to design problems.
1 A Brief Introduction to Design Patterns Based on materials from Doug Schmidt 1.
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
CS 160: Software Engineering October 22 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
DESIGN PATTERNS COMMONLY USED PATTERNS What is a design pattern ? Defining certain rules to tackle a particular kind of problem in software development.
Design Patterns. 1 Paradigm4 Concepts 9 Principles23 Patterns.
CS251 – Software Engineering Lectures 18: Intro to DP Slides by Rick Mercer, Christian Ratliff, Oscar Nierstrasz and others 1 و ابتغ فيما آتاك الله الدار.
CS 210 Proxy Pattern Nov 16 th, RMI – A quick review A simple, easy to understand tutorial is located here:
Five Minute Design Patterns Doug Marttila Forest and the Trees May 30, 2009 Template Factory Singleton Iterator Adapter Façade Observer Command Strategy.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
Design Patterns: MORE Examples
Design Patterns: Brief Examples
Strategy Design Pattern
The Object-Oriented Thought Process Chapter 15
Chapter 10 Design Patterns.
Software Design Patterns
MPCS – Advanced java Programming
Introduction to Design Patterns
Design Patterns Lecture part 2.
Introduction to Design Patterns
Design Patterns Introduction
Design Patterns.
object oriented Principles of software design
Presented by Igor Ivković
Object Oriented Design Patterns - Structural Patterns
DESIGN PATTERNS : Introduction
Design Patterns Imran Rashid CTO at ManiWeber Technologies.
Chapter 8, Design Patterns Introduction
Composite Design Pattern By Aravind Reddy Patlola.
Presented by Igor Ivković
Presentation transcript:

05/26/2004www.indyjug.net1 Indy Java User’s Group May Knowledge Services, Inc.

05/26/2004www.indyjug.net2 Agenda Welcome / Pizza6:00-6:15 Announcements6:15-6:30 Design Patterns6:30-7:30 Wrap-up / QA7:30-8:00

05/26/2004www.indyjug.net3 Mission Statement Promote the use of the Java language and components across all levels of interest in the greater Indianapolis area, by serving as a resource for knowledge, experience and career opportunities.

05/26/2004www.indyjug.net4 Announcements Next Meeting - June 30, 2004 JINI - Scott Ganyo Discussion Forum Website

05/26/2004www.indyjug.net5 Tonight’s Objective De-Mystify Design Patterns Introduce Gang of Four Design Pattern Demonstrate Decorator and Strategy Offer invitation for application

05/26/2004www.indyjug.net6 Design Patterns Goals of design patterns Published design patterns (GofF) Elements of a design pattern Categories of the GofF design patterns

05/26/2004www.indyjug.net7 Design Patterns (Goal) “Capture solutions that have developed and evolved over time in a succinct and easily applied form.” “Systematically name, explain and evaluate an important and recurring design in object-oriented systems”

05/26/2004www.indyjug.net8 Design Patterns (Published) Gang of Four Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides Book Design Patterns: Elements of Reusable Object-Oriented Software ISBN Copyright 1995 by Addison Wesley, Inc.

05/26/2004www.indyjug.net9 Design Patterns (Elements-1) Pattern Name (handle) Higher level of abstraction Vocabulary Problem (context) Conditions that must be met before the pattern can be applied Describe class or object structures

05/26/2004www.indyjug.net10 Design Patterns (Elements-2) Solution (elements) Relationships Responsibilities Collaborations Consequences (trade-off) Flexibility Extensibility Portability

05/26/2004www.indyjug.net11 Design Patterns (Categories) Creational Patterns Factory Method, Singleton Structural Patterns Adapter, Decorator Behavioral Patterns Command, Iterator

05/26/2004www.indyjug.net12 Design Patterns (Creational) Creational design patterns abstract the instantiation process. They help make a system independent of how its objects are created, composed, and represented (Factory, Singleton)

05/26/2004www.indyjug.net13 Design Patterns (Structural) Structural design patterns are concerned with how classes and objects are composed to form larger structures. (i.e. Inheritance) (Adapter, Decorator)

05/26/2004www.indyjug.net14 Design Patterns (Behavioral) Behavioral design patterns are concerned with algorithms and the assignment of responsibilities between objects including the communication between them. (Command, Iterator)

05/26/2004www.indyjug.net15 Design Patterns (Example) Need to create a table model to view and modify system data information. Options Implement TableModel interface Utilize the AbstractTableModel class Utilize the DefaultTableModel class

05/26/2004www.indyjug.net16 Design Patterns (cont’d) Implement the TableModel interface Must declare all 9 methods including Management of listeners Column name resolution Class type for a given column Value at a given x,y coordinate Editable state for x,y coordinate Row and column counts

05/26/2004www.indyjug.net17 Design Patterns (cont’d) Utilize the AbstractTableModel class Must implement 3 methods Value at a given x,y coordinate Row counts Column counts All other values are handled or defaulted.

05/26/2004www.indyjug.net18 Design Patterns (cont’d) Utilize the DefaultTableModel class No methods to implement Additional API Ability to add a column Ability to insert and move rows Support for custom events

05/26/2004www.indyjug.net19 Design Patterns (Strategy) Defines a family of algorithms, encapsulate each one, and make them interchangeable. Allows the algorithm to vary independently from clients that use it. Interface implementation

05/26/2004www.indyjug.net20 Design Patterns (Utilization) Utilize by inheritance. Public class MyTableModel extends AbstractTableModel Utilization by decoration. Public class MyTableModel implements TableModel

05/26/2004www.indyjug.net21 Design Patterns (Decorator) Attach additional responsibilities to an object dynamically. Flexible alternative to subclassing by attaching responsibility at runtime. Also called Wrapper GofF example: Border and ViewText

05/26/2004www.indyjug.net22 Design Patterns (References) Decorator: Strategy: designpatterns_p.html Java Design Patterns Articles: “Why Extends is Evil”:

05/26/2004www.indyjug.net23 Design Patterns (Homework) The client has several legacy applications that are all stand-alone. They want a single point user interface to allow the user to navigate between the various apps. What design pattern could you use that would allow you to not have to give knowledge to each legacy app about the client and not have to hard code all the legacy systems into the client code?

05/26/2004www.indyjug.net24 Indy Java User’s Group Questions

05/26/2004www.indyjug.net25 Indy Java User’s Group

05/26/2004www.indyjug.net26 Indy Java User’s Group