What this course is about Learning and applying

  • Slides: 9
Download presentation
What this course is about Learning and applying various creational, structural and behavioral Design

What this course is about Learning and applying various creational, structural and behavioral Design Patterns to the design of software components and applications SE-2811 Dr. Mark L. Hornick 1

One goal of good software design is Reuse and Maintainability You already re-use code

One goal of good software design is Reuse and Maintainability You already re-use code on low level l What are some examples? Code re-use is great, but it’s not a Design Patterns are about reuse on a higher level l Reuse of an approach, rather than specific classes and/or code SE-2811 Dr. Mark L. Hornick 2

Design Patterns are a higher level of abstraction than class libraries You are already

Design Patterns are a higher level of abstraction than class libraries You are already familiar with designing and implementing various classes that each perform specific functions: l l l Application classes UI classes Data classes Design Patterns help us to figure out how to arrange classes to work together to solve problems that recur frequently. SE-2811 Dr. Mark L. Hornick 3

A Design Pattern is… A “standard” arrangement of certain classes that comprise a solution

A Design Pattern is… A “standard” arrangement of certain classes that comprise a solution to a given problem l l Many different Patterns can appear in a single application Patterns are given common names, such as Strategy or Observer During execution, the objects created from these classes interact in a specific way to implement a specific function l l The same type of function that is typically needed by many types of applications The specific interactions are often defined by SE-2811 interfaces Dr. Mark L. Hornick 4

What problem does a Design Pattern solve? ? SE-2811 Dr. Mark L. Hornick 5

What problem does a Design Pattern solve? ? SE-2811 Dr. Mark L. Hornick 5

Design Patterns is partly about not reinventing the wheel every time you design a

Design Patterns is partly about not reinventing the wheel every time you design a new application Instead, reuse well-accepted approaches…. . that are also easier to maintain, since the approach is well-understood SE-2811 Dr. Mark L. Hornick 6

A Design Pattern is… An approach to solving a problem that occurs over and

A Design Pattern is… An approach to solving a problem that occurs over and over again in many different applications l l l But with context-specific variations when applied … so it’s not the same classes used over and over … but it’s a similar way of solving similar problems The core of a solution l The solution can be used many times over without ever doing it the same way twice SE-2811 Dr. Mark L. Hornick 7

Over the years, a number of “good” Design Patterns have been “discovered” The classes

Over the years, a number of “good” Design Patterns have been “discovered” The classes involved generally focus on doing a certain thing (high cohesion) And because they have low coupling (don’t require strong interaction with other classes), they can be dropped into you application l With some minor tailoring to fit your specific need SE-2811 Dr. Mark L. Hornick 8

Why should we learn Design Patterns? Shared vocabulary l l Allows to communicate not

Why should we learn Design Patterns? Shared vocabulary l l Allows to communicate not just qualities, but also characteristics and constraints that the pattern represents. Allow you to say more with less: saying “Observer Pattern” gets everyone on-board with the approach in two words. Helps you focus on the “design” l You do not get into the nitty-gritty details of implementation right away. Less room for misunderstanding l Improved productivity and quality 9