Re: is this a pattern?

From: Daniel T. (postmaster_at_eathlink.net)
Date: 03/17/04

  • Next message: Daniel Parker: "Re: Object-relational mapping tool"
    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?


  • Next message: Daniel Parker: "Re: Object-relational mapping tool"

    Relevant Pages

    • Re: x^3-x=6*y^3
      ... > Has anyone reference to this Diophantine equation? ... > or a proof that it has only the trivial solutions ... assume coprime), which implies the following ...
      (sci.math)
    • Re: Finding the instance reference of an object
      ... which implies that Python makes a copy when assigning ... RTFM: Python Reference Manual 6.3.1 ...
      (comp.lang.python)
    • Re: Does the Reference "Below" Include Other Chapters?
      ... Chris Kern writes: ... Brubaker> posted the following: ... I was just wondering if a reference to the discussion below in the ... chapter of book also implies later chapers? ...
      (alt.usage.english)
    • Re: tommy set theory / cantor simplified and corrected
      ... it implies that aleph_2 and "_3 dont exist or are nonsence ... I'm well known for my vehement opposition to Cantor and the ...
      (sci.math)
    • Re: Forget al Qaeda
      ... which implies a single story? ... In the bibe they're piecemeal, ... reference there; dyoh. ... Suits me, I don't spend a lot of time fretting over Satan, apparently ...
      (misc.writing)