Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

What is a design pattern?

Former Member
0 Kudos

Howdy,

I hear a lot of talk of deasign patterns in ABAP...

My question is what on earth is a design pattern and why/how would it be useful?

Any ideas anyone

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Steve,

There was a recent weblog on this topic. I hope you would find that useful. Here's the link -

/people/igor.barbaric/blog/2005/03/07/oo-abap-and-design-patterns-itab-lookup-as-decorator-pattern

Regards,

Anand Mandalika.

3 REPLIES 3

Former Member
0 Kudos

Hello Steve,

There was a recent weblog on this topic. I hope you would find that useful. Here's the link -

/people/igor.barbaric/blog/2005/03/07/oo-abap-and-design-patterns-itab-lookup-as-decorator-pattern

Regards,

Anand Mandalika.

Former Member
0 Kudos

Thansk,

But it was while reading that weblog that I discovered that I had no idea what was going on?

Can anyone help explain?

0 Kudos

Hi Steve.

The good point to start with design patterns is to read book "Design Patterns - Elements of Reusable Object-Oriented Software" by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides. It gives strong, consistent understanding of patterns basis with real life examples.

Short introduction extract:

"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". Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns. Our solutions are expressed in terms of objects and interfaces instead of walls and doors, but at the core of both kinds of patterns is a solution to a problem in a context.

In general, a pattern has four essential elements:

The pattern name is a handle we can use to describe a design problem, its solutions, and consequences in a word or two. Naming a pattern immediately increases our design vocabulary. It lets us design at a higher level of abstraction. Having a vocabulary for patterns lets us talk about them with our colleagues, in our documentation, and even to ourselves. 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.

The problem 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 symptomatic 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.

The solution 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 (classes and objects in our case) solves it.

The consequences are the results and trade-offs of applying the pattern. Though consequences are often unvoiced 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."

Regards,

Maxim.