{"id":14,"date":"2007-04-29T15:58:00","date_gmt":"2007-04-29T19:58:00","guid":{"rendered":"http:\/\/warriormill.com\/?p=14"},"modified":"2009-04-09T07:16:26","modified_gmt":"2009-04-09T11:16:26","slug":"viewstateeliminator-v10","status":"publish","type":"post","link":"https:\/\/warriormill.com\/2007\/04\/viewstateeliminator-v10\/","title":{"rendered":"ViewstateEliminator V1.0"},"content":{"rendered":"

This is a solution for stripping out viewstate<\/span><\/span> before it hits the client. The thought for making this utility was the following, viewstate<\/span><\/span> has no real use fullness<\/span> on they client besides reconstructing<\/span> the control tree and as a state bag. Most of the time developers turn viewstate<\/span><\/span> off on controls because it tends to become huge and slows down the streaming of content.<\/p>\n

Even when using Ajax API’s<\/span><\/span> such as Microsoft Ajax and Anthem.Net viewstate<\/span><\/span> is still passed back and forth. So even though we get partial page updates we are still passing through that big chunk back and forth, watch we have done is we have disguised the problem but not solve<\/span> it.<\/span>
<\/span>
What has been done is eliminated<\/span> viewstate<\/span> being sent out to the client and being stored in another medium.<\/span>
<\/span>
Current Supported mediums:<\/span><\/p>\n

    \n
  1. SQL<\/span> Database<\/strong><\/span><\/li>\n
  2. Session<\/strong><\/span><\/li>\n<\/ol>\n

    SQLDatabase<\/span> is inserting viewstate<\/span> into a table given certain keys.<\/span><\/p>\n

    Session was chosen as a storage method also after a friend asked me “so what are you doing sticking it in session?”….I answered no. Then it got me to thinking well…what if i do store it in session…what would be so bad? Session…well what would be the impact<\/span> of the different flavors of session..<\/span><\/p>\n

      \n
    1. InProc<\/span> Session: I would avoid a round trip to the server and it would be saved in memory…If i also compress it it shouldn’t<\/span> be so bad.<\/span><\/li>\n
    2. Session State Server: In this case i piggy back of the session state server and double it as a viewstate<\/span> server as well.<\/span><\/li>\n<\/ol>\n

      The Session & Database methods helps the issue of retrieving the right viewstate<\/span> from a web farm.<\/span><\/p>\n

      <\/span><\/p>\n

      So I have put a W.I.P version on codeplex<\/span> that i will be updating on the weekend….I know right now its not Pure OO<\/span> … its not something that Jean-Paul S Boodhoo<\/span> would approve lol<\/span><\/span><\/p>\n

      <\/span><\/p>\n

      http:\/\/www.codeplex.com\/ViewStateEliminator<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"

      This is a solution for stripping out viewstate before it hits the client. The thought for making this utility was the following, viewstate has no real use fullness on they client besides reconstructing the control tree and as a state bag. Most of the time developers turn viewstate off on controls because it tends to […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[60,69],"_links":{"self":[{"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/posts\/14"}],"collection":[{"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":2,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":683,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/posts\/14\/revisions\/683"}],"wp:attachment":[{"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/media?parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/categories?post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/tags?post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}