Re: is this a pattern?
From: Daniel T. (postmaster_at_eathlink.net)
Date: 03/17/04
- Previous message: Daniel T.: "Re: dynamic type checking - a pauline conversion?"
- In reply to: Karl Hungus: "is this a pattern?"
- Next in thread: Karl Hungus: "Re: is this a pattern?"
- Reply: Karl Hungus: "Re: is this a pattern?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 17 Mar 2004 02:17:39 GMT
"Karl Hungus" <nnnnndddddd@hotmail.com> wrote:
> Sometimes I use a static collection in a class to store instances of that
> class. Everytime I instantiate it, a reference to the instance is stored in
> the static collection. This way I dont have to use a manager class of any
> kind to deal with all the instances.
>
> Is this a pattern? good/bad OOD?
It sounds like you end up with several classes that all do two things
(1) keep track of their instances and (2) whatever else they need to do.
That implies that you are not seperating your concernes very well. It
also implies that you have a lot of dupicated code.
What would happen if you created a single class who's job it was to keep
track of instances of some other class?
- Previous message: Daniel T.: "Re: dynamic type checking - a pauline conversion?"
- In reply to: Karl Hungus: "is this a pattern?"
- Next in thread: Karl Hungus: "Re: is this a pattern?"
- Reply: Karl Hungus: "Re: is this a pattern?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|