
- Forum
- Testing
- Software Patterns
- When should i use shared data base in my domain layer?
When should i use shared data base in my domain layer?
This is a discussion on When should i use shared data base in my domain layer? within the Software Patterns forums, part of the Testing category; I wonder if I have two components in my domain layer A and Z, in such a way that A ...
-
02-20-2005, 04:32 AM #1Julia Guest
When should i use shared data base in my domain layer?
I wonder if I have two components in my domain layer
A and Z, in such a way that A can create Z1,Z2,Z3..... and pass them to a
thread
and I also have a data base which hold Z properties
1.Should I load the properties of Z in A and pass them to each Zn component?
2.Should I load them in Zn?
3.Will your answer will be the same in case Z is placed in lowest level of
the domain model
in such a way that many component separate between A and Z?
4.Will you answer be the same in case Zn component are pooled COM+
components?
5.Shoukd i create Y component which is in one higher level from Z componet
to cach Z properties?
(a factory)
Thanks in advance.
-
02-20-2005, 04:13 PM #2Manco Guest
Re: When should i use shared data base in my domain layer?
Julia wrote:
> I wonder if I have two components in my domain layer
>
> A and Z, in such a way that A can create Z1,Z2,Z3..... and pass them
> to a thread
>
> and I also have a data base which hold Z properties
>
> 1.Should I load the properties of Z in A and pass them to each Zn
> component?
> 2.Should I load them in Zn?
> 3.Will your answer will be the same in case Z is placed in lowest
> level of the domain model
> in such a way that many component separate between A and Z?
> 4.Will you answer be the same in case Zn component are pooled COM+
> components?
> 5.Shoukd i create Y component which is in one higher level from Z
> componet to cach Z properties?
> (a factory)
>
> Thanks in advance.
Write yourself a cache manager. If your application is running in ASP.NET,
you can delegate to the Cache object to use. If you have a desktop
application, then you have to write a singelton Cache object which is thread
safe. Even in the web-app scenario, your cache manager singleton has to be
thread-safe. Meaning you you should have the calls that access the
underlying Cache object in lock{} sections.

Reply With Quote





