> about.  My program designs usually include a repository of 
> objects that many
> parts of the application will need.  For instance, in a 
> client/server app
> the link back to the server would be one such object.  A 
> global dictionary
> of metadata items would be another.

I did this in order to build a multi-level cache of objects that are all
interconnected ( various classes that use other classes, but all are
cached individually).

I wanted to do this because of the high amount of data that would be
accessed from the Database where a lot of it is common, and also to
reduce the number of objects and data that is created. I'm confident
that I reduced the amount of resourced needed by 50%.

Now, the way I did this was to create a static class called
<Application>Environment which contained some basic get/set/delete
functions which would just store everything into various hashtables. I
also have a method to simply clear everything, which lets me start from
the beginning without having to restart my application. It works pretty
well, and doesn't take up any more resources than I would have
otherwise, since it's all just a bunch of pointers (mostly, with some
lookups in the hashtable).

I think this is a good way to go about doing things. Now if you need
something that is accessible over multiple instances of an application,
that is a different story, and I am not sure how to o about doing that
(local server/client or perhaps a service?), but this works very well
for a single instance.

-akshay

Reply via email to