开发者

Is there any other way to store data in web application

We use ViewState to store data that is being edited by user开发者_如何转开发s. However, ViewState just got too large so we really want something that is faster.

We considered session, but it has to be manually collected when users travel among pages.

Does anybody has suggestions?

Update: Actually I am using Asp.net. They reason we do not want to use session is: 1. We don't need to carry our data among pages. 2. When developer put something into session, he has to remember to delete it if it is no longer useful. Otherwise, the session will get bigger and bigger. This is kind of trival.


You say you want the data stored server side and its should be automatically available?

You could trick the viewstate into storing its data in session rather than a hidden field by using this technique:

  • http://aspadvice.com/blogs/robertb/archive/2005/11/16/13835.aspx

You might find this article interesting as well which shows another technique to store your viewstate server side:

  • http://msdn.microsoft.com/en-us/magazine/cc188774.aspx#S6

Despite the initial complexity of getting this set up I think it would be the best solution because then you don't have to change your code throughout, it can still use ViewState as normal without realising this is now saved on the server.


You can look into Conversations.

http://evolutionarygoo.com/blog/?p=68

http://code.google.com/p/google-guice/issues/detail?id=5


You can use the database as a alternate to the session store. This would scale in terms of the size of the data stored, and if you use an appropriate caching strategy you can reduce the overhead of retrieving the data a great deal.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜