[bcab] Re: Design Patterns.
- From: <tim.pennick@xxxxxx>
- To: <bcab@xxxxxxxxxxxxx>
- Date: Thu, 28 Sep 2006 09:35:33 +0100
Nick,
Fantastic explanation, thanks a lot.
Regards,
Tim
-----Original Message-----
From: bcab-bounce@xxxxxxxxxxxxx [mailto:bcab-bounce@xxxxxxxxxxxxx] On
Behalf Of Nick.Adamson@xxxxxxxxxxxxxxxxxxxxxx
Sent: 28 September 2006 09:26
To: bcab@xxxxxxxxxxxxx
Subject: [bcab] Re: Design Patterns.
Hi Tim and Derek.
I've tried to explain this but there are much more intelligent people
other than myself who can probably explain it in a more understandable
way.
A Software design pattern is a "good practise" way of doing something
when your developing a set of software objects. A sort of example of
this in a real world situation could be something like:
You have a hot water boiler in your house which is used to heat
radiators. The normal way of connecting all this up is to have one big
circuit of radiators, the boiler is connected to the radiator in the
lounge, which is connected to the one in the dining room which is
connected to the one in the bedroom which is connected back to the
boiler.
Now any heating engineer will normally follow the idea of linking
radiators in sequence like this. But if you wanted you could connect
each radiator to the boiler directly. I guess its not done this way
because the piping just gets way to complicated so the best practise way
of doing it is to link all of the radiators in sequence. This could be
called the sequence or daisy chain pattern.
Real patterns in software that I know about are things like the object
pool pattern which enables a programmer to allocate memory at the start
of the program and then hand that out to parts of the program that need
memory, think about a library system. You want to check out a book, the
book is assigned to you, while the book is in your possession you
control that book. When it goes back to the library and you check it
back in ownership returns to the library. This pattern is used when
working with systems where you have a limit on the amount of memory a
software application can access.
There are a number of reasons to use design patterns.
1. there tried and tested techniques and often you can download sample
code which can be used as a guide to implement the pattern.
2. the use of patterns can often be used to see how good the
architecture of the program is.
3. should other engineers come along and look at the design if they see
a reference to pattern X they normally instantly know how a section of
code works in concept.
4. it makes for more stable and reliable software as often when you use
patterns you can remove quirks of the code that if the whole thing was
developed by one person with out any guidance there is more scope for
"wobbly" design.
Basically you wouldn't expect an architect for your house to come in and
just shoot ideas off the top of his head. You expect them to come in
with best practises and a load of ideas about the best way to do things
which he can use when designing your house. Same idea for software.
I hope this sort of explains it a little. If your more interested I can
try to explain more but A Google is probably the better approach.
Cheers.
Nick.
-----Original Message-----
From: bcab-bounce@xxxxxxxxxxxxx [mailto:bcab-bounce@xxxxxxxxxxxxx] On
Behalf Of tim.pennick@xxxxxx
Sent: 27 September 2006 16:50
To: bcab@xxxxxxxxxxxxx
Subject: [bcab] Re: Design Patterns.
Nick,
Can't help with an answer, but I'd guess that at least some of us on
this list would be interested to know what a design pattern is, in the
interests of maintaining an up-to-date idea of current issues in
Information Technology.
Regards,
Tim Pennick
-----Original Message-----
From: bcab-bounce@xxxxxxxxxxxxx [mailto:bcab-bounce@xxxxxxxxxxxxx] On
Behalf Of Nick.Adamson@xxxxxxxxxxxxxxxxxxxxxx
Sent: 27 September 2006 16:14
To: programming@xxxxxxxxxxxxxxxxxxxx; BCAB@xxxxxxxxxxxxx;
program-l@xxxxxxxxxxxxx
Subject: [bcab] Design Patterns.
Hi All.
Sorry for the cross posting.
I'm after a website or electronic book I can bye which goes over design
patterns.
In the last few design reviews I've been through at work it's been
suggested I look in to the singleton pattern or the pool pattern or
threading patterns. I think it would be good for me to be aware of what
patterns are around so I can design my software with the patterns in
from the first place rather than being pointed at them during design
reviews.
So I'm after a good E-book or Website that details a number of useful
patterns and if it goes over how to implement them in C++ even better!
Cheers.
Nick.
Nick Adamson
Software Engineer
General Dynamics UK LTD
Email: nick.adamson@xxxxxxxxxxxxxxxxxxxxxx
Tel: 01495 236467
http://www.generaldynamics.uk.com
This email and any files attached are intended for the addressee and may
contain information of a confidential nature. If you are not the
intended recipient, be aware that this email was sent to you in error
and you should not disclose, distribute, print, copy or make other use
of this email or its attachments. Such actions, in fact, may be
unlawful. In compliance with the various Regulations and Acts, General
Dynamics UK Limited reserves the right to monitor (and examine for
viruses) all emails and email attachments, both inbound and outbound.
Email communications and their attachments may not be secure or error-
or virus-free and the company does not accept liability or
responsibility for such matters or the consequences thereof. Registered
Office: 100 New Bridge Street, London EC4V 6JA. Registered in England
and Wales No: 1911653.
*** BCAB List administration ***
If you wish to unsubscribe, set vacation,, request a digest or carry out
routine maintenance on your subscription to the list then go to:
http://www.bcab.org.uk/mailing-list.html
If you wish to discuss the administration of the list then contact:
secretary@xxxxxxxxxxx
*** BCAB List administration ***
If you wish to unsubscribe, set vacation,, request a digest or carry out
routine maintenance on your subscription to the list then go to:
http://www.bcab.org.uk/mailing-list.html
If you wish to discuss the administration of the list then contact:
secretary@xxxxxxxxxxx
This email and any files attached are intended for the addressee and may
contain information of a confidential nature. If you are not the
intended recipient, be aware that this email was sent to you in error
and you should not disclose, distribute, print, copy or make other use
of this email or its attachments. Such actions, in fact, may be
unlawful. In compliance with the various Regulations and Acts, General
Dynamics UK Limited reserves the right to monitor (and examine for
viruses) all emails and email attachments, both inbound and outbound.
Email communications and their attachments may not be secure or error-
or virus-free and the company does not accept liability or
responsibility for such matters or the consequences thereof. Registered
Office: 100 New Bridge Street, London EC4V 6JA. Registered in England
and Wales No: 1911653.
This email and any files attached are intended for the addressee and may
contain information of a confidential nature. If you are not the
intended recipient, be aware that this email was sent to you in error
and you should not disclose, distribute, print, copy or make other use
of this email or its attachments. Such actions, in fact, may be
unlawful. In compliance with the various Regulations and Acts, General
Dynamics UK Limited reserves the right to monitor (and examine for
viruses) all emails and email attachments, both inbound and outbound.
Email communications and their attachments may not be secure or error-
or virus-free and the company does not accept liability or
responsibility for such matters or the consequences thereof. Registered
Office: 100 New Bridge Street, London EC4V 6JA. Registered in England
and Wales No: 1911653.
*** BCAB List administration ***
If you wish to unsubscribe, set vacation,, request a digest or carry out
routine maintenance on your subscription to the list then go to:
http://www.bcab.org.uk/mailing-list.html
If you wish to discuss the administration of the list then contact:
secretary@xxxxxxxxxxx
*** BCAB List administration ***
If you wish to unsubscribe, set vacation,, request a digest or carry out
routine maintenance on your subscription to the list then go to:
http://www.bcab.org.uk/mailing-list.html
If you wish to discuss the administration of the list then contact:
secretary@xxxxxxxxxxx
Other related posts: