SlideShare uma empresa Scribd logo
1 de 26
Baixar para ler offline
Patterns…
A primer Overview
(… Only design patterns?...)
Pattern (Classic definition)
• A design pattern is a solution to a general design problem in the
form of a set of interacting classes that have to be customized to
create a specific design.
• Patterns and Pattern Languages are ways to describe best practices,
good designs, and capture experience in a way that it is possible for
others to reuse this experience (Hillside Group).
• A Pattern is a way to capture recurring designs in such a way that
others can readily acquire and use the knowledge and experience
(Erich Gamma)
Christopher Alexander - 1979…
• As an element in the world, each pattern is a relationship between
a certain context, a certain system of forces, which occurs
repeatedly in that context, and a certain spatial configuration,
which allows these to resolve themselves.
• As an element of language, a pattern is an instruction, which
shows how this spatial configuration can be used, over and
over again, to resolve the given system of forces, wherever the
context makes it relevant.
• The pattern is, in short, at the same time a thing, which happens in
the world, and the rule which tells us how to create that thing,
and when we must create it. It is both a process and a thing; both a
description of a thing which is alive, and a description of the process
which will generate that thing.
Pressman
• For software design, context allows the reader to
understand the environment in which the problem resides
and what solution might be appropriate within that
environment.
• A set of requirements, including limitations and
constraints, acts as a system of forces that influences
how the problem can be interpreted within its context and
how the solution can be effectively applied.
Design patterns give us templates!
Pressman, Roger S. Software engineering : a practitioner’s approach, Chapter 12.
Design patterns are grouped into categories
(From Pressman)
• Creational patterns focus on the “creation, composition,
and representation” of objects.
• Structural patterns focus on problems and solutions
associated with how classes and objects are organized
and integrated to build a larger structure.
• Behavioral patterns address problems associated with the
assignment of responsibility between objects and the
manner in which communication is effected between
objects.
Design patterns are grouped into categories
(From Pressman)
Design patterns are grouped into categories
Schach, Stephen
R. Object-Oriented
and Classical
Software
Engineering
An example
Sommerville, Ian.
SOFTWARE
ENGINEERING
Weaknesses of Design Patterns
(From Schach - Object-Oriented and Classical Software Engineering)
1.A major problem is that there is as yet no systematic way to determine
when and how to apply design patterns.
2.The use of the 23 standard design patterns in a software product may be
an indication that the language we are using is not powerful enough.
3.To obtain maximal benefit from design patterns, multiple interacting
patterns are employed. We do not yet have a systematic way of
knowing when and how to use one pattern, let alone multiple
interacting patterns.
4.When performing maintenance on a software product built using the
classical paradigm, it is essentially impossible to retrofit classes and
objects. It is similarly all but impossible to retrofit patterns to an existing
software product, whether classical or object oriented.
Retrofitting= addition of new technology or features to older systems
Weaknesses of Design Patterns
See http://blog.codinghorror.com/head-first-design-patterns/
Strengths of Design Patterns
(From Schach - Object-Oriented and Classical Software Engineering)
1.Design patterns promote reuse by solving a general
design problem. The reusability of a design pattern can be
enhanced by careful incorporation of features that can be
used to further enhance reuse, such as inheritance.
2.A design pattern provides high-level documentation of the
design, because patterns specify design abstractions.
3.Implementations of many design patterns exist. In such
cases, there is no need to code or document those parts of a
program that implement design patterns. (Testing of those
parts of the program is still essential, of course.)
Strengths of Design Patterns
(From Schach - Object-Oriented and Classical Software Engineering)
4. If a maintenance programmer is familiar with design
patterns, it will be easier to comprehend a program that
incorporates design patterns, even if he or she has never
seen that specific program before.
5. Research into automated detection of design patterns is
starting to produce results.
Design in Context (Pressman)
Most representative
question
(systematic way)
Design in Context (Shalloway & Trott approach)
In Design Patterns Explained (2005), Shalloway, A., and J. Trott suggest the
following approach that enables a designer to think in patterns:
1. Be sure you understand the big picture—the context in which the
software to be built resides. The requirements model should
communicate this to you.
2. Examining the big picture, extract the patterns that are present
at that level of abstraction.
3. Begin your design with “big picture” patterns that establish a context
or skeleton for further design work.
4. “Work inward from the context” looking for patterns at lower
levels of abstraction that contribute to the design solution.
5. Repeat steps 1 to 4 until the complete design is fleshed out.
6. Refine the design by adapting each pattern to the specifics of the
software you’re trying to build.
Pattern’s Table (Microsoft & Pressman)
Pressman, Roger S.
Software engineering : a
practitioner’s approach,
Chapter 12.
&
Microsoft, “Prescriptive
Architecture: Integration
and Patterns,” MSDN, May
2004, available at
http://msdn2.microsoft.com
/en-
us/library/ms978700.aspx.
Patterns & Abstraction
• Architecture Patterns.
• Business Patterns,
• Analysis Patterns.
• Data Patterns.
• SOA Patterns.
• UI Patterns.
• Implementation Patterns.
• Process Patterns
• …
Tree’ Source: http://aojajena.wordpress.com/tag/abstraction-level/
Some repositories
• The Hillside Group http://hillside.net/patterns/
• Portland Pattern Repository http://c2.com/ppr/index.html
• Pattern Index http://c2.com/cgi/wiki?PatternIndex
• UI Patterns Collections UI/HCI Patterns http://www.hcipatterns.org/tiki-
index.php
• Jennifer Tidwell’s UI patterns www.time-tripper.com/uipatterns/
• Mobile UI Design Patterns http://mobile-patterns.com/
• Pattern Language for UI Design
www.maplefish.com/todd/papers/Experiences.html
• UI Design Patterns www.cs.helsinki.fi/u/salaakso/patterns/
Specialized Design Patterns
• Aircraft Avionics http://g.oswego.edu/dl/acs/acs/acs.html
• Business Information Systems
www.objectarchitects.de/arcus/cookbook/
• Distributed Processing www.cs.wustl.edu/~schmidt/
• IBM Patterns for e-Business
http://www.ibm.com/developerworks/patterns/
• Yahoo! Design Pattern Library http://developer.yahoo.com/ypatterns/
• MSDN Library patterns & practices
http://msdn.microsoft.com/en-us/library/ff921345.aspx
Don’t forget the Antipatterns X-(
Whereas patterns describe a recurring problem
and its solution, antipatterns describe solutions
that have more negative consequences than
positive benefits. In effect, they describe
dysfunctional approaches to problem solving,
followed by the changes that should be made to
overcome this dysfunction.
Source: Phillip A. Laplante & Colin J. Neill. ANTIPATTERNS - Identification,
Refactoring, and Management. CRC Press, 2007.
See more in: http://www.antipatterns.com/briefing/index.htm
Paul Graham on Design Patterns
For example, in the OO world you hear a good deal about
“patterns”. I wonder if these patterns are not sometimes
evidence of case (c), the human compiler, at work. When I
see patterns in my programs, I consider it a sign of
trouble. The shape of a program should reflect only the
problem it needs to solve. Any other regularity in the code
is a sign, to me at least, that I’m using abstractions that
aren’t powerful enough— often that I’m generating by hand
the expansions of some macro that I need to write.
Paul Graham http://www.paulgraham.com/icad.html
For awakening
(From Paolo Ciancarini)
You are enhancing an existing application in a pizza shop.
The price of the pizza depends on the options selected by
the user. Each option carries a different additional price.
There are a large number of options available (ex: extra
cheese, type of crust, toppings and so on). Which is the
best pattern for design this context? Why?
For awakening
(From http://www.pm.inf.ethz.ch/education/courses/kse/archive/2011/exercises/DesignPatterns.pdf)
We want to implement a text paragraph. A paragraph is a sequence of lines. Each line is represented
by a string. The Paragraph class has to provide at least the
following methods:
List<String> alignedText(); // Returns the list of formatted lines in the paragraph.
String getLine(int i ); // Returns the line at the ith position .
int getCountLines(); // Returns the number of lines in the paragraph.
void addLine(String s); // Appends a line to the paragraph.
The formatting algorithm (e.g., left-align or centered) can be selected at runtime. It also has to be
possible to add new formatting algorithms to the program without
modifying the Paragraph class.
Your task: Develop a design for Paragraph that satisfies the above requirements.
Which design pattern could you use?
For awakening
(From http://www.pm.inf.ethz.ch/education/courses/kse/archive/2011/exercises/DesignPatterns.pdf)
• We want to extend our design by a character counter. This counter is a separate object that stores
the number of characters in a Paragraph object. Whenever the Paragraph object is changed, the
counter has to be adapted automatically.
Your task: Develop a design for the counter. You are allowed to modify the Paragraph
Which design pattern could you use?
• Also, you must consider the support for Ctrl + Z command, which go back the Paragraph Object to
the previous state (previous content)
Which design pattern could you use?
Reuse implies
• Frameworks
• Software product lines
• Languages and patterns (see
http://www.slideshare.net/jcabot/improving-software-
languages-via-bottom-up-
patterns?referrer=ssid%3D50788080%26action%3Dview%26e
xp%3Dweb)
• And moreeeee
Thanks for your attention
fdgiraldo@uniquindio.edu.co

Mais conteúdo relacionado

Mais procurados

In search of the Higgs or What's wrong with SEMAT?
In search of the Higgs or What's wrong with SEMAT?In search of the Higgs or What's wrong with SEMAT?
In search of the Higgs or What's wrong with SEMAT?Rich Hilliard
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and DesignAnirban Majumdar
 
Applying design patterns
Applying design patternsApplying design patterns
Applying design patternsYogeshwaranT
 
Object-Oriented Analysis and Design
Object-Oriented Analysis and DesignObject-Oriented Analysis and Design
Object-Oriented Analysis and DesignRiazAhmad786
 
시나리오 베이스 디자인 방법론 (Scenario Based Design)
시나리오 베이스 디자인 방법론 (Scenario Based Design)시나리오 베이스 디자인 방법론 (Scenario Based Design)
시나리오 베이스 디자인 방법론 (Scenario Based Design)Hajin Lim
 
Singleton design pattern
Singleton design patternSingleton design pattern
Singleton design patternamrfathy30
 

Mais procurados (10)

In search of the Higgs or What's wrong with SEMAT?
In search of the Higgs or What's wrong with SEMAT?In search of the Higgs or What's wrong with SEMAT?
In search of the Higgs or What's wrong with SEMAT?
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Applying design patterns
Applying design patternsApplying design patterns
Applying design patterns
 
Object-Oriented Analysis and Design
Object-Oriented Analysis and DesignObject-Oriented Analysis and Design
Object-Oriented Analysis and Design
 
시나리오 베이스 디자인 방법론 (Scenario Based Design)
시나리오 베이스 디자인 방법론 (Scenario Based Design)시나리오 베이스 디자인 방법론 (Scenario Based Design)
시나리오 베이스 디자인 방법론 (Scenario Based Design)
 
Design patterns tutorials
Design patterns tutorialsDesign patterns tutorials
Design patterns tutorials
 
29899520-MIT
29899520-MIT29899520-MIT
29899520-MIT
 
Singleton design pattern
Singleton design patternSingleton design pattern
Singleton design pattern
 
Cognitive modeling
Cognitive modelingCognitive modeling
Cognitive modeling
 
interaction norman model in Human Computer Interaction(HCI)
interaction  norman model in Human Computer Interaction(HCI)interaction  norman model in Human Computer Interaction(HCI)
interaction norman model in Human Computer Interaction(HCI)
 

Destaque

Workflows adaptations for security management through MDD and Aspects
Workflows adaptations for security management through MDD and Aspects Workflows adaptations for security management through MDD and Aspects
Workflows adaptations for security management through MDD and Aspects Fáber D. Giraldo
 
PhD Proposal - A Framework for evaluating the quality of languages in MDE env...
PhD Proposal - A Framework for evaluating the quality of languages in MDE env...PhD Proposal - A Framework for evaluating the quality of languages in MDE env...
PhD Proposal - A Framework for evaluating the quality of languages in MDE env...Fáber D. Giraldo
 
Continuous Integration Introduction
Continuous Integration IntroductionContinuous Integration Introduction
Continuous Integration IntroductionFáber D. Giraldo
 
Software configuration management in deep
Software configuration management in deepSoftware configuration management in deep
Software configuration management in deepFáber D. Giraldo
 
ISO 29119 and Software Testing - now what??
ISO 29119 and Software Testing - now what??ISO 29119 and Software Testing - now what??
ISO 29119 and Software Testing - now what??Fáber D. Giraldo
 
Teamwork in Software Engineering Projects
Teamwork in Software Engineering ProjectsTeamwork in Software Engineering Projects
Teamwork in Software Engineering ProjectsFáber D. Giraldo
 
Introduction to Software Process
Introduction to Software ProcessIntroduction to Software Process
Introduction to Software ProcessFáber D. Giraldo
 
Project Planning in Software Engineering
Project Planning in Software EngineeringProject Planning in Software Engineering
Project Planning in Software EngineeringFáber D. Giraldo
 
software configuration management
software configuration managementsoftware configuration management
software configuration managementFáber D. Giraldo
 

Destaque (13)

Workflows adaptations for security management through MDD and Aspects
Workflows adaptations for security management through MDD and Aspects Workflows adaptations for security management through MDD and Aspects
Workflows adaptations for security management through MDD and Aspects
 
PhD Proposal - A Framework for evaluating the quality of languages in MDE env...
PhD Proposal - A Framework for evaluating the quality of languages in MDE env...PhD Proposal - A Framework for evaluating the quality of languages in MDE env...
PhD Proposal - A Framework for evaluating the quality of languages in MDE env...
 
L software testing
L   software testingL   software testing
L software testing
 
Code Inspection
Code InspectionCode Inspection
Code Inspection
 
I software quality
I   software qualityI   software quality
I software quality
 
Continuous Integration Introduction
Continuous Integration IntroductionContinuous Integration Introduction
Continuous Integration Introduction
 
Software configuration management in deep
Software configuration management in deepSoftware configuration management in deep
Software configuration management in deep
 
ISO 29119 and Software Testing - now what??
ISO 29119 and Software Testing - now what??ISO 29119 and Software Testing - now what??
ISO 29119 and Software Testing - now what??
 
Teamwork in Software Engineering Projects
Teamwork in Software Engineering ProjectsTeamwork in Software Engineering Projects
Teamwork in Software Engineering Projects
 
Introduction to RUP & SPEM
Introduction to RUP & SPEMIntroduction to RUP & SPEM
Introduction to RUP & SPEM
 
Introduction to Software Process
Introduction to Software ProcessIntroduction to Software Process
Introduction to Software Process
 
Project Planning in Software Engineering
Project Planning in Software EngineeringProject Planning in Software Engineering
Project Planning in Software Engineering
 
software configuration management
software configuration managementsoftware configuration management
software configuration management
 

Semelhante a Patterns Overview

Unit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxUnit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxDrYogeshDeshmukh1
 
Generation of Automatic Code using Design Patterns
Generation of Automatic Code using Design PatternsGeneration of Automatic Code using Design Patterns
Generation of Automatic Code using Design PatternsIRJET Journal
 
Design pattern & categories
Design pattern & categoriesDesign pattern & categories
Design pattern & categoriesHimanshu
 
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...Anil Sharma
 
Abstract
AbstractAbstract
Abstractemaye
 
Interaction Design Patterns in Recommender Systems
Interaction Design Patterns in Recommender SystemsInteraction Design Patterns in Recommender Systems
Interaction Design Patterns in Recommender SystemsUniversity of Bergen
 
The I in PRIMM - Code Comprehension and Questioning
The I in PRIMM - Code Comprehension and QuestioningThe I in PRIMM - Code Comprehension and Questioning
The I in PRIMM - Code Comprehension and QuestioningSue Sentance
 
Design Patterns
Design PatternsDesign Patterns
Design Patternsppd1961
 
Patterns of Interaction Description Including Aspects of Constraints
Patterns of Interaction Description Including Aspects of ConstraintsPatterns of Interaction Description Including Aspects of Constraints
Patterns of Interaction Description Including Aspects of ConstraintsJuan Manuel Gonzalez Calleros
 
Chapter 5 design patterns for mas
Chapter 5 design patterns for masChapter 5 design patterns for mas
Chapter 5 design patterns for masfarshad33
 
SADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfSADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfB.T.L.I.T
 
Deliverables that Clarify, Focus, and Improve Design
Deliverables that Clarify, Focus, and Improve DesignDeliverables that Clarify, Focus, and Improve Design
Deliverables that Clarify, Focus, and Improve DesignBen Peachey
 
04 designing architectures
04 designing architectures04 designing architectures
04 designing architecturesMajong DevJfu
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and DesignDr. C.V. Suresh Babu
 
2013 Lecture 5: AR Tools and Interaction
2013 Lecture 5: AR Tools and Interaction 2013 Lecture 5: AR Tools and Interaction
2013 Lecture 5: AR Tools and Interaction Mark Billinghurst
 

Semelhante a Patterns Overview (20)

.Net design pattern
.Net design pattern.Net design pattern
.Net design pattern
 
Unit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxUnit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptx
 
Design Pattern
Design PatternDesign Pattern
Design Pattern
 
Generation of Automatic Code using Design Patterns
Generation of Automatic Code using Design PatternsGeneration of Automatic Code using Design Patterns
Generation of Automatic Code using Design Patterns
 
Design pattern & categories
Design pattern & categoriesDesign pattern & categories
Design pattern & categories
 
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
 
Abstract
AbstractAbstract
Abstract
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
 
Fluid Design Pattern Library
Fluid Design Pattern LibraryFluid Design Pattern Library
Fluid Design Pattern Library
 
Interaction Design Patterns in Recommender Systems
Interaction Design Patterns in Recommender SystemsInteraction Design Patterns in Recommender Systems
Interaction Design Patterns in Recommender Systems
 
The I in PRIMM - Code Comprehension and Questioning
The I in PRIMM - Code Comprehension and QuestioningThe I in PRIMM - Code Comprehension and Questioning
The I in PRIMM - Code Comprehension and Questioning
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Unit iii design patterns 9
Unit iii design patterns 9Unit iii design patterns 9
Unit iii design patterns 9
 
Patterns of Interaction Description Including Aspects of Constraints
Patterns of Interaction Description Including Aspects of ConstraintsPatterns of Interaction Description Including Aspects of Constraints
Patterns of Interaction Description Including Aspects of Constraints
 
Chapter 5 design patterns for mas
Chapter 5 design patterns for masChapter 5 design patterns for mas
Chapter 5 design patterns for mas
 
SADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfSADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdf
 
Deliverables that Clarify, Focus, and Improve Design
Deliverables that Clarify, Focus, and Improve DesignDeliverables that Clarify, Focus, and Improve Design
Deliverables that Clarify, Focus, and Improve Design
 
04 designing architectures
04 designing architectures04 designing architectures
04 designing architectures
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
2013 Lecture 5: AR Tools and Interaction
2013 Lecture 5: AR Tools and Interaction 2013 Lecture 5: AR Tools and Interaction
2013 Lecture 5: AR Tools and Interaction
 

Mais de Fáber D. Giraldo

Applying a software TeleCare prototype in a real residences for older people ...
Applying a software TeleCare prototype in a real residences for older people ...Applying a software TeleCare prototype in a real residences for older people ...
Applying a software TeleCare prototype in a real residences for older people ...Fáber D. Giraldo
 
Analysing the concept of quality in model-driven engineering literature: a sy...
Analysing the concept of quality in model-driven engineering literature: a sy...Analysing the concept of quality in model-driven engineering literature: a sy...
Analysing the concept of quality in model-driven engineering literature: a sy...Fáber D. Giraldo
 
software metrics (in spanish)
software metrics (in spanish)software metrics (in spanish)
software metrics (in spanish)Fáber D. Giraldo
 
software estimation (in spanish)
software estimation (in spanish)software estimation (in spanish)
software estimation (in spanish)Fáber D. Giraldo
 
Lab Software Architecture (in spanish)
Lab Software Architecture (in spanish)Lab Software Architecture (in spanish)
Lab Software Architecture (in spanish)Fáber D. Giraldo
 

Mais de Fáber D. Giraldo (11)

Introduction to MDE
Introduction to MDEIntroduction to MDE
Introduction to MDE
 
Applying a software TeleCare prototype in a real residences for older people ...
Applying a software TeleCare prototype in a real residences for older people ...Applying a software TeleCare prototype in a real residences for older people ...
Applying a software TeleCare prototype in a real residences for older people ...
 
Analysing the concept of quality in model-driven engineering literature: a sy...
Analysing the concept of quality in model-driven engineering literature: a sy...Analysing the concept of quality in model-driven engineering literature: a sy...
Analysing the concept of quality in model-driven engineering literature: a sy...
 
SEMAT
SEMATSEMAT
SEMAT
 
The SEI Approach
The SEI ApproachThe SEI Approach
The SEI Approach
 
The Agile Movement
The Agile MovementThe Agile Movement
The Agile Movement
 
software metrics (in spanish)
software metrics (in spanish)software metrics (in spanish)
software metrics (in spanish)
 
CMMI
CMMICMMI
CMMI
 
software estimation (in spanish)
software estimation (in spanish)software estimation (in spanish)
software estimation (in spanish)
 
Lab Software Architecture (in spanish)
Lab Software Architecture (in spanish)Lab Software Architecture (in spanish)
Lab Software Architecture (in spanish)
 
Implementation Model
Implementation ModelImplementation Model
Implementation Model
 

Último

ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsRommel Regala
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxruthvilladarez
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEaurabinda banchhor
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 

Último (20)

ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World Politics
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSE
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 

Patterns Overview

  • 1. Patterns… A primer Overview (… Only design patterns?...)
  • 2. Pattern (Classic definition) • A design pattern is a solution to a general design problem in the form of a set of interacting classes that have to be customized to create a specific design. • Patterns and Pattern Languages are ways to describe best practices, good designs, and capture experience in a way that it is possible for others to reuse this experience (Hillside Group). • A Pattern is a way to capture recurring designs in such a way that others can readily acquire and use the knowledge and experience (Erich Gamma)
  • 3. Christopher Alexander - 1979… • As an element in the world, each pattern is a relationship between a certain context, a certain system of forces, which occurs repeatedly in that context, and a certain spatial configuration, which allows these to resolve themselves. • As an element of language, a pattern is an instruction, which shows how this spatial configuration can be used, over and over again, to resolve the given system of forces, wherever the context makes it relevant. • The pattern is, in short, at the same time a thing, which happens in the world, and the rule which tells us how to create that thing, and when we must create it. It is both a process and a thing; both a description of a thing which is alive, and a description of the process which will generate that thing.
  • 4. Pressman • For software design, context allows the reader to understand the environment in which the problem resides and what solution might be appropriate within that environment. • A set of requirements, including limitations and constraints, acts as a system of forces that influences how the problem can be interpreted within its context and how the solution can be effectively applied.
  • 5. Design patterns give us templates! Pressman, Roger S. Software engineering : a practitioner’s approach, Chapter 12.
  • 6. Design patterns are grouped into categories (From Pressman) • Creational patterns focus on the “creation, composition, and representation” of objects. • Structural patterns focus on problems and solutions associated with how classes and objects are organized and integrated to build a larger structure. • Behavioral patterns address problems associated with the assignment of responsibility between objects and the manner in which communication is effected between objects.
  • 7. Design patterns are grouped into categories (From Pressman)
  • 8. Design patterns are grouped into categories Schach, Stephen R. Object-Oriented and Classical Software Engineering
  • 10. Weaknesses of Design Patterns (From Schach - Object-Oriented and Classical Software Engineering) 1.A major problem is that there is as yet no systematic way to determine when and how to apply design patterns. 2.The use of the 23 standard design patterns in a software product may be an indication that the language we are using is not powerful enough. 3.To obtain maximal benefit from design patterns, multiple interacting patterns are employed. We do not yet have a systematic way of knowing when and how to use one pattern, let alone multiple interacting patterns. 4.When performing maintenance on a software product built using the classical paradigm, it is essentially impossible to retrofit classes and objects. It is similarly all but impossible to retrofit patterns to an existing software product, whether classical or object oriented. Retrofitting= addition of new technology or features to older systems
  • 11. Weaknesses of Design Patterns See http://blog.codinghorror.com/head-first-design-patterns/
  • 12. Strengths of Design Patterns (From Schach - Object-Oriented and Classical Software Engineering) 1.Design patterns promote reuse by solving a general design problem. The reusability of a design pattern can be enhanced by careful incorporation of features that can be used to further enhance reuse, such as inheritance. 2.A design pattern provides high-level documentation of the design, because patterns specify design abstractions. 3.Implementations of many design patterns exist. In such cases, there is no need to code or document those parts of a program that implement design patterns. (Testing of those parts of the program is still essential, of course.)
  • 13. Strengths of Design Patterns (From Schach - Object-Oriented and Classical Software Engineering) 4. If a maintenance programmer is familiar with design patterns, it will be easier to comprehend a program that incorporates design patterns, even if he or she has never seen that specific program before. 5. Research into automated detection of design patterns is starting to produce results.
  • 14. Design in Context (Pressman) Most representative question (systematic way)
  • 15. Design in Context (Shalloway & Trott approach) In Design Patterns Explained (2005), Shalloway, A., and J. Trott suggest the following approach that enables a designer to think in patterns: 1. Be sure you understand the big picture—the context in which the software to be built resides. The requirements model should communicate this to you. 2. Examining the big picture, extract the patterns that are present at that level of abstraction. 3. Begin your design with “big picture” patterns that establish a context or skeleton for further design work. 4. “Work inward from the context” looking for patterns at lower levels of abstraction that contribute to the design solution. 5. Repeat steps 1 to 4 until the complete design is fleshed out. 6. Refine the design by adapting each pattern to the specifics of the software you’re trying to build.
  • 16. Pattern’s Table (Microsoft & Pressman) Pressman, Roger S. Software engineering : a practitioner’s approach, Chapter 12. & Microsoft, “Prescriptive Architecture: Integration and Patterns,” MSDN, May 2004, available at http://msdn2.microsoft.com /en- us/library/ms978700.aspx.
  • 17. Patterns & Abstraction • Architecture Patterns. • Business Patterns, • Analysis Patterns. • Data Patterns. • SOA Patterns. • UI Patterns. • Implementation Patterns. • Process Patterns • … Tree’ Source: http://aojajena.wordpress.com/tag/abstraction-level/
  • 18. Some repositories • The Hillside Group http://hillside.net/patterns/ • Portland Pattern Repository http://c2.com/ppr/index.html • Pattern Index http://c2.com/cgi/wiki?PatternIndex • UI Patterns Collections UI/HCI Patterns http://www.hcipatterns.org/tiki- index.php • Jennifer Tidwell’s UI patterns www.time-tripper.com/uipatterns/ • Mobile UI Design Patterns http://mobile-patterns.com/ • Pattern Language for UI Design www.maplefish.com/todd/papers/Experiences.html • UI Design Patterns www.cs.helsinki.fi/u/salaakso/patterns/
  • 19. Specialized Design Patterns • Aircraft Avionics http://g.oswego.edu/dl/acs/acs/acs.html • Business Information Systems www.objectarchitects.de/arcus/cookbook/ • Distributed Processing www.cs.wustl.edu/~schmidt/ • IBM Patterns for e-Business http://www.ibm.com/developerworks/patterns/ • Yahoo! Design Pattern Library http://developer.yahoo.com/ypatterns/ • MSDN Library patterns & practices http://msdn.microsoft.com/en-us/library/ff921345.aspx
  • 20. Don’t forget the Antipatterns X-( Whereas patterns describe a recurring problem and its solution, antipatterns describe solutions that have more negative consequences than positive benefits. In effect, they describe dysfunctional approaches to problem solving, followed by the changes that should be made to overcome this dysfunction. Source: Phillip A. Laplante & Colin J. Neill. ANTIPATTERNS - Identification, Refactoring, and Management. CRC Press, 2007. See more in: http://www.antipatterns.com/briefing/index.htm
  • 21. Paul Graham on Design Patterns For example, in the OO world you hear a good deal about “patterns”. I wonder if these patterns are not sometimes evidence of case (c), the human compiler, at work. When I see patterns in my programs, I consider it a sign of trouble. The shape of a program should reflect only the problem it needs to solve. Any other regularity in the code is a sign, to me at least, that I’m using abstractions that aren’t powerful enough— often that I’m generating by hand the expansions of some macro that I need to write. Paul Graham http://www.paulgraham.com/icad.html
  • 22. For awakening (From Paolo Ciancarini) You are enhancing an existing application in a pizza shop. The price of the pizza depends on the options selected by the user. Each option carries a different additional price. There are a large number of options available (ex: extra cheese, type of crust, toppings and so on). Which is the best pattern for design this context? Why?
  • 23. For awakening (From http://www.pm.inf.ethz.ch/education/courses/kse/archive/2011/exercises/DesignPatterns.pdf) We want to implement a text paragraph. A paragraph is a sequence of lines. Each line is represented by a string. The Paragraph class has to provide at least the following methods: List<String> alignedText(); // Returns the list of formatted lines in the paragraph. String getLine(int i ); // Returns the line at the ith position . int getCountLines(); // Returns the number of lines in the paragraph. void addLine(String s); // Appends a line to the paragraph. The formatting algorithm (e.g., left-align or centered) can be selected at runtime. It also has to be possible to add new formatting algorithms to the program without modifying the Paragraph class. Your task: Develop a design for Paragraph that satisfies the above requirements. Which design pattern could you use?
  • 24. For awakening (From http://www.pm.inf.ethz.ch/education/courses/kse/archive/2011/exercises/DesignPatterns.pdf) • We want to extend our design by a character counter. This counter is a separate object that stores the number of characters in a Paragraph object. Whenever the Paragraph object is changed, the counter has to be adapted automatically. Your task: Develop a design for the counter. You are allowed to modify the Paragraph Which design pattern could you use? • Also, you must consider the support for Ctrl + Z command, which go back the Paragraph Object to the previous state (previous content) Which design pattern could you use?
  • 25. Reuse implies • Frameworks • Software product lines • Languages and patterns (see http://www.slideshare.net/jcabot/improving-software- languages-via-bottom-up- patterns?referrer=ssid%3D50788080%26action%3Dview%26e xp%3Dweb) • And moreeeee
  • 26. Thanks for your attention fdgiraldo@uniquindio.edu.co