Does Caching below in the business tier or data tier??

N

Nemisis

Hi everyone,

We are currently re-developing our software, to asp.net 2.0 and taking
a 3 tier architecture.

I have been thinking about it, and i think that it belongs in the
business tier.

Another thing is am thinking about is what sort of caching should be
done, because i really dont want to tie the business layer to only web
applications (although that is probably the onlyl place it will be used
at first), as i can see us developing possible Windows Applications
that may run on the server or clients machine, and i dont want to have
to hold two different business tiers, 1 for web apps and 1 for windows
apps.

Can you cache an object when using Windows Apps? I guess you can, but
can anyone tell me what sort of objects to use??

Thanks for your help and please provide any useful links to any helpful
articles.
 
S

sloan

If you look at my blog:

http://sholliday.spaces.live.com/
12/1/2005
Understanding the Simple Factory Pattern

I have a section where I talk about the #2 Environment Method.

Ok... you could write an interface ...
IStoreStuff

and have 2 concrete implementations ... one for the web, and one for the
winforms.
by programming to the Interface (in your applications) ... and using the
Factory, you can use the exact same syntax for either environment.

I would saying that Caching .. is not a application/biz tier object.
It is a Framework piece living outside of any specific application.

Now, your business logic can use the CachingFramework object ..

I usually write simple scenario 'getters'.

public MyCollection GetGoodEnoughEmployeeInfo( bool forceRefresh )



if the forceRefresh is true, I use a DataLayer ojbect to get fresh data.
then i use the IStoreStuff here.
if the item is in in the IStoreStuff object, and forceRefresh is false, I
return the object.

if forceRefresh is true, OR the object isn't in the cache object... I get
fresh values, and put them into the cache object.

}//end GetGoodEnoughEmployeeInfo


...
If you look at this blog entry:
10/24/2005
Web Session Wrapper for storing and retrieving objects

you're figure out the web version of the IStoreStuff.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top