Design Patterns for Software Engineering
Introduction
Design patterns are a relatively new concept in software engineering, and have their origins in civil engineering. Essentially they are a blueprint for solving a specific problem, allowing the benefits of an optimal solution to be carried forward to new implementations.
The application of design patterns to the domain of software engineering was first formalised in the book "Design Patterns: Elements of Reusable Object-Oriented Software" by Eric Gamma, Richard Helm, Ralph Johnson, and John Vlissides, in 1995. The book selected 23 patterns considered to be core to understanding the pattern approach in solving software engineering problems.
While this book also set out many principles, it did not make a general template for pattern use available to the wider audience. Subsequently, applying patterns has not yet itself become a pattern-driven exercise. Engineers are left to decide how best to use patterns in different applications.
Structure of Design Patterns
What is clear is that there needs to be structure into which patterns can be formulated; this allows for them to be largely self-documenting. Indeed, one of the principles of using design patterns is that they should be structured, allowing each one to be created from a template.
At the very least, a template should contain:
- Pattern name : short, but descriptive;
- Intent : the goal of the pattern;
- Motivation : example of a problem, and how this pattern will solve it;
- Applicability : uses for this pattern;
- Structure : diagrams of the patterns classes;
- Participants : the responsibilities of the classes in the pattern;
- Collaborations : interfaces between the participants;
- Consequences : any trade-offs and forces that exist within the pattern.
This list is adapted from that provided by the Design Patterns authors, and can be used as rigidly or as loosely as is required. Some aspects will prove not to add any useful value to the template, but are provided here in the interest of completeness.
We have also refrained from using the term 'classes and objects', as is common in discussions of design patterns, preferring to only use the term 'classes'. The reason for this is one of object oriented design preference - if a pattern needs to be defined in terms of objects, then a certain implementation decision has been made and forced upon future adopters of the specific pattern.
Application of Design Patterns in Software Engineering
One of the key benefits in using design patterns in software engineering is as a way to improve communication between designers, and, to a certain extent, between non-programmers and programmers. In other words, as a communication tool, patterns can prove invaluable.
In addition, by abstracting solutions to common software engineering problems, design patterns can be used again and again. Since they use a proven solution each time, reuse at the design level is very high. This improves the quality of resulting implementations beyond that which would be achievable using only object oriented techniques.
The application of design patterns in the real world must necessarily be carried out with reference to other principles already deployed. In other words, while they offer solutions to common software engineering problems, there is no added value in creating patterns for every part of a system under development.
Instead, they should be used in cases where the resulting implementation (or design) is likely to have a use in future projects. In essence, the best way to use design patterns in software engineering is in providing standard behaviours between highly specialised classes in a software system. The are not a design technique per se, in the way that other paradigms are.
Summary
The reasons for using design patterns are essentially parallel to those for using any object oriented techniques. Design patterns encourage reuse, without constraining implementations to a specific platform or language, and promote efficient use of design time. They can be seen as the design equivalent of modular or object oriented programming.
Their strengths, however, can also be seen as their weakness. By not being implementations, the programmer is still required to actually code them, and as such any errors in the interpretation will be translated into the final source code. This means that different programmers may end up with different implementations of the same pattern, possibly even with different behaviours.
When working with design patterns, it is therefore important to remember that they should be precise enough that there are no possible misinterpretations. Using a suitable high level definition language that can be shown to be correct will help to ensure this.
Related Tags: web hosting, web designing, web service
Sally Lopez is a software developer specializing in software and web application development. To find out more about Offshore IT Outsourcing visit www.cosource.com.au.
Your Article Search Directory : Find in ArticlesRecent articles in this category:
- Fix Printer, Keyboard, Speaker and Monitor Cables With Funky Organizers
There are different types of cables that are used when you have a desktop computer at home. Most of - The Growing Trend of Asterisk Phone Systems
Truly, businesses are doing everything they can in the economy and competitive world of today to rem - The Future of Business Intelligence: Innovations in Location Intelligence
In the coming years, many business analysts are predicting that Business Intelligence (BI) will play - Adobe Photoshop Album Starter Edition and What Happened to the Unlock Codes
Adobe has long been known as a star in the digital image editing world and the Adobe Photoshop Album - Choosing the Best Computer For Graphic Design
In the 1980s, desktop publishing came out and graphic designers began to utilize computers for all k - Versatility of Pocket HD Camcorders
In the era of the do-everything handheld gadget, high def camcorders family seems almost passee. The - Contemporary Office Furniture
When considering Contemporary Office Furniture there are a few things that you really should conside - Professional Web Design, Professional Web Designer
There is a lot to consider if you are looking for a Professional Web Design. So let's get to it. Fir - Cell Phone Protection and Safety For Kids
If your like the millions of parents giving your children a cell phone for safety when their away fr - Looking For That Smart Pc Workstation And Desk
Do you need a work area at home. Maybe it is just for doing bills. It may be for a community work ar
Most viewed articles in this category:
- Voip Residential Comparison Guide: Evaluating Packet8, Lingo, And Vonage
Voice over internet protocol [internet telephony] is a rapidly growing technological alternative to - What's The Difference In The Ionic Breeze Quadra?
The Ionic Breeze Quadra is the newer line of ionic breeze units offered by The Sharper Image. These - Selling World of Warcraft Accounts
Everybody knows that WoW is one of the most exciting MMORPGs ever created. This makes selling WoW ac - Film Cameras
Film cameras are simple cameras, which could be used by all easily. People prefer to use film camera - Salesboom SLA-MS Competition
Oh, the irony. Online CRM Services shy away from offering customers a Service Level Agreement. Why t - How To Improve Your Computer Speed Almost Instantly
Probably your computer, even though you bought it last year its no longer that much fast. Like any o - The Mosquito Ringtone - The Tone Adults Can't Hear
Without a doubt, the mosquito ringtone is one of the most popular ringtones ever. Good luck trying - Auto Navigation Systems And Gps Technology While Traveling
If you have managed to do any research on auto navigation systems I'm sure you've come across countl - Do Cheap iPods Really Exist?
If you know anything about music trends, you know that iPods are the hottest portable music device t - Online Mobile Phone Offers: Take 10 Minutes To Save £360 On Your Next Mobile Phone Contract
Cash Is Falling Out Of Your Pocket If you live in the UK, you're probably paying line rental on a m