<?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: ASP.NET MVC Framework</title>
	<atom:link href="http://averyblog.com/net/asp-net-mvc-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://averyblog.com/net/asp-net-mvc-framework/</link>
	<description>This is not the greatest tagline in the world... this is just a tribute.</description>
	<lastBuildDate>Mon, 11 Jan 2010 16:36:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Codeville</title>
		<link>http://averyblog.com/net/asp-net-mvc-framework/comment-page-1/#comment-2222</link>
		<dc:creator>Codeville</dc:creator>
		<pubDate>Tue, 06 Nov 2007 17:36:35 +0000</pubDate>
		<guid isPermaLink="false">http://averyblog.infozerk.net/?p=667#comment-2222</guid>
		<description>&lt;p&gt;Another angle on this whole design strategy is to get a similar framework running in the browser itself. This way you can allow the data model to be modified, and the UI updated, without any client/server interaction.&lt;br /&gt;&lt;br /&gt;I&#039;ve been working on an open-source client-side MVC library for ASP.NET 2.0 which you might like to check out if the idea appeals. See &lt;a target=&quot;_blank&quot; href=&quot;http://blog.codeville.net/2007/10/18/jmvcnet-neat-client-side-mvc-for-aspnet/&lt;br&quot; rel=&quot;nofollow&quot;&gt;blog.codeville.net/.../&lt;br&lt;/a&gt; /&gt;There are some quick demos on the site which show the source code.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Another angle on this whole design strategy is to get a similar framework running in the browser itself. This way you can allow the data model to be modified, and the UI updated, without any client/server interaction.</p>
<p>I&#8217;ve been working on an open-source client-side MVC library for ASP.NET 2.0 which you might like to check out if the idea appeals. See <a target="_blank" href="http://blog.codeville.net/2007/10/18/jmvcnet-neat-client-side-mvc-for-aspnet/<br" rel="nofollow">blog.codeville.net/&#8230;/<br </a/> />There are some quick demos on the site which show the source code.</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scottgu</title>
		<link>http://averyblog.com/net/asp-net-mvc-framework/comment-page-1/#comment-2225</link>
		<dc:creator>Scottgu</dc:creator>
		<pubDate>Fri, 19 Oct 2007 05:30:14 +0000</pubDate>
		<guid isPermaLink="false">http://averyblog.infozerk.net/?p=667#comment-2225</guid>
		<description>&lt;p&gt;All methods on the Controller and ControllerBase classes are virtual, and are designed so that you can override all built-in semantics and policy.&lt;br /&gt;&lt;br /&gt;If you want to invent your own policy entirely, you can also just implement the IController interface:&lt;br /&gt;&lt;br /&gt;interface IController &lt;br /&gt;{&lt;br /&gt;   public void Execute(IHttpContext context, RouteData data);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;This Execute method takes an interface based version of the HttpRequest/Response/Server/Application/Session intrinsics (enabling easy mocking) as a parameter, as well as the tokenized URL route information (based on your route table).  If you want to build a completely different controller abstraction you could use this to implement whatever policy you want.&lt;br /&gt;&lt;br /&gt;Hope this helps,&lt;br /&gt;&lt;br /&gt;Scott&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>All methods on the Controller and ControllerBase classes are virtual, and are designed so that you can override all built-in semantics and policy.</p>
<p>If you want to invent your own policy entirely, you can also just implement the IController interface:</p>
<p>interface IController <br />{<br />   public void Execute(IHttpContext context, RouteData data);<br />}</p>
<p>This Execute method takes an interface based version of the HttpRequest/Response/Server/Application/Session intrinsics (enabling easy mocking) as a parameter, as well as the tokenized URL route information (based on your route table).  If you want to build a completely different controller abstraction you could use this to implement whatever policy you want.</p>
<p>Hope this helps,</p>
<p>Scott</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JAmes avery</title>
		<link>http://averyblog.com/net/asp-net-mvc-framework/comment-page-1/#comment-2224</link>
		<dc:creator>JAmes avery</dc:creator>
		<pubDate>Fri, 19 Oct 2007 04:43:42 +0000</pubDate>
		<guid isPermaLink="false">http://averyblog.infozerk.net/?p=667#comment-2224</guid>
		<description>&lt;p&gt;Scott,&lt;br /&gt;   Very cool. As long as I can extend it like that I am very happy. :)&lt;br /&gt;&lt;br /&gt;-Jame&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Scott,<br />   Very cool. As long as I can extend it like that I am very happy. <img src='http://averyblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>-Jame</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scottgu</title>
		<link>http://averyblog.com/net/asp-net-mvc-framework/comment-page-1/#comment-2223</link>
		<dc:creator>Scottgu</dc:creator>
		<pubDate>Fri, 19 Oct 2007 04:02:34 +0000</pubDate>
		<guid isPermaLink="false">http://averyblog.infozerk.net/?p=667#comment-2223</guid>
		<description>&lt;p&gt;&gt;&gt;&gt;&gt;&gt;&gt; I don&#039;t really buy that rationale. I don&#039;t see how it breaks separation of concern either. You are sending data from the controller to the view, why does it matter if it is explicit or implicit? &lt;br /&gt;&lt;br /&gt;Consider the scenario where you are using property dependency injection on your controller, and have a public IDataRepository property that you expose from your controller.&lt;br /&gt;&lt;br /&gt;For clean separation of concerns you want to make sure that your data repository isn&#039;t directly passed to your view.  If all properties were passed automatically you could inadvertainly have your view gain access to this.&lt;br /&gt;&lt;br /&gt;Having said that - if you do want to send all properties of your controller to the view, just pass a &quot;this&quot; reference when rendering the view:&lt;br /&gt;&lt;br /&gt;public class ProductsController : Controller&lt;br /&gt;{&lt;br /&gt;   public string Message { get; set; }&lt;br /&gt;&lt;br /&gt;   [ControllerAction]&lt;br /&gt;   public void Edit(int id)&lt;br /&gt;   {&lt;br /&gt;      this.Message = &quot;Hi James&quot;;&lt;br /&gt;&lt;br /&gt;      RenderView(&quot;Edit&quot;, this);&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Alternatively, you could create a JamesController base class that overrides the default RenderView virtual method and does this by default:&lt;br /&gt;&lt;br /&gt;public class JamesController : Controller&lt;br /&gt;{&lt;br /&gt;   protected override RenderView(string viewName) {&lt;br /&gt;       RenderView(viewName, this);&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;You could then just write your controller like below and have the behavior you want:&lt;br /&gt;&lt;br /&gt;public class ProductsController : JamesController&lt;br /&gt;{&lt;br /&gt;   public string Message { get; set; }&lt;br /&gt;&lt;br /&gt;   [ControllerAction]&lt;br /&gt;   public void Edit(int id)&lt;br /&gt;   {&lt;br /&gt;      this.Message = &quot;Hi James&quot;;&lt;br /&gt;&lt;br /&gt;      RenderView(&quot;Edit&quot;);&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Hope this helps,&lt;br /&gt;&lt;br /&gt;Scott&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>&gt;&gt;&gt;&gt;&gt;&gt; I don&#8217;t really buy that rationale. I don&#8217;t see how it breaks separation of concern either. You are sending data from the controller to the view, why does it matter if it is explicit or implicit? </p>
<p>Consider the scenario where you are using property dependency injection on your controller, and have a public IDataRepository property that you expose from your controller.</p>
<p>For clean separation of concerns you want to make sure that your data repository isn&#8217;t directly passed to your view.  If all properties were passed automatically you could inadvertainly have your view gain access to this.</p>
<p>Having said that &#8211; if you do want to send all properties of your controller to the view, just pass a &#8220;this&#8221; reference when rendering the view:</p>
<p>public class ProductsController : Controller<br />{<br />   public string Message { get; set; }</p>
<p>   [ControllerAction]<br />   public void Edit(int id)<br />   {<br />      this.Message = &#8220;Hi James&#8221;;</p>
<p>      RenderView(&#8221;Edit&#8221;, this);<br />   }<br />}</p>
<p>Alternatively, you could create a JamesController base class that overrides the default RenderView virtual method and does this by default:</p>
<p>public class JamesController : Controller<br />{<br />   protected override RenderView(string viewName) {<br />       RenderView(viewName, this);<br />   }<br />}</p>
<p>You could then just write your controller like below and have the behavior you want:</p>
<p>public class ProductsController : JamesController<br />{<br />   public string Message { get; set; }</p>
<p>   [ControllerAction]<br />   public void Edit(int id)<br />   {<br />      this.Message = &#8220;Hi James&#8221;;</p>
<p>      RenderView(&#8221;Edit&#8221;);<br />   }<br />}</p>
<p>Hope this helps,</p>
<p>Scott</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JAmes avery</title>
		<link>http://averyblog.com/net/asp-net-mvc-framework/comment-page-1/#comment-2234</link>
		<dc:creator>JAmes avery</dc:creator>
		<pubDate>Tue, 16 Oct 2007 18:44:57 +0000</pubDate>
		<guid isPermaLink="false">http://averyblog.infozerk.net/?p=667#comment-2234</guid>
		<description>&lt;p&gt;Damien,&lt;br /&gt;  I don&#039;t really buy that rationale. I don&#039;t see how it breaks separation of concern either. You are sending data from the controller to the view, why does it matter if it is explicit or implicit? If it is implicit you just have to remember that your properties are going to be exposed to any view you call.&lt;br /&gt;&lt;br /&gt;-James&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Damien,<br />  I don&#8217;t really buy that rationale. I don&#8217;t see how it breaks separation of concern either. You are sending data from the controller to the view, why does it matter if it is explicit or implicit? If it is implicit you just have to remember that your properties are going to be exposed to any view you call.</p>
<p>-James</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damien Guard</title>
		<link>http://averyblog.com/net/asp-net-mvc-framework/comment-page-1/#comment-2233</link>
		<dc:creator>Damien Guard</dc:creator>
		<pubDate>Tue, 16 Oct 2007 18:29:46 +0000</pubDate>
		<guid isPermaLink="false">http://averyblog.infozerk.net/?p=667#comment-2233</guid>
		<description>&lt;p&gt;By doing that you are effectively removing the contract or interface between the controller and the view.&lt;br /&gt;&lt;br /&gt;Besides going against the spirit of seperation of concern it also means you could expose sensitive data where you have re-used a view not realising one of the variables the view uses is not sensitive on one controller but sensitive on another.&lt;br /&gt;&lt;br /&gt;[)amien&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>By doing that you are effectively removing the contract or interface between the controller and the view.</p>
<p>Besides going against the spirit of seperation of concern it also means you could expose sensitive data where you have re-used a view not realising one of the variables the view uses is not sensitive on one controller but sensitive on another.</p>
<p>[)amien</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Magnus M&#229;rtensson</title>
		<link>http://averyblog.com/net/asp-net-mvc-framework/comment-page-1/#comment-2232</link>
		<dc:creator>Magnus M&#229;rtensson</dc:creator>
		<pubDate>Tue, 16 Oct 2007 17:27:53 +0000</pubDate>
		<guid isPermaLink="false">http://averyblog.infozerk.net/?p=667#comment-2232</guid>
		<description>&lt;p&gt;Any generic solution to this and the option to choose is alright with me!&lt;br /&gt;&lt;br /&gt;/Magnus&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Any generic solution to this and the option to choose is alright with me!</p>
<p>/Magnus</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JAmes avery</title>
		<link>http://averyblog.com/net/asp-net-mvc-framework/comment-page-1/#comment-2231</link>
		<dc:creator>JAmes avery</dc:creator>
		<pubDate>Tue, 16 Oct 2007 16:17:43 +0000</pubDate>
		<guid isPermaLink="false">http://averyblog.infozerk.net/?p=667#comment-2231</guid>
		<description>&lt;p&gt;Scott,&lt;br /&gt;   I didn&#039;t know about the ViewData collection, I like that a little bit better than having to send the data explicitly in the call. What might be the best way to handle it would be to include two controller types, one that lets you specify and the other that wraps it up automatically. I guess I could just create that controller type when it comes out, but it would be cool to have it baked in.&lt;br /&gt;&lt;br /&gt;What does everyone else think?&lt;br /&gt;&lt;br /&gt;-James&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Scott,<br />   I didn&#8217;t know about the ViewData collection, I like that a little bit better than having to send the data explicitly in the call. What might be the best way to handle it would be to include two controller types, one that lets you specify and the other that wraps it up automatically. I guess I could just create that controller type when it comes out, but it would be cool to have it baked in.</p>
<p>What does everyone else think?</p>
<p>-James</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scottgu</title>
		<link>http://averyblog.com/net/asp-net-mvc-framework/comment-page-1/#comment-2230</link>
		<dc:creator>Scottgu</dc:creator>
		<pubDate>Tue, 16 Oct 2007 05:38:56 +0000</pubDate>
		<guid isPermaLink="false">http://averyblog.infozerk.net/?p=667#comment-2230</guid>
		<description>&lt;p&gt;The policy on how you pass data from a Controller to a View is easy to change if you want (everything on the Controller base class is virtual).  So if you want to automatically scoop up local variables and pass them that is easy to-do.&lt;br /&gt;&lt;br /&gt;By default the Controller base class has a ViewData collection that you can use to add just the variables you want to the view.  Alternatively, you can pass the viewdata object directly as part of the RenderView method:&lt;br /&gt;&lt;br /&gt;   RenderView(&quot;Edit&quot;, myProduct);&lt;br /&gt;&lt;br /&gt;The reason we currently don&#039;t by default send all instance variables was that in app-building we found that you often had instance data that was controller specific (or action specific) and that you didn&#039;t necessarily want to send all of this to each view.  It felt a little unclean to automatically send everything to the view.  It is something we&#039;ll ceretainly be interested in feedback on with the first preview.  As I mentioned above - it is only about 5 lines of code to change it (so if people prefer it different we can definitely change it). :-)&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;Scott&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>The policy on how you pass data from a Controller to a View is easy to change if you want (everything on the Controller base class is virtual).  So if you want to automatically scoop up local variables and pass them that is easy to-do.</p>
<p>By default the Controller base class has a ViewData collection that you can use to add just the variables you want to the view.  Alternatively, you can pass the viewdata object directly as part of the RenderView method:</p>
<p>   RenderView(&#8221;Edit&#8221;, myProduct);</p>
<p>The reason we currently don&#8217;t by default send all instance variables was that in app-building we found that you often had instance data that was controller specific (or action specific) and that you didn&#8217;t necessarily want to send all of this to each view.  It felt a little unclean to automatically send everything to the view.  It is something we&#8217;ll ceretainly be interested in feedback on with the first preview.  As I mentioned above &#8211; it is only about 5 lines of code to change it (so if people prefer it different we can definitely change it). <img src='http://averyblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Thanks,</p>
<p>Scott</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JAmes avery</title>
		<link>http://averyblog.com/net/asp-net-mvc-framework/comment-page-1/#comment-2229</link>
		<dc:creator>JAmes avery</dc:creator>
		<pubDate>Tue, 16 Oct 2007 05:26:51 +0000</pubDate>
		<guid isPermaLink="false">http://averyblog.infozerk.net/?p=667#comment-2229</guid>
		<description>&lt;p&gt;Chad,&lt;br /&gt;   They might of, but I don&#039;t remember. But that is exactly what I am looking for, just some way to keep it nice and simple instead of having to specify it.&lt;br /&gt;&lt;br /&gt;-James&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Chad,<br />   They might of, but I don&#8217;t remember. But that is exactly what I am looking for, just some way to keep it nice and simple instead of having to specify it.</p>
<p>-James</p>
]]></content:encoded>
	</item>
</channel>
</rss>

