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

Discussion in 'ASP .Net' started by Nemisis, Aug 22, 2006.

  1. Nemisis

    Nemisis Guest

    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.
     
    Nemisis, Aug 22, 2006
    #1
    1. Advertising

  2. Nemisis

    sloan Guest

    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.





    "Nemisis" <> wrote in message
    news:...
    > 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.
    >
     
    sloan, Aug 22, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rob

    ASP v2 & 3-tier or 2-tier

    rob, Aug 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    420
    Steve C. Orr [MVP, MCSD]
    Aug 13, 2004
  2. NOSPAM

    2 tier to 3 tier?

    NOSPAM, Oct 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    446
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Oct 14, 2004
  3. Stylus Studio
    Replies:
    0
    Views:
    406
    Stylus Studio
    Feb 17, 2006
  4. davout
    Replies:
    4
    Views:
    352
  5. kiran
    Replies:
    12
    Views:
    1,153
    Scott Sauyet
    Dec 7, 2011
Loading...

Share This Page