×
Listen to your teachers when they tell you WHAT to do. But more importantly, think about it later and ask yourself WHY they told you to do it.
--Your friends at LectureNotes
Close

Note for DESIGN PATTERN - dp by akhil krishna

  • DESIGN PATTERN - dp
  • Note
  • G pullareddy engineering college - gprec
  • Computer Science Engineering
  • B.Tech
  • 6 Topics
  • 7571 Views
  • 50 Offline Downloads
  • Uploaded 5 months ago
Akhil Krishna
Akhil Krishna
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-2

Design Patterns CONTENTS UNIT-1 UNIT-2 UNIT-3 UNIT-4 UNIT-5 UNIT-6 R a j e s h D e s i g n P a t t e r n s

Text from page-3

Design Patterns SNO.. CONTENTS 1. 2. 3. 4. 5. 6. 1|R a j e s h UNIT-1 INTRODUCTION PATTERN DESCRIPTION ORGANIZING CATALOGS ROLE IN SOLVING DESIGN PROBLEMS SELECTION AND USAGE. PAGE NO., 2 4 6 7 15 16 Design Patterns 001

Text from page-4

Introduction to Design Patterns What Is a Design Pattern? 1. Christopher Alexander says, "Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice". 2. In software engineering, A design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern isn't a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations. In general, a pattern has four essential elements: 1. Pattern Name  It is a handle we can use to illustrate a design problem, its solutions, and consequences in a word or two.  Naming a pattern instantly increases our design vocabulary. It lets us design at a higher level of abstraction.  It makes it easier to think about designs and to communicate them and their trade- offs to others.  Finding good names has been one of the hardest parts of developing our catalog. 2. Problem  It describes when to apply the pattern.  It explains the problem and its context.  It might describe specific design problems such as how to represent algorithms as objects.  It might describe class or object structures that are indicative of an inflexible design.  Sometimes the problem will include a list of conditions that must be met before it makes sense to apply the pattern. 3. Solution  It describes the elements that make up the design, their relationships, responsibilities, and collaborations.  The solution doesn't describe a particular concrete design or implementation, because a pattern is like a template that can be applied in many different situations.  Instead, the pattern provides an abstract description of a design problem and how a general arrangement of elements solves it. 4. Consequences:  They are the results and trade-offs of applying the pattern.  Though consequences are often understood when we describe design decisions, they are critical for evaluating design alternatives and for understanding the costs and benefits of applying the pattern.  The consequences for software often concern space and time trade-offs.  They may address language and implementation issues as well.  Since reuse is often a factor in object-oriented design, the consequences of a pattern include its impact on a system's flexibility, extensibility, or portability.  Listing these consequences explicitly helps you understand and evaluate them. Point of view affects one's interpretation of what is and isn't a pattern. One person's pattern can be another person's primitive building block. 2|R a j e s h Design Patterns 002

Lecture Notes