Exforsys

Online Training

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 ...


Go Back   Exforsys > Testing > Software Patterns

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2005, 05:32 AM
Julia
Guest
 
Posts: n/a
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.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2005, 05:13 PM
Manco
Guest
 
Posts: n/a
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.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:32 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.