What's driving this?  Performance?  Memory usage? Maintainability?
Componentization/compartmentalization?  Adherence to Best Practices?

If you're not really sure at this point it may be a case of premature
optimization.

Compartmentalizing functionality based upon detail level or usage of
detail would rarely give you the highest performance solution; but, may
yield the best results for memory usage.  Memory usage depends upon a lot
of factors.  Breaking your data into smaller chucks loaded at different
times may actually lead greater memory fragmentation and thus higher
memory usage--which to lead to a low-performance, high memory usage
solution.

I don't necessarily think design of this nature results in better
maintainability; it depends on the level of detail.  If you're looking at
compartmentalizing read-only and read/write functionality, it may make the
code easier to maintain; but, it's hard to tell.

On Tue, 17 Jan 2006 09:57:05 -0500, Bill Bassler
<[EMAIL PROTECTED]> wrote:

>I was thinking for the puposes of "responsibility behaviours "delay-
loaded"
>was an approach to consider.
>
>Of course, having multiple Person implementations via interfaces works
too.
>The issues that might make this approach a bit complicated for my purposes
>are that essentially there are many helper functions that are used to
query
>and filter collections of Persons for different purposes. For example, the
>purpose might be just to fill a list with names or the purpose might
>require that quite a large nesting of collections (and all of the database
>connections that are required to fill them; which can effect performance
>for a relatively small collection). For example, a list of Persons
>containing objects that define student courses and related session
>information.
>
>Some typical requirements for what needs to be included in the Person and
>what needs to be included in the collections are:
>
>Get me every Person with the Last name of 'Jones' to include name only.
>
>Get me all Person(s) that are a "Counselor" or a "Teacher" to included
>employee information, history etc.
>
>Get me all Person(s) that are a "Student" to include course and session
>information.
>
>Get me all Person(s) that are a "Student" with the Last name of 'Jones' to
>include course and session information.
>
>So, different types implementing an interface might get a bit tricky as
far
>as knowing what casts to make when the various Persons implementaions are
>returned. I just wondering if another approach might be to have the helper
>functions request that certain responsiblity/functionality is added for
>returned Persons. For example, get me every Person with the Last name
>of 'Jones' for display only. This would just return Persons instantiated
>with basic identifying info only and would not incur all the overhead
>unless required for the purpose.
>
>You could get a similar behavior with interfaces to if they were defined
in
>the appropriate way too.

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to