<?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/"
		>
<channel>
	<title>Comments on: How do you maintain type-safety in web applications?</title>
	<atom:link href="http://www.alsonkemp.com/turbinado/how-do-you-maintain-type-safety-in-web-applications/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alsonkemp.com/turbinado/how-do-you-maintain-type-safety-in-web-applications/</link>
	<description>Hackfoofery</description>
	<lastBuildDate>Sat, 18 May 2013 16:45:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: alson</title>
		<link>http://www.alsonkemp.com/turbinado/how-do-you-maintain-type-safety-in-web-applications/comment-page-1/#comment-560</link>
		<dc:creator>alson</dc:creator>
		<pubDate>Tue, 15 Jun 2010 21:59:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.alsonkemp.com/?p=361#comment-560</guid>
		<description><![CDATA[&lt;p&gt;Doh.  Typo.  Meant viewData, but got mixed up with ASP.NET&#039;s viewState.  Corrected.  Relevant: http://msdn.microsoft.com/en-us/library/dd394711.aspx&lt;/p&gt;

&lt;p&gt;I think you&#039;re saying that you can pass (for example) an instance of the Person &quot;model&quot; to the controller.  While that does provide type safety, it&#039;s a fairly trivial case.  Passing a concrete type means that separate concrete datatypes would needed for nearly every view and, in any reasonably sized web app, that means hundreds of datatypes.  This is my basic gripe (not with ASP.NET, but with statically types languages in general).  I would love to find a way to stuff a bunch of variables into a heterogeneous collection and be able to prove that the controller and view were in-sync.  Unfortunately, this looks like a seriously non-trivial problem since Views may or may not access certain parts of datatypes/structures making it difficult to understand whether an inbound datatype will satisfy completely the view.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Doh.  Typo.  Meant viewData, but got mixed up with ASP.NET&#8217;s viewState.  Corrected.  Relevant: <a href="http://msdn.microsoft.com/en-us/library/dd394711.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/dd394711.aspx</a></p>

<p>I think you&#8217;re saying that you can pass (for example) an instance of the Person &#8220;model&#8221; to the controller.  While that does provide type safety, it&#8217;s a fairly trivial case.  Passing a concrete type means that separate concrete datatypes would needed for nearly every view and, in any reasonably sized web app, that means hundreds of datatypes.  This is my basic gripe (not with ASP.NET, but with statically types languages in general).  I would love to find a way to stuff a bunch of variables into a heterogeneous collection and be able to prove that the controller and view were in-sync.  Unfortunately, this looks like a seriously non-trivial problem since Views may or may not access certain parts of datatypes/structures making it difficult to understand whether an inbound datatype will satisfy completely the view.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivica Munitic</title>
		<link>http://www.alsonkemp.com/turbinado/how-do-you-maintain-type-safety-in-web-applications/comment-page-1/#comment-559</link>
		<dc:creator>Ivica Munitic</dc:creator>
		<pubDate>Tue, 15 Jun 2010 21:18:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.alsonkemp.com/?p=361#comment-559</guid>
		<description><![CDATA[&lt;p&gt;Just a explanation. ASP.NET WebForms uses ViewState ASP.NET MVC does not. ASP.NET WebForms (usualy just called ASP.NET) and ASP.NET MVC are two different beasts. With ASP.NET MVC you have type safety when moving data from controller to view because the views can be typed. You can pass a concrete type to a view from the controller by writing return View(model) at the end of your controller action. The model variable is a concrete type that will be available in the view as the Model property. Visual Studio IDE can even give you inetllisense for your views. Because views are not compiled right away but rather at the first moment they are used the c# compiler will not issue compile time errors if you misspell something in the view but it will throw an exception on runtime. Tools like resharper (Visual Studio plugin that every .net developer must have) can spot these errors and give you warnings before you run them.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Just a explanation. ASP.NET WebForms uses ViewState ASP.NET MVC does not. ASP.NET WebForms (usualy just called ASP.NET) and ASP.NET MVC are two different beasts. With ASP.NET MVC you have type safety when moving data from controller to view because the views can be typed. You can pass a concrete type to a view from the controller by writing return View(model) at the end of your controller action. The model variable is a concrete type that will be available in the view as the Model property. Visual Studio IDE can even give you inetllisense for your views. Because views are not compiled right away but rather at the first moment they are used the c# compiler will not issue compile time errors if you misspell something in the view but it will throw an exception on runtime. Tools like resharper (Visual Studio plugin that every .net developer must have) can spot these errors and give you warnings before you run them.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Object Caching 276/298 objects using disk: basic
Content Delivery Network via Amazon Web Services: CloudFront: d1r5286bar8cf9.cloudfront.net

 Served from: www.alsonkemp.com @ 2013-05-21 13:15:18 by W3 Total Cache -->