Software Design Patterns Anton Danshin Moscow Institute of Physics and Technology Dolgoprudny - 2012.

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.
(c) 2009 University of California, Irvine – André van der Hoek1June 13, 2015 – 21:42:16 Informatics 122 Software Design II Lecture 8 André van der Hoek.
Dept. of Computer Engineering, Amirkabir University of Tech. 1 Design Patterns Dr. Noorhosseini Introduction.
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.
(c) 2010 University of California, Irvine – André van der Hoek1June 29, 2015 – 08:55:05 Informatics 122 Software Design II Lecture 8 André van der Hoek.
Design Patterns Module Name - Object Oriented Modeling By Archana Munnangi S R Kumar Utkarsh Batwal ( ) ( ) ( )
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
CERN – European Organization for Nuclear Research GS Department – Administrative Information Services Design Patterns in Groovy Nicolas Décrevel Advanced.
Design Patterns Alan Shalloway, James Trott, Design Patterns Explained, Addison-Wesley, Gamma, Helm, Johnson, Vlissides, Design Patterns, Elements.
Software Waterfall Life Cycle Requirements Construction Design Testing Delivery and Installation Operations and Maintenance Concept Exploration Prototype.
What's all going around ?!? Hamed Shayan
05 - Patterns Intro.CSC4071 Design Patterns Designing good and reusable OO software is hard. –Mix of specific + general –Impossible to get it right the.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
January 12, Introduction to Design Patterns Tim Burke References: –Gamma, Erich, et. al. (AKA, The Gang of Four). Design Patterns: Elements of Reusable.
Design Patterns in Java Chapter 1 Introduction Summary prepared by Kirk Scott 1.
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.
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.
Introduction to Design Patterns. Questions What is a design pattern? Who needs design patterns? How different are classes and objects in APL compared.
1 Design Patterns Object-Oriented Design. 2 Design Patterns 4Reuse of design knowledge and experience 4Common in many engineering disciplines 4Avoids.
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.
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.
S ystem P rogrammers' A ssociation for R esearching C omputer S ystems Design Pattern Study KAIST
Software Design Patterns Curtsy: Fahad Hassan (TxLabs)
Stephenson College DP 98 1 Design Patterns by Derek Peacock.
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.
Java Design Patterns Java Design Patterns. What are design patterns? the best solution for a recurring problem a technique for making code more flexible.
1 Chapter 5:Design Patterns. 2 What are design pattern?  Schematic description of design solution to recurring problems in software design and,  Reusable.
Five Minute Design Patterns Doug Marttila Forest and the Trees May 30, 2009 Template Factory Singleton Iterator Adapter Façade Observer Command Strategy.
7 April 2004CSci 210 Spring Design Patterns 2 CSci 210.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
Chapter 10 Design Patterns.
Chapter 5:Design Patterns
MPCS – Advanced java Programming
Introduction to Design Patterns
Design Patterns Lecture part 2.
Introduction to Design Patterns
How to be a Good Developer
Chapter 8, Design Patterns Bridge
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
Informatics 122 Software Design II
CSE 403 Software Design.
DESIGN PATTERNS : Introduction
Informatics 122 Software Design II
Chapter 8, Design Patterns Introduction
Chapter 8, Design Patterns Singleton
CIS 644 Tues. Nov. 30, 1999 W15A … patterns.
Chapter 8, DesignPatterns Facade
Presentation transcript:

Software Design Patterns Anton Danshin Moscow Institute of Physics and Technology Dolgoprudny

Contents What is it? Why do we use it? Classification Example Criticism Anti-patterns Conclusion 2

What is it? General repeatable solution to a commonly occurring problem in software design Description or template for how to solve a problem that can be used in many different situations 3

Why do we use it? Speed up development process Prevent future problems Ease comunication between developers Make your code better Simplicity is the soul of efficiency. -- Austin Freeman, "The Eye of Osiris" 4

Classification of design patterns Creational: Abstract factory, Builder, Factory method, Prototype, Singleton,... Structural: Adapter, Bridge, Composite, Decorator, Proxy,... Behavioral: Chain of responsibility, Command, Iterator, Mediator, Strategy,... Concurrent 5

Example 1: Singleton Intent: Create a single-instance class Provide a global point of access to it Encapsulate initialization Problems Application needs one, and only one, instance of an object. Lazy initialization and global access are necessary 6

Example 1: Singleton 7

Example 1: Singleton (Java) 8

Criticism Targets the wrong problem Lacks formal foundations Leads to inefficient solutions Do not overuse! 9

Copy and Paste Programming Spaghetti Code Golden Hammer Magic Numbers Hard Code Boat Anchor God Object Anti-Patterns Soft Code Reinventing the Wheel Reinventing the Square Wheel Blind Faith Brute Force Coding Unnecessary comments 10

Conclusion Design pattern is a general solution to a commonly occurring problem in software design Using design patterns makes your code better Design patterns are devided into: Creational Behavioral Structural Concurrent Do NOT OVERUSE design patterns 11

References 1.SourceMaking.com – Software Design Patterns 2.Wikipedia 3.HabraHabr.Ru 12

Thanks for your attention!