<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: How I Learned to Stop Worrying and Love the View State</title>
	<atom:link href="http://blog.tatham.oddie.com.au/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tatham.oddie.com.au/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/</link>
	<description>Enter the Tatrix</description>
	<lastBuildDate>Wed, 10 Mar 2010 19:33:53 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: urkurk</title>
		<link>http://blog.tatham.oddie.com.au/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-14266</link>
		<dc:creator>urkurk</dc:creator>
		<pubDate>Mon, 04 Jan 2010 09:05:21 +0000</pubDate>
		<guid isPermaLink="false">http://tatham.wordpress.com/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-14266</guid>
		<description>hi tatham

i tried loading the treeview data only when it isn&#039;t a page postback and the duplication was fixed

is this the right way to do it?</description>
		<content:encoded><![CDATA[<p>hi tatham</p>
<p>i tried loading the treeview data only when it isn&#8217;t a page postback and the duplication was fixed</p>
<p>is this the right way to do it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: urkurk</title>
		<link>http://blog.tatham.oddie.com.au/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-14263</link>
		<dc:creator>urkurk</dc:creator>
		<pubDate>Mon, 04 Jan 2010 08:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://tatham.wordpress.com/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-14263</guid>
		<description>hi tatham,

thank u for this article...

however when i tried placing my code to populate a treeview inside the page init event the items added were duplicated for each page postback.

can you pls. explain why this is happening and what is the proper way to fix it?

thanks.</description>
		<content:encoded><![CDATA[<p>hi tatham,</p>
<p>thank u for this article&#8230;</p>
<p>however when i tried placing my code to populate a treeview inside the page init event the items added were duplicated for each page postback.</p>
<p>can you pls. explain why this is happening and what is the proper way to fix it?</p>
<p>thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Knowledgebase &#187; Blog Archive &#187; How disabling viewstate on ASP .NET 2.0 website effects you&#8217;re code</title>
		<link>http://blog.tatham.oddie.com.au/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-14257</link>
		<dc:creator>Knowledgebase &#187; Blog Archive &#187; How disabling viewstate on ASP .NET 2.0 website effects you&#8217;re code</dc:creator>
		<pubDate>Tue, 29 Dec 2009 09:18:50 +0000</pubDate>
		<guid isPermaLink="false">http://tatham.wordpress.com/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-14257</guid>
		<description>[...] on viewstate, read: http://blog.tatham.oddie.com.au/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/   Share and [...]</description>
		<content:encoded><![CDATA[<p>[...] on viewstate, read: <a href="http://blog.tatham.oddie.com.au/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/" rel="nofollow">http://blog.tatham.oddie.com.au/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/</a>   Share and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reading for the day &#171; dotnet etc.</title>
		<link>http://blog.tatham.oddie.com.au/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-13736</link>
		<dc:creator>Reading for the day &#171; dotnet etc.</dc:creator>
		<pubDate>Wed, 04 Feb 2009 17:41:34 +0000</pubDate>
		<guid isPermaLink="false">http://tatham.wordpress.com/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-13736</guid>
		<description>[...] a comment &#187;  I want to share 2 links here: 1) Top 25 dangerous programming practices 2) How I Learned to Stop Worrying and Love the View State 3) Why does projects/leadership failes? Possibly related posts: (automatically generated)Deferred: [...]</description>
		<content:encoded><![CDATA[<p>[...] a comment &raquo;  I want to share 2 links here: 1) Top 25 dangerous programming practices 2) How I Learned to Stop Worrying and Love the View State 3) Why does projects/leadership failes? Possibly related posts: (automatically generated)Deferred: [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tatham Oddie</title>
		<link>http://blog.tatham.oddie.com.au/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-13696</link>
		<dc:creator>Tatham Oddie</dc:creator>
		<pubDate>Thu, 25 Dec 2008 12:15:15 +0000</pubDate>
		<guid isPermaLink="false">http://tatham.wordpress.com/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-13696</guid>
		<description>Hi Tom,

Thanks for your comment!

I definitely agree with you that the applications with the best opportunity to scale are those that do not require server-side statefulness. View state is a great tool for involving the client in this process.

That being said, loading a list of countries (which was my example) is by no means an expansive exercise. It also places no requirement on server side state if we are to remove this from the view state - it&#039;s the same list of countries irrespective of who is loading the page.

If it was an expensive list to load, we could cache this in the HttpContext.Current.Cache property which is shared between sessions and thus would not affect our capacity to scale.

If we needed to filter the list of countries in a way that was session-specific, such as only showing countries within a specific region, all we need to do is store the &lt;em&gt;region&lt;/em&gt; in the view state. The process of evaluating which countries are in that region and loading them into the control can still be completed in the Init event. This keeps our view state small and scalability high at the same time.

Do you agree with all that?

- Tatham</description>
		<content:encoded><![CDATA[<p>Hi Tom,</p>
<p>Thanks for your comment!</p>
<p>I definitely agree with you that the applications with the best opportunity to scale are those that do not require server-side statefulness. View state is a great tool for involving the client in this process.</p>
<p>That being said, loading a list of countries (which was my example) is by no means an expansive exercise. It also places no requirement on server side state if we are to remove this from the view state &#8211; it&#8217;s the same list of countries irrespective of who is loading the page.</p>
<p>If it was an expensive list to load, we could cache this in the HttpContext.Current.Cache property which is shared between sessions and thus would not affect our capacity to scale.</p>
<p>If we needed to filter the list of countries in a way that was session-specific, such as only showing countries within a specific region, all we need to do is store the <em>region</em> in the view state. The process of evaluating which countries are in that region and loading them into the control can still be completed in the Init event. This keeps our view state small and scalability high at the same time.</p>
<p>Do you agree with all that?</p>
<p>- Tatham</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Pester</title>
		<link>http://blog.tatham.oddie.com.au/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-13693</link>
		<dc:creator>Tom Pester</dc:creator>
		<pubDate>Sat, 20 Dec 2008 16:01:48 +0000</pubDate>
		<guid isPermaLink="false">http://tatham.wordpress.com/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-13693</guid>
		<description>Although I agree that an asp.net developer has to keep an eye on the viewstate the pattern you describe of binding the result of an expensive call to the database in the pageload event is actualy intended. I don&#039;t want to speak for the architects that made asp.net but their intention was that to make scalable web applications the client got involved in maintaining state.
If you aim for high performant websites that scale it is actualy beneficial to store results on the client (within reason!) so that the server can get all the info it needs of the browser request and doesn&#039;t need to query the database in successive calls.
If viewstate becomes too big than your have the solution in your post if you put the database result in the cache. But if the information is to be scope to the user and not the whole application it *can* become less scalable if the info was stored in a session variale on the server (1000 users = 1000 * size of the session).
After reading a few books on wcf and conurrent systems I learned that the server is busy with only a small percentage of its users at any give time (I dont know the exact and it depents on the situation but the percentage but its surprisingly low).
If the server can &quot;forget&quot; everything after a request can be handled its througput can be increases. Using the client as a database (viewstate) makes it possible for the server to handle each next request &quot;in memory&quot; and he does not have to remember a thing for the client.</description>
		<content:encoded><![CDATA[<p>Although I agree that an asp.net developer has to keep an eye on the viewstate the pattern you describe of binding the result of an expensive call to the database in the pageload event is actualy intended. I don&#8217;t want to speak for the architects that made asp.net but their intention was that to make scalable web applications the client got involved in maintaining state.<br />
If you aim for high performant websites that scale it is actualy beneficial to store results on the client (within reason!) so that the server can get all the info it needs of the browser request and doesn&#8217;t need to query the database in successive calls.<br />
If viewstate becomes too big than your have the solution in your post if you put the database result in the cache. But if the information is to be scope to the user and not the whole application it *can* become less scalable if the info was stored in a session variale on the server (1000 users = 1000 * size of the session).<br />
After reading a few books on wcf and conurrent systems I learned that the server is busy with only a small percentage of its users at any give time (I dont know the exact and it depents on the situation but the percentage but its surprisingly low).<br />
If the server can &#8220;forget&#8221; everything after a request can be handled its througput can be increases. Using the client as a database (viewstate) makes it possible for the server to handle each next request &#8220;in memory&#8221; and he does not have to remember a thing for the client.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tatham Oddie</title>
		<link>http://blog.tatham.oddie.com.au/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-13692</link>
		<dc:creator>Tatham Oddie</dc:creator>
		<pubDate>Sat, 20 Dec 2008 09:05:41 +0000</pubDate>
		<guid isPermaLink="false">http://tatham.wordpress.com/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-13692</guid>
		<description>Hi Josh,

In this case I was using a standard DropDownList control as an example.

I discuss separating things into custom controls in my next post:

http://blog.tatham.oddie.com.au/2008/12/20/accessing-aspnet-page-controls-during-preinit/

I broke it out separately because:

a) not everything can be subclassed (or is worth it)
b) to subclass it, you need to be aware of an intricacy with the PreInit event which I felt went beyond the scope of this post.

Thanks for the great comment!

- Tatham</description>
		<content:encoded><![CDATA[<p>Hi Josh,</p>
<p>In this case I was using a standard DropDownList control as an example.</p>
<p>I discuss separating things into custom controls in my next post:</p>
<p><a href="http://blog.tatham.oddie.com.au/2008/12/20/accessing-aspnet-page-controls-during-preinit/" rel="nofollow">http://blog.tatham.oddie.com.au/2008/12/20/accessing-aspnet-page-controls-during-preinit/</a></p>
<p>I broke it out separately because:</p>
<p>a) not everything can be subclassed (or is worth it)<br />
b) to subclass it, you need to be aware of an intricacy with the PreInit event which I felt went beyond the scope of this post.</p>
<p>Thanks for the great comment!</p>
<p>- Tatham</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Accessing ASP.NET Page Controls During PreInit &#171; Enter the Tatrix</title>
		<link>http://blog.tatham.oddie.com.au/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-13691</link>
		<dc:creator>Accessing ASP.NET Page Controls During PreInit &#171; Enter the Tatrix</dc:creator>
		<pubDate>Fri, 19 Dec 2008 20:33:12 +0000</pubDate>
		<guid isPermaLink="false">http://tatham.wordpress.com/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-13691</guid>
		<description>[...] a comment &#187;  If you’ve read my previous post explaining a common pitfall with view state, I’d hope you’re preparing all your controls in the Init event of the page/control [...]</description>
		<content:encoded><![CDATA[<p>[...] a comment &raquo;  If you’ve read my previous post explaining a common pitfall with view state, I’d hope you’re preparing all your controls in the Init event of the page/control [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Rivers</title>
		<link>http://blog.tatham.oddie.com.au/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-13690</link>
		<dc:creator>Josh Rivers</dc:creator>
		<pubDate>Fri, 19 Dec 2008 18:33:01 +0000</pubDate>
		<guid isPermaLink="false">http://tatham.wordpress.com/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-13690</guid>
		<description>Should the code go into the Control&#039;s init handler rather than the page&#039;s? That might provide for better separation.</description>
		<content:encoded><![CDATA[<p>Should the code go into the Control&#8217;s init handler rather than the page&#8217;s? That might provide for better separation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tatham Oddie</title>
		<link>http://blog.tatham.oddie.com.au/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-13688</link>
		<dc:creator>Tatham Oddie</dc:creator>
		<pubDate>Thu, 18 Dec 2008 21:27:54 +0000</pubDate>
		<guid isPermaLink="false">http://tatham.wordpress.com/2008/12/18/how-i-learned-to-stop-worrying-and-love-the-view-state/#comment-13688</guid>
		<description>Hi Andy,

Thanks for your response.

If the list of countries is expensive to retreive, although common across different users, then we should be storing it on the servers cache. This way we can keep our view state small as well as improving performance for _all_ users on the site.

Re: EnableViewState. If we populate the control at the correct stage of the lifecycle, we do not need to fallback to setting this property. Filling a control from the Load event, wrapping it in an IsPostBack check and setting EnableViewState to false sounds like a lot more hacking than just moving the population code to the Init event.

- Tatham</description>
		<content:encoded><![CDATA[<p>Hi Andy,</p>
<p>Thanks for your response.</p>
<p>If the list of countries is expensive to retreive, although common across different users, then we should be storing it on the servers cache. This way we can keep our view state small as well as improving performance for _all_ users on the site.</p>
<p>Re: EnableViewState. If we populate the control at the correct stage of the lifecycle, we do not need to fallback to setting this property. Filling a control from the Load event, wrapping it in an IsPostBack check and setting EnableViewState to false sounds like a lot more hacking than just moving the population code to the Init event.</p>
<p>- Tatham</p>
]]></content:encoded>
	</item>
</channel>
</rss>
