You are on page 1of 25

OBJECT-ORIENTED DESIGN PATTERNS

Submitted to: Mrs. Vatika Sharma Lecturer Information Technology Submitted by: Shubhangi Gupta VIII sem, IT 09EJCIT078

DESIGN PATTERNS

Introduction Importance History Objectives Proposed plan of work Description Classification Advantages Drawbacks Conclusions Bibliography

INTRODUCTION
A design pattern is a description of communicating objects and classes that are customized to solve a general design problem in a particular context. It provides an abstract description of a design problem and how a general arrangement of elements (classes and objects) solves it. Gamma et al. A pattern is made by four elements: Name Problem Solution Consequences

NAME OF PATTERN

Describes the design problem and its solution in a word or two. Used to talk about design pattern with our colleagues. Used in the documentation. Increases our design vocabulary. Has to be coherent and evocative.
4

Design Patterns

PROBLEM

Describes when to apply the patterns.


Explains the problem and its context. Sometimes includes a list of conditions that must be met before it makes sense to apply the pattern. Has to occur over and over again in our environment.
5

SOLUTION

Describes the elements that make up the design, their relationships, responsibilities and collaborations. Does not describe implementation. a concrete design or

Has to be well proven in some projects.

CONSEQUENCES

Results and trade-offs of applying the pattern. Helpful for describing design evaluating design alternatives. Benefits of applying a pattern. decisions, for

Impacts on a systems flexibility, extensibility or portability.


7

IMPORTANCE

Improves code readability for coders and architects who are familiar with the patterns. Helps new designers to have a more flexible and reusable design. Improves the documentation and maintenance of existing system by furnishing an explicit specification of class and object interactions and their intent.

HISTORY

The most common design patterns have been proposed and arranged by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides commonly known as "the GoF" (Gang of Four). They gathered twenty-three design patterns, corresponding to twenty-three recurring design problems in a catalog named Design Pattern : Elements of Reusable OO software.

OBJECTIVES
Introduce design patterns and explain techniques to

describe them. Identify the fundamental principles of a general structure, to make it a useful way to develop a reusable object-oriented design. Describe a design problem associated with the design pattern, the circumstances in which it applies, the resulting effects of its implementation, as well as the compromises implied.
10

Design Patterns

PROPOSED PLAN OF WORK


Study of Literature: The literature relevant to object

oriented design patterns will be collected and studied. Gather all the design patterns corresponding to recurring design problems. Constitution of a base of experience for building reusable software, which can act as building block from which more complex designs can be built. Understand the pattern, its intent, motivation, application and structure.
11

Design Patterns

Design Patterns

12

DESCRIPTION

Pattern name and classification contains the essence of pattern precisely. Becomes part of your design vocabulary Intent What does the pattern do ? What particular problem does it address ? Motivation Illustrates a design problem and how the class and the object structures solve the problem.
Design Patterns

13

DESCRIPTION (cntd)

Applicability In which situations the pattern can be applied? How can you recognize these situations? Structure Graphical representation of the classes and their collaborations in the pattern. Participants Class Objects Responsibilities
Design Patterns

14

DESCRIPTION (cntd)

Collaborations How the participants collaborate to carry out their responsibilities. Consequences How does the pattern support its objectives? What are the trade-offs and results of using the pattern? Implementation
15

Design Patterns

DESCRIPTION (cntd)

Sample Code Known Uses Examples of the pattern found in real systems. Related Patterns What design patterns are closely related to this one? What are the important differences?

Design Patterns

16

CLASSIFICATION
Object-oriented design patterns can be classified into the following types on the basis of purpose and scope: Creational patterns: Abstract the instantiation process. Make a system independent to its realization. Class Creational use inheritance to vary the instantiated classes. Object Creational delegate instantiation to an another object.
Design Patterns

17

CLASSIFICATION(cntd)
Structural patterns:

Class Structural patterns are concerned with the aggregation of classes to form largest structures. Object Structural pattern are concerned with the aggregation of objects to form largest structures.

Design Patterns

18

CLASSIFICATION(cntd)
Behavioral patterns: Concern with algorithms and assignment of responsibilities between objects. Describe the patterns of communication between classes or objects. Behavioral class pattern use inheritance to distribute behavior between classes. Behavioral object pattern use object composition to distribute behavior between objects.
19

Design Patterns

CLASSIFICATION (view)

Design Patterns

20

ADVANTAGES

Design patterns help promote easier program changes and object reusability. It is easier to change or add an object implementing an interface rather than anticipate all future functionality of an object. Concurrent and distributed programming has been performed using low-level OS mechanisms.
21

Design Patterns

DRAWBACKS

Lack of understanding and unrealistic expectations seem to be common denominators. Project managers and programmers may confuse style with substance. Managers and developers may not recognize all the implications of OOAD. Programmers will need time to immerse themselves in the nuances of OOAD.

Design Patterns

22

CONCLUSIONS

At present, the software community is using pattern largely for software architecture and design. More recently the software community is using pattern also for software development processes and organizations. Several object-oriented software design notations/methods have added as support for the modeling and representation of design patterns.

BIBLIOGRAPHY

Gamma E, Helm R, Johnson R, Vlissides J., Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1995. Hohpe, Gregor; Bobby Woolf, Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions. Addison-Wesley, 2003. Buschmann, Henney and Schmidt, On Patterns and Pattern Languages. J. O. Complien, D.C. Schmidt, Pattern Languages of Program Design. Addison-Wesley, 1995.
Design Patterns

24

Thank You!! Queries??


Design Patterns

25

You might also like