| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
rather be programming
Join Date: Feb 2005
Location: City of Angels
Posts: 10,000
|
This these patterns seems quite similar to me.
The Command Pattern lets the clients to talk to the receiver through the use of a interpreter that knows how to speak with them both The Adapter Patterns defines an interface for the client to use and that interface calls the appropriate methods methods on the receiver. These 2 Patterns seem so similar. What am I missing?
__________________
I'm old enough to know better and young enough to do it anyway. -- maskedman |
|
|
|
|
|
#2 |
|
as[org].addListener(this)
Join Date: Dec 2005
Location: LA, California
Posts: 838
|
There are a lot of patterns that have subtle differences, but one big differentiator is the problem that they aim to solve.
A command is specifically used to consolidate an execution of a specific action. An adapter is used in situations where pre-existing code needs to support a newer abstraction. |
|
|
|
|
|
|
|
|
#3 |
|
rather be programming
Join Date: Feb 2005
Location: City of Angels
Posts: 10,000
|
Thanks for the reply
![]() That's about what I got from my readings, too. So the main determining factor here (and with all OOP, maybe?) is the aim of what they are trying to do?
__________________
I'm old enough to know better and young enough to do it anyway. -- maskedman Last edited by Flash Gordon; 08-25-2007 at 07:45 AM.. |
|
|
|
|
|
#4 |
|
as[org].addListener(this)
Join Date: Dec 2005
Location: LA, California
Posts: 838
|
Pretty much. The point is to get an idea of the conventional solutions to common problems. This way you're not reinventing the wheel, and also you can communicate your solutions to other people.
In reality, a project won't just be a collection of patterns. A project should just be a collection of classes that are built with the mentality of solving in patterns....if that makes any sense. |
|
|
|
|
|
#5 |
|
rather be programming
Join Date: Feb 2005
Location: City of Angels
Posts: 10,000
|
I'm glad to hear you say "In reality, a project won't just be a collection of patterns". I like that a lot and it make sense....in a which came first the chicken or the egg way.
__________________
I'm old enough to know better and young enough to do it anyway. -- maskedman |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Filling movie clip with pattern | blu3 | ActionScript 2.0 | 3 | 09-25-2006 08:24 AM |
| Quality pattern fill needed | jsebrech | ActionScript 2.0 | 2 | 08-16-2005 04:25 PM |
| gradient fill limitations, pattern fills | jsebrech | ActionScript 2.0 | 2 | 07-27-2005 12:23 PM |
| Conceptual: Making neighbour-aware mcs in a grid pattern? | lowBoy | ActionScript 2.0 | 0 | 02-18-2005 10:14 AM |
| Center Projector (how to use pattern in caption?) | BadBadNeil | Projectors and CDs | 2 | 11-17-2004 01:00 AM |