This is a discussion on Name of pattern associated with FindCreate() ? within the Software Patterns forums, part of the Testing category; Hi - I'm wondering if there is a name for the pattern where you consider that every element of the ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Name of pattern associated with FindCreate() ?
Hi -
I'm wondering if there is a name for the pattern where you consider that every element of the set of resources of some type T already exists and element access is via some method such as FindCreate(...) since this seems a very common pattern. (ie is there a proper word in pattern lingo or philosophy to describe this other than just "FindCreate") Thanks, BrianH. |
|
|||
|
Re: Name of pattern associated with FindCreate() ?
<brianh@metamilk.com> wrote in message
news:1118327306.059999.260090@f14g2000cwb.googlegroups.com... > Hi - > I'm wondering if there is a name for the pattern where you consider > that every element of the set of resources of some type T already > exists and element access is via some method such as FindCreate(...) > since this seems a very common pattern. > > (ie is there a proper word in pattern lingo or philosophy to describe > this other than just "FindCreate") > > Thanks, > > BrianH. FindCreate implies that the "resource" may or may not already exist. An IdentityMap is a pattern used for checking if the "resource" already exists. If it does not then it will need to be created using one of the creation patterns (Factory, AbstrctFactory etc.). As a common place to find objects look at the Registry pattern [PoEAA]. SP |
|
|||
|
Re: Name of pattern associated with FindCreate() ?
> FindCreate implies that the "resource" may or may not already exist. Yes - I'm not that keen on the word "FindCreate" for this reason. I'd like to be able to describe the situation where conceptually every member of the type *eternally* exists but at a lower level this "eternal existence" is implemented by objects that are created/destroyed as necessary to represent the higher level "eternal" objects. An example of such higher level "eternal" objects are modules in a module system where the (infinite) space of modules is considered to be fully populated even though only a finite subset are non-empty, or strings, where you only need to represent the strings you're actually using but all possible strings already exist conceptually. > An > IdentityMap is a pattern used for checking if the "resource" already exists. > If it does not then it will need to be created using one of the creation > patterns (Factory, AbstrctFactory etc.). As a common place to find objects > look at the Registry pattern [PoEAA]. Thanks for the pointers to different patterns and PoEAA - Regards, Brian. |