For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > July 2004 > Caching Question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Caching Question
Mark Whitton

2004-07-31, 8:56 am

Hi, I am developing using ASP.Net using SQL Server and also have several
layers in between, eventually producing a custom business object that is
used to populate the web form. I don't use datasets because of performance
issues and also they just aren't proper business entities.

When it comes to updating my database I generally use an identity value and
a datetime value to avoid multiple updates. e.g. Update Customers set .....
where Id = :Id and DateModified=:DateModified.

My problem is deciding where I should store this data within the webforms
layer. I don't want to store the whole business object as the majority of
the data is displayed on the webform, and only want to store the data
necessary to allow me to update on postback. I believe Session state is
not the answer, and application state is definitely not the answer, which
leaves me with View state or cookies. The problem with both of these is
security and also performance.

I'd appreciate your thoughts.


Jeffrey Palermo [MCP]

2004-07-31, 3:56 pm

This is where performance testing comes into play. I use Microsoft's Web
Stress application. You should perform multiple tests in each scenario to
see which one is best for your production environment. If storing your
object in viewstate doubles the size of the page, then it probably isn't the
answer, and I'd use session. A cookie is limited to 4KB, so that's not the
answer either. As a rule, cookies should be used only for very small pieces
of data such as identifiers. I would probably use Session OR if it was THAT
big of a deal, get the data from the database on every request.

Best regards,
Jeffrey Palermo

"Mark Whitton" <mark.whitton@tiscali.co.uk> wrote in message
news:eEMup$udEHA.712@TK2MSFTNGP09.phx.gbl...
> Hi, I am developing using ASP.Net using SQL Server and also have several
> layers in between, eventually producing a custom business object that is
> used to populate the web form. I don't use datasets because of

performance
> issues and also they just aren't proper business entities.
>
> When it comes to updating my database I generally use an identity value

and
> a datetime value to avoid multiple updates. e.g. Update Customers set

......
> where Id = :Id and DateModified=:DateModified.
>
> My problem is deciding where I should store this data within the webforms
> layer. I don't want to store the whole business object as the majority of
> the data is displayed on the webform, and only want to store the data
> necessary to allow me to update on postback. I believe Session state is
> not the answer, and application state is definitely not the answer, which
> leaves me with View state or cookies. The problem with both of these is
> security and also performance.
>
> I'd appreciate your thoughts.
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com