<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><!--   Nsquared2 RSS generator v 1.0 --><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
    <channel>
        <title>Fredrik Normén's Blog</title>
        <link>http://fredrik.nsquared2.com</link>
        <description />
        <copyright>Copyright 2004 by Fredrik Normén</copyright>
        <language>en-US</language>
        <generator>Nsquared2 RSS generator v 1.0</generator>
        <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/FredrikNormnsBlog" type="application/rss+xml" /><item>
            <pubDate>Fri, 08 Feb 2008 14:46:18 GMT</pubDate>
            <category>Other</category>
            <title>Moved my blog.</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/discercCID4/viewpost.aspx</link>
            <description>&lt;P&gt;Hi everyone that still visit this blog.&lt;/P&gt;
&lt;P&gt;I have now moved it to the following address: &lt;A href="http://weblogs.asp.net/fredriknormen/"&gt;http://weblogs.asp.net/fredriknormen/&lt;/A&gt;&amp;nbsp;, and will not use &lt;A href="http://fredrik.nsquared2.com"&gt;http://fredrik.nsquared2.com&lt;/A&gt;&amp;nbsp;it will only be&amp;nbsp; used for accessing my earlier posts.&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Fredrik Norm&amp;#233;n&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/discercCID4" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=475</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=475</feedburner:origLink></item>
        <item>
            <pubDate>Tue, 27 Nov 2007 12:19:53 GMT</pubDate>
            <category>Design and Architecture</category>
            <title>MVC - Expression Language and custom tags</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/Xbj7ZNJvNDA/viewpost.aspx</link>
            <description>&lt;A href="http://weblogs.asp.net/fredriknormen/archive/2007/11/27/mvc-expression-language-and-custom-tags.aspx"&gt;&lt;FONT face=Verdana size=2&gt;MVC - Expression Language and custom tags&lt;/FONT&gt;&lt;/A&gt; 
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/Xbj7ZNJvNDA" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=474</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=474</feedburner:origLink></item>
        <item>
            <pubDate>Sun, 25 Nov 2007 12:55:12 GMT</pubDate>
            <category>ASP.Net MVC Framework</category>
            <title>ASP.Net MVC Framework - Security </title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/gR4h_Za5GCA/viewpost.aspx</link>
            <description>&lt;A href="http://weblogs.asp.net/fredriknormen/archive/2007/11/25/asp-net-mvc-framework-security.aspx"&gt;&lt;FONT face=Verdana size=2&gt;ASP.Net MVC Framework - Security&lt;/FONT&gt;&lt;/A&gt; 
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/gR4h_Za5GCA" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=473</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=473</feedburner:origLink></item>
        <item>
            <pubDate>Wed, 21 Nov 2007 23:51:26 GMT</pubDate>
            <category>ASP.Net MVC Framework</category>
            <title>ASP.Net MVC Framework - Exception Handling by Using an Attribute </title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/dlzqkkPTuCw/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;A href="http://weblogs.asp.net/fredriknormen/archive/2007/11/22/asp-net-mvc-framework-handling-exception-by-using-an-attribute.aspx"&gt;&lt;FONT face=Verdana&gt;ASP.Net MVC Framework - Handling Exception by using an Attribute&lt;/FONT&gt;&lt;/A&gt; &lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/dlzqkkPTuCw" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=471</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=471</feedburner:origLink></item>
        <item>
            <pubDate>Mon, 19 Nov 2007 23:05:34 GMT</pubDate>
            <category>ASP.Net MVC Framework</category>
            <title>ASP.Net MVC Framework - Exception handling</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/mY0wt_oFHbs/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;A href="http://weblogs.asp.net/fredriknormen/archive/2007/11/19/asp-net-mvc-framework-exception-handling.aspx"&gt;&lt;FONT face=Verdana size=2&gt;ASP.Net MVC Framework - Exception handling&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/mY0wt_oFHbs" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=470</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=470</feedburner:origLink></item>
        <item>
            <pubDate>Mon, 19 Nov 2007 17:17:10 GMT</pubDate>
            <category>Other</category>
            <title>VS 2008 is here</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/cmQKXs8ywpY/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana&gt;Visual Studio 2008 is now released and can be downloaded from the MSDN download Subscription.. the site is kind of busy right now, though ;)&lt;/FONT&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/cmQKXs8ywpY" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=469</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=469</feedburner:origLink></item>
        <item>
            <pubDate>Mon, 19 Nov 2007 01:03:52 GMT</pubDate>
            <category>ASP.Net MVC Framework</category>
            <title>ASP.Net MVC Framework - Creating a IRouteHandler which will support Interceptors</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/jvaVcGHLSx4/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;A href="http://weblogs.asp.net/fredriknormen/archive/2007/11/19/asp-net-mvc-framework-creating-a-iroutehandler-which-will-support-interceptors.aspx"&gt;&lt;FONT face=Verdana size=2&gt;ASP.Net MVC Framework - Creating a IRouteHandler which will support Interceptors&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/jvaVcGHLSx4" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=468</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=468</feedburner:origLink></item>
        <item>
            <pubDate>Sun, 18 Nov 2007 01:22:06 GMT</pubDate>
            <category>Other</category>
            <title>I have a new blog.</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/z8Fi-lz-9dc/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana&gt;I have a new blog up at: &lt;/FONT&gt;&lt;A href="http://weblogs.asp.net/fredriknormen"&gt;&lt;FONT face=Verdana&gt;http://weblogs.asp.net/fredriknormen&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;I will still have this blog up and running, but in the future I will only add pointers to my other blog.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;The reason why I have a new blog up at the &lt;A href="http://www.asp.net"&gt;www.asp.net&lt;/A&gt; site is because this blog is running on my own Blog engine, and I have no time over to add new features.&lt;/FONT&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/z8Fi-lz-9dc" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=467</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=467</feedburner:origLink></item>
        <item>
            <pubDate>Sun, 18 Nov 2007 01:16:51 GMT</pubDate>
            <category>ASP.Net MVC Framework</category>
            <title>ASP.Net Framework - Create your own RouteHandler</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/Nbbmp3eDeeM/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;In my previous post I wrote about how we can create our own IControllerFactory for the ASP.Net MVC Framework; in this post I will show you how we can create our own IRouteHandler.&lt;BR&gt;&lt;BR&gt;The RouteHandler in this post will replace the IControllerFactory with my own Controller Factory, and also set a default ControllerFactory and a ViewFactory specified in the web.config. This is something the current preview bits of the MVC Framework can&amp;#8217;t.&lt;BR&gt;&lt;BR&gt;It&amp;#8217;s quite easy to create our own RouteHandler, we only need to implement the IRouteHandler interface and implement the GetHttpHandler method ;)&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#000080&gt;public class&lt;/FONT&gt; N2MVCRouteHandler : &lt;FONT color=#0000ff&gt;IRouteHandler&lt;/FONT&gt;&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;IHttpHandler&lt;/FONT&gt; GetHttpHandler(&lt;FONT color=#0000ff&gt;RequestContext&lt;/FONT&gt; requestContext)&lt;BR&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;N2MVCHandler&lt;/FONT&gt; handler = &lt;FONT color=#000080&gt;new&lt;/FONT&gt; N2MVCHandler();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handler.RequestContext = requestContext;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;return&lt;/FONT&gt; handler;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The GetHttpHandler returns an IHttpHandler. I have created my own IHttpHandler (N2MVCHandler). The N2MVCHandler inherits the MvcHandler shipped with the ASP.Net MVC Framework. The reason why I inherit the MvcHandler is because I don&amp;#8217;t want to rewrite stuff that isn&amp;#8217;t necessarily. In my IHttpHandler I override the ProcessRequest method and added my own code to create a Controller for the current request.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#000080&gt;public class&lt;/FONT&gt; N2MVCHandler : &lt;FONT color=#0000ff&gt;MvcHandler&lt;/FONT&gt;&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color=#000080&gt;protected override void&lt;/FONT&gt; ProcessRequest(&lt;FONT color=#0000ff&gt;IHttpContext&lt;/FONT&gt; httpContext)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (&lt;FONT color=#000080&gt;this&lt;/FONT&gt;.RequestContext == &lt;FONT color=#000080&gt;null&lt;/FONT&gt;)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;throw new&lt;/FONT&gt; InvalidOperationException(&lt;FONT color=#a52a2a&gt;"No RequestContext"&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;string&lt;/FONT&gt; controllerName = &lt;FONT color=#000080&gt;this&lt;/FONT&gt;.GetRequiredString(&lt;FONT color=#000080&gt;this&lt;/FONT&gt;.RequestContext.RouteData, &lt;FONT color=#a52a2a&gt;"controller"&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;IController&lt;/FONT&gt; controller = &lt;FONT color=#000080&gt;this&lt;/FONT&gt;.CreateController(controllerName);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;ControllerContext&lt;/FONT&gt; controllerContext = &lt;FONT color=#000080&gt;new&lt;/FONT&gt; ControllerContext(&lt;FONT color=#000080&gt;base&lt;/FONT&gt;.RequestContext, controller);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; controller.Execute(controllerContext);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color=#000080&gt;private IController&lt;/FONT&gt; CreateController(&lt;FONT color=#000080&gt;string&lt;/FONT&gt; controllerName)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;N2MVCConfigurationHandler&lt;/FONT&gt; config = &lt;FONT color=#000080&gt;ConfigurationManager&lt;/FONT&gt;.GetSection(&lt;FONT color=#a52a2a&gt;"Nsquared2/N2MVCSection"&lt;/FONT&gt;) &lt;FONT color=#000080&gt;as&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;N2MVCConfigurationHandler&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;IN2ControllerFactory&lt;/FONT&gt; controllerFactory = &lt;FONT color=#0000ff&gt;N2ControllerFactoryBuilder&lt;/FONT&gt;.GetControllerFactory(config.ControllerFactory);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;IController&lt;/FONT&gt; controller = controllerFactory.CreateController(&lt;FONT color=#000080&gt;base&lt;/FONT&gt;.RequestContext, controllerName);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;return&lt;/FONT&gt; controller;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;In the ProcessRequest method I also create a Controller for the current request by calling the CreateController method. The CreateController method in the N2MvcHandler instantiates a ControllerFactroy which is specified in the web.config file. When the factory is instantiated I make a call to its CreateController method to create an instance of the Controller.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;In this example I have replace the IControllerFactory with my own interface, the reason is that I want to pass the name of the Controller and not the Type. The MvcHandler shipped with the MVC Framework will in the ProcessRequest method try to locate the Controller within the references assemblies and create the Type of the Controller and pass it to the IController.CreateController method. But I think it&amp;#8217;s up to the ControllerFactory to look up the Controller. Here is my IControllerFactory interface:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#000080&gt;public interface&lt;/FONT&gt; IN2ControllerFactory&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color=#0000ff&gt;IController&lt;/FONT&gt; CreateController(&lt;FONT color=#0000ff&gt;RequestContext&lt;/FONT&gt; context, &lt;FONT color=#000080&gt;string&lt;/FONT&gt; controllerName);&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;&lt;EM&gt;Note: You can still create your own ControllerFactory, but you need to implement my interface instead of IControllerFactory, and you don&amp;#8217;t need to make a call to the ControllerBuilder.Current.SetDefaultControllerFactory method in the Application_Start event in Global.asax to specify which ControllerFactory you want to use, instead you can do it in web.config. You will see how to do it later in this post.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I decided to use Spring.Net in this post also to create my Controller within the ControllerFactory.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#000080&gt;public class&lt;/FONT&gt; N2ControllerFactory : &lt;FONT color=#0000ff&gt;IN2ControllerFactory&lt;/FONT&gt;&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;IController&lt;/FONT&gt; CreateController(&lt;FONT color=#0000ff&gt;RequestContext&lt;/FONT&gt; context, &lt;FONT color=#000080&gt;string&lt;/FONT&gt; controllerName)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;IResource&lt;/FONT&gt; input = &lt;FONT color=#000080&gt;new&lt;/FONT&gt; FileSystemResource(context.HttpContext.Request.MapPath(&lt;FONT color=#a52a2a&gt;"objects.xml"&lt;/FONT&gt;));&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;IObjectFactory&lt;/FONT&gt; factory = &lt;FONT color=#000080&gt;new&lt;/FONT&gt; XmlObjectFactory(input);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color=#000080&gt;IController&lt;/FONT&gt;&amp;nbsp;controller = (&lt;FONT color=#0000ff&gt;IController&lt;/FONT&gt;)factory.GetObject(controllerName, &lt;FONT color=#000080&gt;typeof&lt;/FONT&gt;(&lt;FONT color=#0000ff&gt;IController&lt;/FONT&gt;));&lt;BR&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;if&lt;/FONT&gt; (&lt;FONT color=#000080&gt;typeof&lt;/FONT&gt;(&lt;FONT color=#0000ff&gt;Controller&lt;/FONT&gt;).IsAssignableFrom(controller.GetType()))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;N2MVCConfigurationHandler&lt;/FONT&gt; config = &lt;FONT color=#000080&gt;ConfigurationManager&lt;/FONT&gt;.GetSection(&lt;FONT color=#a52a2a&gt;"Nsquared2/N2MVCSection"&lt;/FONT&gt;) &lt;FONT color=#000080&gt;as&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;N2MVCConfigurationHandler&lt;/FONT&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((&lt;FONT color=#0000ff&gt;Controller&lt;/FONT&gt;)controller).ViewFactory = &lt;FONT color=#0000ff&gt;N2ViewFactoryBuilder&lt;/FONT&gt;.GetViewFactory(config.ViewFactory);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;return&lt;/FONT&gt; controller;&lt;BR&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;It's the ControllerFactory's responsibility to create and fill the Controller with all it information it needs. In this case the ViewFactory.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The IViewFactory&amp;nbsp;is&amp;nbsp;used to create a factory which has the responsibility to create a View. Because a Controller don&amp;#8217;t need to implement the Controller base class I will in my code use a "code policy".&amp;nbsp;I will&amp;nbsp;check if the created Controller inherits the Controller class, if so I will create a IViewFactory and inject it to the Controller. The IController interface don&amp;#8217;t have the ViewFactory property, it&amp;#8217;s something we will get from the Controller base class.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;If we take a look again at the CreateContoller method in the IHttpHandler (N2MVCHandler), we can see how I get the ControllerFactory from the web.config &lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#000080&gt;private&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;IController&lt;/FONT&gt; CreateController(&lt;FONT color=#000080&gt;string&lt;/FONT&gt; controllerName)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;N2MVCConfigurationHandler&lt;/FONT&gt; config = &lt;FONT color=#000080&gt;ConfigurationManager&lt;/FONT&gt;.GetSection(&lt;FONT color=#a52a2a&gt;"Nsquared2/N2MVCSection"&lt;/FONT&gt;) &lt;FONT color=#000080&gt;as&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;N2MVCConfigurationHandler&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;IN2ControllerFactory&lt;/FONT&gt; controllerFactory = &lt;FONT color=#0000ff&gt;N2ControllerFactoryBuilder&lt;/FONT&gt;.GetControllerFactory(config.ControllerFactory);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;IController&lt;/FONT&gt; controller = controllerFactory.CreateController(&lt;FONT color=#000080&gt;base&lt;/FONT&gt;.RequestContext, controllerName);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;return&lt;/FONT&gt; controller;&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I use some other helper classes in my code to create an instance of the Controller- and ViewFactory specified in the web.config, the code of the helper methods is not relevant for this post. When the public CTP of the MVC Framework is released, you can drop me an e-mail and I can send you my source code.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Here is the config section in the web.config where a conrollerFactory is specified and also a viewFactory. So we can now easy specify our ControllerFactory and ViewFactory in web.config.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a52a2a&gt;Nsquared2&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a52a2a&gt;N2MVCSection&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#ff0000&gt;controllerFactory&lt;/FONT&gt;=&lt;FONT color=#0000ff&gt;"MvcApplication.Models.N2ControllerFactory, MvcApplication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#ff0000&gt;viewFactory&lt;/FONT&gt;=&lt;FONT color=#0000ff&gt;"MvcApplication.Models.N2ViewFactory, MvcApplication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;"/&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a52a2a&gt;Nsquared2&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;By using the Route objects&amp;#8217; RouteHandler, we can easy change the RouteHandler the MVC Framework should use. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;RouteTable&lt;/FONT&gt;.Routes.Add(&lt;FONT color=#000080&gt;new&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Route&lt;/FONT&gt;&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Url = &lt;FONT color=#a52a2a&gt;"[controller]/[action]/[id]"&lt;/FONT&gt;,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Defaults = new { action = &lt;FONT color=#a52a2a&gt;"Index"&lt;/FONT&gt;, id = (&lt;FONT color=#000080&gt;string&lt;/FONT&gt;)&lt;FONT color=#0000ff&gt;null&lt;/FONT&gt; },&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RouteHandler = &lt;FONT color=#000080&gt;typeof&lt;/FONT&gt;(&lt;FONT color=#0000ff&gt;N2MVCRouteHandler&lt;/FONT&gt;)&lt;BR&gt;});&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;In this post you have seen how we can create our own IRouteHandler, and also replace the ControllerFactory with our own.&lt;/FONT&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/Nbbmp3eDeeM" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=466</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=466</feedburner:origLink></item>
        <item>
            <pubDate>Sat, 17 Nov 2007 17:02:41 GMT</pubDate>
            <category>ASP.Net MVC Framework</category>
            <title>ASP.Net MVC Framework - Create your own IControllerFactory and use Spring.Net</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/xufAjFMdEvk/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;In this post I&amp;#8217;m going to show you how we can easy create our own IControllerFactory for the ASP.Net MVC Framework and use &lt;A href="http://www.springframework.net/"&gt;Spring.Net&lt;/A&gt; to create our Controllers. I will in this post also use the Spring.Net Dependency Injection support to pass a Repository that should be used by our Controller.&lt;BR&gt;&lt;BR&gt;To create a ControllerFactory we need to implement the IControllerFactory interface. This interface has one method, CreateController. This method takes two arguments a RequestContext and the Type of the controller to create. The MVC Framework will locate our Controller and passed in the Type to our IControllerFactory. This is something I don&amp;#8217;t like; I want to be responsible to look up my own Controller in my way, not let the MVC Framework locate the type in their way, It will only creates some magic. If we want to change this behavior in the current preview of the MVC Framework we can create our own RouteHandler, but this is out of topic in this post. When we use Spring.Net to get an instance of an object we use a string, so we can use the Name property or the Type passed as an argument to our CreateController method to get the name of the Controller.&lt;BR&gt;&lt;BR&gt;Here is the implementation of an IControllerFactory which will use Spring.Net to instantiate a Controller:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#000080&gt;public class&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;SpringControllerFactory&lt;/FONT&gt; : &lt;FONT color=#0000ff&gt;IControllerFactory&lt;/FONT&gt;&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;IController&lt;/FONT&gt; CreateController(&lt;FONT color=#0000ff&gt;RequestContext&lt;/FONT&gt; context, &lt;FONT color=#0000ff&gt;Type&lt;/FONT&gt; controllerType)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;IResource&lt;/FONT&gt; input = &lt;FONT color=#000080&gt;new&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;FileSystemResource&lt;/FONT&gt;(context.HttpContext.Request.MapPath(&lt;FONT color=#a52a2a&gt;"objects.xml"&lt;/FONT&gt;));&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;IObjectFactory&lt;/FONT&gt; factory = new &lt;FONT color=#0000ff&gt;XmlObjectFactory&lt;/FONT&gt;(input);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;return&lt;/FONT&gt; (&lt;FONT color=#0000ff&gt;IController&lt;/FONT&gt;)factory.GetObject(controllerType.Name);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;In this code I use the XmlObjectFactory to create objects out from a specified XML file, in this case the "objects.xml" file. Within the objects.xml file we can specify the objects we want to be instantiated when we are using the Spring.Net framework. I will later in this post show the content of the "objects.xml" file. But first we can take a look at the implementation of a Controller.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#000080&gt;public class&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;HomeController&lt;/FONT&gt; : &lt;FONT color=#0000ff&gt;Controller&lt;/FONT&gt;&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;IHomeRepository&lt;/FONT&gt; _homeRepository;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;public&lt;/FONT&gt; HomeController() : &lt;FONT color=#000080&gt;this&lt;/FONT&gt;(&lt;FONT color=#000080&gt;new&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;HomeRepository&lt;/FONT&gt;()) {}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;public&lt;/FONT&gt; HomeController(&lt;FONT color=#0000ff&gt;IHomeRepository&lt;/FONT&gt; homeRepository)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;this&lt;/FONT&gt;._homeRepository = homeRepository;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;FONT color=#0000ff&gt;ControllerAction&lt;/FONT&gt;]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;public void&lt;/FONT&gt; Index()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;CompanyInfo&lt;/FONT&gt; companyInfo = &lt;FONT color=#000080&gt;this&lt;/FONT&gt;._homeRepository.GetCompanyInfo();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RenderView(&lt;FONT color=#a52a2a&gt;"Index"&lt;/FONT&gt;, companyInfo);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;FONT color=#0000ff&gt;ControllerAction&lt;/FONT&gt;]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;public void&lt;/FONT&gt; Contact()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;CompanyInfo&lt;/FONT&gt; companyInfo = &lt;FONT color=#000080&gt;this&lt;/FONT&gt;._homeRepository.GetContact();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RenderView(&lt;FONT color=#a52a2a&gt;"Contact"&lt;/FONT&gt;, companyInfo);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;FONT color=#0000ff&gt;ControllerAction&lt;/FONT&gt;]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;public void&lt;/FONT&gt; About()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;CompanyInfo&lt;/FONT&gt; companyInfo = &lt;FONT color=#000080&gt;this&lt;/FONT&gt;._homeRepository.GetCompanyInfo();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RenderView(&lt;FONT color=#a52a2a&gt;"About"&lt;/FONT&gt;, companyInfo);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I decided to modify the HomeController created by the "MVC Web Application" template. My modification of the HomeController was to remove the code to fill a CompanyInfo object, and instead put it into a Repository with the name "HomeRepostory".&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#000080&gt;public class&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;HomeRepository&lt;/FONT&gt; : &lt;FONT color=#0000ff&gt;IHomeRepository&lt;/FONT&gt;&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;CompanyInfo&lt;/FONT&gt; GetCompanyInfo()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;CompanyInfo&lt;/FONT&gt; companyInfo = &lt;FONT color=#000080&gt;new&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;CompanyInfo&lt;/FONT&gt;();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; companyInfo.CompanyName = &lt;FONT color=#a52a2a&gt;"Your company name here"&lt;/FONT&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;return&lt;/FONT&gt; companyInfo;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;CompanyInfo&lt;/FONT&gt; GetContact()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;CompanyInfo&lt;/FONT&gt; companyInfo = &lt;FONT color=#000080&gt;new&lt;/FONT&gt; CompanyInfo();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; companyInfo.CompanyName = &lt;FONT color=#a52a2a&gt;"Your company name here"&lt;/FONT&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; companyInfo.AddressLine1 = &lt;FONT color=#a52a2a&gt;"Company address Line 1"&lt;/FONT&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; companyInfo.AddressLine2 = &lt;FONT color=#a52a2a&gt;"Company address Line 2"&lt;/FONT&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; companyInfo.City = &lt;FONT color=#a52a2a&gt;"City"&lt;/FONT&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; companyInfo.State = &lt;FONT color=#a52a2a&gt;"State"&lt;/FONT&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; companyInfo.Zip = &lt;FONT color=#a52a2a&gt;"00000"&lt;/FONT&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; companyInfo.Email = &lt;FONT color=#a52a2a&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a52a2a size=2&gt;email@yourcompany.com&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#a52a2a&gt;"&lt;/FONT&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;return&lt;/FONT&gt; companyInfo;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The HomeRepository implements an interface with the name IHomeRepository. I made this design decision so I can easy mock my repositories. If we take a look at the HomeController again we can see that I have added a private field with the type IHomeRepository and also created a constructor which will take an IHomeRepository as an argument. The reason to this design is because of testability. For example if I mock the HomeRepository I can in my Test project easy inject the mock object for the Repository to my Controller.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;MockHomeRepository&lt;/FONT&gt; mockHomeRepository = &lt;FONT color=#000080&gt;new&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;MockHomeRepository&lt;/FONT&gt;();&lt;BR&gt;&lt;FONT color=#0000ff&gt;HomeController&lt;/FONT&gt; homeController = &lt;FONT color=#000080&gt;new&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;HomeController&lt;/FONT&gt;(mockRepository);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;homeController.About();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#0000ff&gt;Assert&lt;/FONT&gt;.AreEqual(((&lt;FONT color=#0000ff&gt;CompanyInfo&lt;/FONT&gt;)homeController.ViewData).companyInfo, &lt;FONT color=#a52a2a&gt;"Your company name here"&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;By using a constructor which will take our IHomeRepository as an argument, we can also do a Constructor Injection by using the Sprin.Net framework, and that is exactly what I&amp;#8217;m going to do in this post.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Now when we have our Controller and Repository we need to setup the &amp;#8220;objects.xml&amp;#8221; file with our objects and also setup a Constructor Injection. Here is the content of the &amp;#8220;objects.xml&amp;#8221; file:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;lt;?&lt;FONT color=#a52a2a&gt;xml&lt;/FONT&gt; &lt;FONT color=#ff0000&gt;version&lt;/FONT&gt;="&lt;FONT color=#0000ff&gt;1.0&lt;/FONT&gt;" &lt;FONT color=#ff0000&gt;encoding&lt;/FONT&gt;="&lt;FONT color=#0000ff&gt;utf-8&lt;/FONT&gt;" ?&amp;gt;&lt;BR&gt;&amp;lt;&lt;FONT color=#a52a2a&gt;objects&lt;/FONT&gt; &lt;FONT color=#ff0000&gt;xmlns&lt;/FONT&gt;="&lt;/FONT&gt;&lt;A href="http://www.springframework.net"&gt;&lt;FONT face="Courier New" size=2&gt;http://www.springframework.net&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Courier New" size=2&gt;"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#ff0000&gt;xmlns:xsi&lt;/FONT&gt;="&lt;/FONT&gt;&lt;A href="http://www.w3.org/2001/XMLSchema-instance"&gt;&lt;FONT face="Courier New" size=2&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Courier New" size=2&gt;"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#ff0000&gt;xsi:schemaLocation&lt;/FONT&gt;="&lt;/FONT&gt;&lt;A href="http://www.springframework.net"&gt;&lt;FONT face="Courier New" size=2&gt;http://www.springframework.net&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Courier New" size=2&gt; &lt;/FONT&gt;&lt;A href="http://www.springframework.net/xsd/spring-objects.xsd"&gt;&lt;FONT face="Courier New" size=2&gt;http://www.springframework.net/xsd/spring-objects.xsd&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Courier New" size=2&gt;"&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp; &amp;lt;&lt;FONT color=#a52a2a&gt;object&lt;/FONT&gt; &lt;FONT color=#ff0000&gt;id&lt;/FONT&gt;="&lt;FONT color=#0000ff&gt;HomeController&lt;/FONT&gt;" &lt;FONT color=#ff0000&gt;type&lt;/FONT&gt;="&lt;FONT color=#0000ff&gt;MvcApplication.Controllers.HomeController, MvcApplication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null&lt;/FONT&gt;"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;FONT color=#a52a2a&gt;constructor-arg&lt;/FONT&gt; &lt;FONT color=#ff0000&gt;name&lt;/FONT&gt;="&lt;FONT color=#0000ff&gt;homeRepository&lt;/FONT&gt;" &lt;FONT color=#ff0000&gt;ref&lt;/FONT&gt;="&lt;FONT color=#0000ff&gt;HomeRepository&lt;/FONT&gt;"/&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/&lt;FONT color=#a52a2a&gt;object&lt;/FONT&gt;&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp; &amp;lt;&lt;FONT color=#a52a2a&gt;object&lt;/FONT&gt; &lt;FONT color=#ff0000&gt;id&lt;/FONT&gt;="&lt;FONT color=#0000ff&gt;HomeRepository&lt;/FONT&gt;" &lt;FONT color=#ff0000&gt;type&lt;/FONT&gt;="&lt;FONT color=#0000ff&gt;MvcApplication.Models.Repositories.HomeRepository, MvcApplication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null&lt;/FONT&gt;"/&amp;gt;&lt;BR&gt;&amp;nbsp; &lt;BR&gt;&amp;lt;/&lt;FONT color=#a52a2a&gt;objects&lt;/FONT&gt;&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The Object element specifies our objects we want to create with the Spring.Net framework. The id attribute specifies the name of the object and the type specifies the type of our object. When we use the Spring.Net framework&amp;#8217;s GetObject method we pass in the name of the object to create, the GetObject method will look for an object with the id attribute set to the name, and instantiate the specified type. By using the &amp;lt;constructor-arg&amp;gt; element we can specify what object that should be passed into our constructor when we create the object. In this case I have specified the HomeRepository object.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;When our IControllerFactory now will create our HomeController, Spring.net will create an instance of our Controller and do a constructor injection and pass in the HomeRepository object to the constructor and return our controller.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Now when we are done with all the implementation of our IControllerFactory, Controller and Repository we need to make sure our IControllerFactory should be used. This can be done in the Global.asax&amp;#8217;s Application_Start event by using the SetDefaultControllerFactory method:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;FONT color=#000080&gt;protected void&lt;/FONT&gt; Application_Start(&lt;FONT color=#000080&gt;object&lt;/FONT&gt; sender, &lt;FONT color=#0000ff&gt;EventArgs&lt;/FONT&gt; e)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;ControllerBuilder&lt;/FONT&gt;.Current.SetDefaultControllerFactory(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#000080&gt;typeof&lt;/FONT&gt;(MvcApplication.Models.Infrastructure.SpringControllerFactory));&lt;BR&gt;&amp;nbsp;&amp;nbsp; ...&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;When we now run our application, our IControllerFactory will be used and all the creating of our Controllers will be handled by the Spring.Net framework.&lt;/FONT&gt;&lt;BR&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/xufAjFMdEvk" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=465</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=465</feedburner:origLink></item>
        <item>
            <pubDate>Sat, 17 Nov 2007 01:47:19 GMT</pubDate>
            <category>ASP.Net MVC Framework</category>
            <title>ASP.Net MVC Framework - List and Save data</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/1GAd_14gSCY/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I have posted an article about how to list and save data with the ASP.Net MVC Framework. You can find it here:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://weblogs.asp.net/fredriknormen/archive/2007/11/17/asp-net-mvc-framework-list-and-save-data.aspx"&gt;&lt;FONT face=Verdana size=2&gt;http://weblogs.asp.net/fredriknormen/archive/2007/11/17/asp-net-mvc-framework-list-and-save-data.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/1GAd_14gSCY" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=464</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=464</feedburner:origLink></item>
        <item>
            <pubDate>Thu, 15 Nov 2007 17:59:09 GMT</pubDate>
            <category>Other</category>
            <title>My twin brother have blogged about LINQ and LINQ to SQL etc</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/uImououvez0/viewpost.aspx</link>
            <description>&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;My Twin brother Johan Norm&amp;#233;n are blogging again, he have some interesting posts about LINQ and LINQ to SQL etc.&amp;nbsp;You can find his blog here: &lt;SPAN style="COLOR: #000000; FONT-FAMILY: MS Shell Dlg"&gt;&lt;A href="http://www.johannormen.com/blog"&gt;http://www.johannormen.com/blog&lt;/A&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/uImououvez0" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=463</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=463</feedburner:origLink></item>
        <item>
            <pubDate>Thu, 15 Nov 2007 13:50:51 GMT</pubDate>
            <category>ASP.Net MVC Framework</category>
            <title>ASP.net MVC Framework and data binding. </title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/1TFyEVrKIbs/viewpost.aspx</link>
            <description>&lt;P mce_keep="true"&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;&lt;EM&gt;Note: The content in this blog post is based on the an early prototype of the ASP.Net MVC Framework and stuff can or will change.&lt;BR&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR&gt;I got a question if it&amp;#8217;s possible to use data binding with the ASP.Net MVC Framework. Sort of it&amp;#8217;s possible, at least to display data but not to do a two-way data binding with existing controls. The reason of that is because it&amp;#8217;s not implemented yet ;) The way the data-bound controls work today with data-binding will not work with the MVC Framework, but we will probably see a solution to solve this in the future. When we do a POST and post data a controller&amp;#8217;s action method will be invoked. This method can take some arguments as input parameters, for example:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;/Products/Edit/1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /Products/Edit?id=1&lt;BR&gt;&lt;BR&gt;[ControllerAction]&lt;BR&gt;public void Edit(int? id)&lt;BR&gt;{&lt;BR&gt;}&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;&lt;EM&gt;Note: The URL is routed to the controller, and invokes an action method.&lt;BR&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR&gt;We can&amp;#8217;t from the control get access to the controls by using an id as in a normal postback scenario. What we can do is to use the Request property of the base class of our controller (If we decide to inherit the Controller class). The Request property is of type IHttpRequest. The reason why it uses an interface is because we should easy mock out the Request to make sure we can simply do unit-testing without needing to run our controllers within ASP.Net. By using the Request property we can simply get the data from our input fields and map them to our model:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;&amp;lt;input type=&amp;#8221;text&amp;#8221; name=&amp;#8221;Description&amp;#8221; &amp;#8230;&amp;gt;&lt;BR&gt;&lt;BR&gt;product.Description = Request[&amp;#8220;Description&amp;#8221;]&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;In an early prototype from &lt;/FONT&gt;&lt;/FONT&gt;&lt;A class="" href="http://weblogs.asp.net/scottgu" mce_href="http://weblogs.asp.net/scottgu"&gt;&lt;FONT face=Verdana size=2&gt;Scott Guthrie&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;, he used an Extension method that could take the Request.Form as an argument and do the mapping between user input fields and model.&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;product.UpdateFrom(Request.Form)&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;In the view he used a naming convention to easy see which user input field should be mapped to which property of the model:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;&amp;lt;input name=&amp;#8221;Product.Description&amp;#8221; &amp;#8230;&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;There are other different prototypes to make it easy to fill a model out from the posted data.&lt;BR&gt;&lt;BR&gt;We can use some of the controls to do one-way data binding to display data. &lt;/FONT&gt;&lt;A class="" href="http://weblogs.asp.net/scottgu/archive/2007/11/13/asp-net-mvc-framework-part-1.aspx" mce_href="http://weblogs.asp.net/scottgu/archive/2007/11/13/asp-net-mvc-framework-part-1.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Scott Guthrie&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; has a good example in his post about how we can bind data to the ListView control that is shipped with ASP.Net 3.5 (ASP.Net 3.5 will be available at the end of this month, so really soon). &lt;BR&gt;&lt;BR&gt;If we have a ListView control in our View we can bind data like this:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;&amp;lt;asp:ListView id=&amp;#8221;productList&amp;#8221; runat=&amp;#8221;server&amp;#8221;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;LayoutTemplate&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;table&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:PlaceHolder Id=&amp;#8221;itemPlaceHolder&amp;#8221; runat=&amp;#8221;server&amp;#8221;/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/table&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/LayoutTemplate&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;ItemTemplate&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;%# Eval(&amp;#8220;Description&amp;#8221;) %&amp;gt;&amp;lt;/td&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/ItemTemplate&amp;gt;&lt;BR&gt;&amp;lt;/asp:ListView&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;Because the View is responsible to render the model, we will do the data binding in&amp;nbsp;the code-behind of the View.&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;public partial class Products : ViewPage&amp;lt;List&amp;lt;Product&amp;gt;&amp;gt;&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; public void Page_Load()&lt;BR&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; productList.DataSource = ViewData;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; productList.DataBind();&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;&lt;EM&gt;Note: Because the View inherits the ViewPage&amp;lt;T&amp;gt;, we can specify the type of the ViewData (ViewData will be of type T). The ViewData is a property of the ViewPage which will contain the data we passed to the RenderView method in our control:&lt;BR&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;[ControllerAction]&lt;BR&gt;public void List()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;Products&amp;gt; products = ProductRepository.GetAll();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RenderView(&amp;#8220;Products&amp;#8221;, products);&lt;BR&gt;}&lt;BR&gt;&lt;/FONT&gt;&lt;BR&gt;As you have seen in this post, we can do one-way data binding, but at the moment we can't easy do a two-way data binding. You will see more post about the MVC Framework from me.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/1TFyEVrKIbs" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=462</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=462</feedburner:origLink></item>
        <item>
            <pubDate>Mon, 12 Nov 2007 19:35:35 GMT</pubDate>
            <category>Other</category>
            <title>New RSS feed address</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/fvrlSSbM8W0/viewpost.aspx</link>
            <description>&lt;P&gt;I will soon remove my old RSS address and if you have&amp;nbsp;subscribed to my RSS I want&amp;nbsp;you all to change the address to:&amp;nbsp;&lt;A href="http://feeds.feedburner.com/FredrikNormnsBlog"&gt;http://feeds.feedburner.com/FredrikNormnsBlog&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/fvrlSSbM8W0" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=461</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=461</feedburner:origLink></item>
        <item>
            <pubDate>Sun, 11 Nov 2007 20:18:28 GMT</pubDate>
            <category>ASP.Net MVC Framework</category>
            <title>ASP.Net MVC Framework an early look</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/3Kf-ybapINo/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;&lt;EM&gt;NOTE: &amp;#8220;The information in this post is from an early stage of the MVC Framework and only an overview of the basics. The MVC Framework can and will be changed over time.&amp;#8221;&lt;BR&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;&lt;BR&gt;As many of you already know Microsoft is working on a MVC Framework for ASP.Net. MVC stands for &amp;#8220;Model View Controller&amp;#8221;. The Model View Controller is a design pattern and the idea is to separate business logic from the View (The View is the page that will display content, for example an .aspx page). The MVC in general maintain a clean separation of concerns, it will be easier to test business logic because it&amp;#8217;s separated from the View and the View will not have any knowledge of the underlying model. Today when we build ASP.Net applications we have a code-behind which is a partial class of the &amp;#8220;View&amp;#8221;. With the code-behind model we can&amp;#8217;t easy use Test Driven Development (TDD) or unit-test, at least is not easy. We can use the MVP (Model View Presenter), but that require us to write some extra code. With the MVC Framework it will be much easier to apply TDD.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The ASP.Net MVC Framework is integrated with ASP.Net and can use existing infrastructure like caching, session and profile etc. It will also support static and dynamic languages. The MVC Framework will only as it looks now work on ASP.Net 3.5. The .Net 3.5 will be released within any weeks now. The final build of the framework was done only some days ago. With the MVC Framework we will get a Project Template and great tool support. The MVC Framework is extensible and pluggable, so we can replace any system components, it also support Inversion Of Control (IoC)/Dependency Injection (DI). It&amp;#8217;s the lifecycle that makes the model extensible. It looks like this:&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;&lt;BR&gt;Request -&amp;gt; Route (IRouteHandler) &amp;#8211;&amp;gt; ControlFactory (IControllerFactory) -&amp;gt; Controller (IController) -&amp;gt; ViewFactory (IViewFactory) -&amp;gt; View (IView) -&amp;gt; Response&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The Web Server gets browser request, for example &lt;/FONT&gt;&lt;A href="http://localhost/Product"&gt;&lt;FONT face=Verdana size=2&gt;http://localhost/Product&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;, the Route to Controller is determined. The Controller is activated and the &amp;#8220;Action&amp;#8221; method on Controller is invoked. The Controller will then access the model. The Controller will then render View and passing in custom ViewData to the View. The View is rendered.&lt;BR&gt;When we use the MVC Framework we will not specify an URL to a specific page and pass QueryStrings etc. Instead we use a cleaner URL. For example: &lt;/FONT&gt;&lt;A href="http://localhost/Products"&gt;&lt;FONT face=Verdana size=2&gt;http://localhost/Products&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; or &lt;/FONT&gt;&lt;A href="http://localhost/Producsts/Edit/4"&gt;&lt;FONT face=Verdana size=2&gt;http://localhost/Producsts/Edit/4&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; etc.&lt;BR&gt;We will map this URL to a specific controller which will be executed when we enter the URL. In the Global.asax we can create routes, which will be handled by an IRouteHandler. The following is the default way to add a route:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;protected void Application_Start(object sender, EventArgs e)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RouteTable.Routes.Add(new Route {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Url = "[controller]/[action]/[id]",&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Defaults = new { action = "Index", id = (string)null },&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RouteHandler = typeof(MvcRouteHandler)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;BR&gt;&amp;nbsp;}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;&lt;EM&gt;Note: In a later release we will probably be able to add this to a configuration file instead of writing code.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The Route that is added to the RouteTable will use an URL with the following format &amp;#8220;[controller]/[Action]/[id]&amp;#8221;. The controller is the controller that should be used, the action is the method in the controller that should be executed and the id is a value that can be passed to the controller&amp;#8217;s method. If we use this format and enter a URL like the following: &lt;/FONT&gt;&lt;A href="http://localhost/Product"&gt;&lt;FONT face=Verdana size=2&gt;http://localhost/Product&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;, the MVC Framework&amp;#8217;s IControlleFactory will create and return the controller that belongs to the Product. It will try to locate a controller with the name ProductController. So if you enter an URL like &lt;/FONT&gt;&lt;A href="http://localhost/Customer"&gt;&lt;FONT face=Verdana size=2&gt;http://localhost/Customer&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;, it will try to instantiate a controller with the name CustomerController. When the controller is instantiated the Index method of the controller will be executed. The Defaults property of the Route class specify the default settings for the route, such as which action method of the controller is the default action (in this case the Index is the default one specified, this can also be specified on a controller with an attribute.), and the default values of the action method&amp;#8217;s parameters that should be passed to the method. If we specify a URL like this one: &lt;/FONT&gt;&lt;A href="http://localhost/Product/List"&gt;&lt;FONT face=Verdana size=2&gt;http://localhost/Product/List&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; the List method of the ProductController will be executed instead of the one that is default specified on the Route. The format of the URL specified for the Route was [controller]/[action]/[id], and the [action] in the format specifies which part of the URL is the name of the action method that should be executed. The [id] in the URL is the name of the action method&amp;#8217;s parameter and the value enter at this location of an URL will be passed to the action method. If we enter a URL like this one: &lt;/FONT&gt;&lt;A href="http://localhost/Product/Edit/4"&gt;&lt;FONT face=Verdana size=2&gt;http://localhost/Product/Edit/4&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;, the Edit method of the ProductController will be executed and the value 4 will be passed as a value to the Edit method&amp;#8217;s id argument. The interface of the action method will look like this:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;public void Edit(int? id)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I will later in this post write more about the controller.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;We can of course change the format of the URL if we want to pass more values to a controller&amp;#8217;s action method, for example: &amp;#8220;[controller]/[action]/[id]/[pageIndex]&amp;#8221;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The RouteHandler property of the Route specifies which IRouteHandler we want to use.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;If we don&amp;#8217;t need to use the format &amp;#8220;[controller]/[action]/[id]&amp;#8221;, for example instead of letting the URL have the name of the controller we can skip the [controller] from the URL and instead specify the type of the controller we want to use when we setup the Route. For example:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;RouteTable.Routes.Add(new Route {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Url = "products/[category]",&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Defaults = new {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT size=3&gt;&lt;STRONG&gt;&lt;EM&gt;controller = "Product"&lt;/EM&gt;&lt;/STRONG&gt;,&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; action = "Index"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RouteHandler = typeof(MvcRouteHandler)&lt;BR&gt;});&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Now when we have looked at how we can map a URL to a controller we can take a look at how we can implement a controller. A controller is a normal class that inherits the base class Controller located in the System.Web.Mvc namespace:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;using System;&lt;BR&gt;using System.Collections.Generic;&lt;BR&gt;using System.Web.Mvc;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;namespace MyControllers&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class ProductController : Controller&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;An action method is a normal method that has the ControllerActionAttribute specified. The ControllerActionAttribute is used because of security reason so not anyone can enter an action in the URL and execute it. The ControllerActionAttbibute has some properties also, for example the DefaultAction which can be used to specify the default action method of the controller.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;[ControllerAction(DefaultAction = true)]&lt;BR&gt;&amp;nbsp;public void Index()&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RenderView("MyView");&lt;BR&gt;&amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The RenderView method will render the specified view. In this case the view with the name &amp;#8220;MyView&amp;#8221;. The RenderView will not do a call to Response.Redirect; instead it will use the Server.Execute method. By default the RenderView will look into a sub folder of your project with the name Views and then the sub folder with the name of the controller attached to the view.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;/root&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /Views&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /Product&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyView.aspx&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The RenderView method is located in the Controller&amp;#8217;s base class. This method will execute the IView&amp;#8217;s RenderView method. We can create our own IViewFactory which will return our IView representation where we can create our own implementation of the RenderView. For example if we want to render a view based on another format than HTML, for example a jpg or gif image etc. We can create our own IView and make sure our RenderView will render binary data to the output stream instead of text.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The code-behind of the View inherits form the ViewPage instead of the Page object.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;&lt;EM&gt;Note: We can easy create our own IViewFactory and IView for mock out the views for testing and replace .aspx with other technologies.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;To send data to the View that should be displayed we can use the ViewData property of the Controller base class, or we can pass our data to the RenderView method:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;[ControllerAction]&lt;BR&gt;public void List(int? page)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PagedList&amp;lt;Product&amp;gt; products = repository.GetProducts(page ?? 0, 10);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RenderView("List", products);&lt;BR&gt;&amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;[ControllerAction]&lt;BR&gt;&amp;nbsp;public void Edit(int id)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product product = repository.GetProductByID(id);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RenderView("Edit", product);&lt;BR&gt;&amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;[ControllerAction]&lt;BR&gt;public void ShowCustomer(int? id)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ViewData["CustomerName"] = customer. Name;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RenderView("ShowCustomer");&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;To display this information in our View we can user server side script block:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;lt;table class="product_listing"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;Product Name&amp;lt;/th&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;Unit Price&amp;lt;/th&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;% foreach(var p in ViewData) { %&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;%=Html.Link("Edit", "Products", new { Action="Edit", ID=p.ProductID }) %&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/td&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;%=p.ProductName %&amp;gt;&amp;lt;/td&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;%=p.UnitPrice.ToCurrency() %&amp;gt;&amp;lt;/td&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;% } %&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;lt;/table&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;lt;h2&amp;gt;&amp;lt;%=ViewData.ProductName %&amp;gt;&amp;lt;/h2&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;lt;h1&amp;gt;&amp;lt;%=ViewData["CustomerName"] %&amp;gt;&amp;lt;/h1&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;By using the ViewData collection we can pass several of objects to our view that should be displayed. If we want to pass typed data to the View, we can inherit the Controller&amp;lt;T&amp;gt; where ViewData will be of type T. If we use the Controller&amp;lt;T&amp;gt;, the page which uses the Controller&amp;lt;T&amp;gt; needs to inherit the ViewPage&amp;lt;T&amp;gt; instead of ViewPage.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The MVC Framework doesn&amp;#8217;t support postbacks and the use of ViewState, so most of the Controls shipped with ASP.Net can&amp;#8217;t be used. Microsoft will probably add new Controls for the MVC Framework.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;&lt;EM&gt;Note: This framework is not Web Form 4.0 or will replace the existing postback model. The postback model will still exists and Microsoft will still provide new feature to it in the future.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The MVC Framework will be added to the SP1 of VS 2008. This framework is for people that would like to use this MVC design pattern instead of the postback model. The MVC Framework will work better with Test Driven Development and unit-testing, so people that will make it easier to test web apps will also probably use this model. I will use it in every Web project in the future. With this model it would also be easier to maintain applications because we will have more control over the HTML. We don&amp;#8217;t need to hook up to an event of a control and try to figure out how to add extra data into a GridView if we want to extend it etc. This model reminds of the old classic ASP, and it will be easier for people that work with classic ASP to move to ASP.net if they start using the MVC Framework.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Testing with MVC will as I mentioned before be much easier. We have several of interfaces that we can use. The Mockable intrinsic objects are IHttpContext, IHttpResponse and IHttpRequest. Because the MVC Framework have interfaces for IRouteHandler, IController, IControllerFactory, IView and IVewFactory we have more extensibility options. If we want to test a Controller&amp;#8217;s action we can for example create our own IViewFactory and IView, by doing this we can change the implementation of the RenderView method.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;[TestMethod]&lt;BR&gt;Public void TestTheEditActionFotTheProductContoller()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductController controller = new ProductController(mpr);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TestViewEngine testView = new TestViewEngine();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; controller.ViewFactory = testView&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; controller.Edit(5);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assert.Equal(testView.Template, "Edit");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Asssert.Equal(testView.GetViewData&amp;lt;Product&amp;gt;().ProductID, 5);&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;If you want to see some sample code, you can download it from &lt;A href="http://www.hanselman.com/blog/DevConnectionsAndPNPSummitMVCDemosSourceCode.aspx"&gt;Scott Hanselman&amp;#8217;s blog&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Watch out for more information on &lt;A href="http://weblogs.asp.net/scottgu/"&gt;Scott Guthrie blog&lt;/A&gt;.&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/3Kf-ybapINo" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=460</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=460</feedburner:origLink></item>
        <item>
            <pubDate>Tue, 06 Nov 2007 18:05:59 GMT</pubDate>
            <category>Other</category>
            <title>Live from TechED day 2</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/lWTuEzhKuAU/viewpost.aspx</link>
            <description>&lt;FONT face=Verdana size=2&gt;Today was my first day this week in the Ask the experts (ATE) booth at TechED. I was working together with Matt Gibbs form the ASP.Net team. He will hold a session about the MVC Framework on Friday so today I asked him several questions about the MVC Framework and also about ASP.Net 4.0. We had also a discussion about the Dynamic controls which will automatically bind dynamic data bound control against a Data source where LINQ to SQL will be used. So we can out from a database easy create a data driven web application. In the future the Dynamic Controls will work against ADO.Net Entity Framework also. I&amp;#8217;m not a big fan of the Dynamic Controls; I don&amp;#8217;t like to have magic in my code. I will talk to Shanku Niyogi (who is working in the Dynamic control team) tomorrow about the Dynamic Controls when we will work together.&lt;BR&gt;&lt;BR&gt;I met Pablo Castro from the ADO.Net team and I tried to convince him to remove the &amp;#8220;IPOCO&amp;#8221; interface so&amp;nbsp;oue entities&amp;nbsp;doesn&amp;#8217;t need to implement the interface or inherit a base class to work with the ADO.Net Entity Framework. He was so determined and he will not remove it. It was also sad to hear that they will not release a &amp;#8220;model-first&amp;#8221; approached with the first version of ADO.Net Entity Framework that I thought they should do. In the next version we can probably create a model and then generate a data source from the model (That is something I don&amp;#8217;t like).&lt;BR&gt;There are a lot of talk about features form Microsoft the work like a code-generator everything to create scaffolds and get started quickly with some tweak support etc.&lt;BR&gt;&lt;BR&gt;Today I met several people around Europe, some of my blog readers, some other MVPs and developers and speakers etc. I have also met a lot of people from Sweden and had the chance to eat dinner and spend some time with them.&lt;BR&gt;&lt;BR&gt;Today I&amp;#8217;m going to the Influence party too meet other MVPs and peoples from Microsoft etc. It will be really nice party with a lot of fun I hope.&lt;BR&gt;If you want to read more about the time here at TechED I can suggest you to read my collogue &lt;A href="http://www.lowendahl.net/"&gt;Patrik L&amp;#246;wendahls blog&lt;/A&gt;.&lt;BR&gt;&lt;/FONT&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/lWTuEzhKuAU" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=459</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=459</feedburner:origLink></item>
        <item>
            <pubDate>Mon, 05 Nov 2007 14:50:27 GMT</pubDate>
            <category>Other</category>
            <title>VS 2008 will be available in November 2007</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/BJHEYHPhs_Y/viewpost.aspx</link>
            <description>&lt;FONT face=Arial size=2&gt;I&amp;#8217;m sitting here at the TechED 2007 keynote and I&amp;#8217;m ready to press the "Save post" button for posting this post. With this post I will let you all know that Visual Studio 2008 will be released in Novembe (this month)&lt;/FONT&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/BJHEYHPhs_Y" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=458</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=458</feedburner:origLink></item>
        <item>
            <pubDate>Mon, 05 Nov 2007 00:01:20 GMT</pubDate>
            <category>Other</category>
            <title>Live from TechED 2007 in Barcelona</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/BDnDktN-Vd8/viewpost.aspx</link>
            <description>&lt;FONT face=Verdana size=2&gt;I&amp;#8217;m sitting here in my hotel room in Barcelona and checking the TechED agenda. There are several sessions about Visual Studio 2008, but that is not strange because it&amp;#8217;s very, very soon here ;)&lt;BR&gt;&lt;BR&gt;We are four people from Cornerstone this year; it&amp;#8217;s me, &lt;A href="http://www.lowendahl.net/"&gt;Patrik L&amp;#246;wendahl&lt;/A&gt;, Josefin Andersson&amp;nbsp;and Michael Herkommer. &lt;BR&gt;&lt;BR&gt;I have already met some people, like some people from Italy that I meet last year here at TechED, some people from Sweden etc. Patrik, Michael and I will be at the ASK THE EXPERT (ATE) booth during this week, so if you want to meet anyone of us, just join the ATE area on your break or during a session.&lt;BR&gt;&lt;BR&gt;This year I will work together with Matt Gibbs and Stefan Schachow and Shanku Niyogi from the ASP.Net team.&lt;BR&gt;My goal is to go to some sessions related to Web, Data and Architecture. Pablo Castro form the ADO.Net team is here to talk about the ADO.Net Entity Framework and Astoria. Matt Gibbs will talk about the MVC Frameform for ASP.Net and some other related ASP.Net stuff. Stefan Schachow and Shanku Niyogi will also talk about some ASP.Net stuff and also some ASP.Net AJAX etc. There are also some Silverlight sessions.&lt;BR&gt;&lt;BR&gt;Have a great time at TechED, I think all of you will be satisfied with the agenda this year.&lt;BR&gt;&lt;/FONT&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/BDnDktN-Vd8" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=457</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=457</feedburner:origLink></item>
        <item>
            <pubDate>Sat, 03 Nov 2007 13:25:44 GMT</pubDate>
            <category>Design and Architecture</category>
            <title>What Data Access technology do I recommend?</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/RQX-AZScDUo/viewpost.aspx</link>
            <description>&lt;FONT face=Verdana size=2&gt;I got several questions about what Data Access technology I recommend. So I decided to write down the answer into a post.&lt;BR&gt;&lt;BR&gt;First of all I use a "model-first" approach, which means that I don&amp;#8217;t care about the data source. So what I do is first to create my domain model with entities, business logic etc. When the model is done I decide what data source I need to use. The result is often a database. Because I use &lt;A href="http://domaindrivendesign.org/"&gt;Domain Driven Design&lt;/A&gt;, I also use OR-Mapper to map my model against a database. I don&amp;#8217;t use DataSet, I actually never did when .Net arrived. The reason is that a DataSet is more or less a copy of a database. It has Tables, rows and columns. In .Net 1.x the DataSet was a huge object, in .Net 2.0 Microsoft reduce the size of it, but still it has a database like model. I also wanted to use the power of Object-Oriented programming and a DataSet in this case was not an option. I also wanted to make my code easier to read and understand. By using an object like Customer which will have information about a Customer is more logical for people to understand than having a DataSet with relations etc with the information about a customer.&lt;BR&gt;&lt;BR&gt;The OR-Mapper I used was my own implementation or &lt;A href="http://www.hibernate.org/343.html"&gt;nHibernate&lt;/A&gt;. But as soon as &lt;A href="http://msdn2.microsoft.com/en-us/library/aa697427(vs.80).aspx"&gt;ADO.Net Entity Framework&lt;/A&gt; will arrive, I will probably use it instead of other OR-Mappers (The mapping tools and the final features of ADO.Net Entity Framework will decide if I will use of it.). One sad thing with the ADO.NET Entity Framework is the lack of support for POCOs (We need to implement an interface on all of our entities).&lt;BR&gt;&lt;BR&gt;Very soon we will have the possibility to use &lt;A href="http://msdn2.microsoft.com/en-us/library/bb425822.aspx"&gt;LINQ to SQL&lt;/A&gt;. I know that several people will use it for data access. With LINQ to SQL we can easily by dragging out tables get classes generated and can start using &lt;A href="http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx"&gt;LINQ&lt;/A&gt; as a query language against the generated model to get our data. The problem is that the model is created out from a database schema, and a database schema is based on relations and normalization rules etc. So we can&amp;#8217;t really generate a domain model out from a database, or we shouldn&amp;#8217;t if we use Domain Driven Design. The design of our model should not be decided by the data source. But it&amp;#8217;s a very fast technology if we want to speed up our data access development against a database. For small projects where a database is required or already exists from the beginning, I will probably use LINQ to SQL, but it depends on what the application should do. For large applications I will probably not use LINQ to SQL. &lt;BR&gt;&lt;BR&gt;With the ADO.Net Entity Framework we will be able to create our own model first and then map it against one or more data sources; we can also use Value objects etc. LINQ to SQL can&amp;#8217;t map against several data sources and has the &lt;A href="http://jimmynilsson.com/blog/posts/ValueObjectsAreCrucial.htm"&gt;lacks of support for Value objects&lt;/A&gt; which I often use in my domain model.&lt;/FONT&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/RQX-AZScDUo" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=456</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=456</feedburner:origLink></item>
        <item>
            <pubDate>Tue, 30 Oct 2007 20:05:54 GMT</pubDate>
            <category>ASP.Net Ajax</category>
            <title>My Tips &amp;amp; Tricks Slide from the MSDN Live</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/R0fyx5JZDNY/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I hold a session at MSDN Live in Sweden for some weeks ago. The slides are now availbable.&lt;BR&gt;&lt;BR&gt;The&amp;nbsp;tips in&amp;nbsp;my slides are a collection of what I have seen several of people don't&amp;nbsp;think about when they&amp;nbsp;use ASP.Net Ajax, or have used the technology in a wrong way etc.&amp;nbsp;It's gathered from different communities. I have also some hidden slides for the people who want to learn more about how to do Object-Oriented Programming with Inheritance etc by using the ASP.Net AJAX Library.&lt;BR&gt;&lt;BR&gt;You can download the slide from &lt;A href="http://cid-2a0d12c186903516.skydrive.live.com/self.aspx/Presentations/MSDN%20Live%202007/Ajax.zip"&gt;here&lt;/A&gt;. (The language I used in the slide is English)&lt;/FONT&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/R0fyx5JZDNY" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=455</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=455</feedburner:origLink></item>
        <item>
            <pubDate>Fri, 19 Oct 2007 23:35:54 GMT</pubDate>
            <category>ASP.Net MVC Framework</category>
            <title>The MVC Framework from Microsoft</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/Lhsl7o0Gvlg/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I have just got back from a whole week tour with Microsoft. T talked about some Tips &amp;amp; Tricks regarding ASP.Net AJAX. In the next week I will be on a new tour where I&amp;#8217;m going to talk about &amp;#8220;how to write beautiful code&amp;#8221; (Pimp my code).&lt;BR&gt;&lt;BR&gt;Many of you have probably already heard about the MVC Framework the ASP.Net team are working on, if not read about it &lt;A href="http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx"&gt;here&lt;/A&gt;. During the Developer Summit next year, I'm probably going to talk about the framework.&lt;BR&gt;&lt;BR&gt;A preview of the framework will be available at the same time as VS 2008 RTM, later this year.. not far from now. Then it will be built-in to .Net 3.5 SP1. I&amp;#8217;m not sure if SP1 of .Net 3.5 is the &amp;#8220;package&amp;#8221; that will also have the first version of the ADO.Net Framework. The only thing I know is that it will be shipped in an update after the RTM of VS 2008 is released and somewhere around when SQL Server2008 is released.&lt;BR&gt;&lt;BR&gt;About the MVC patterns, I have earlier written about the &amp;#8220;MVP&amp;#8221; pattern, if you haven&amp;#8217;t read about it, here is the&amp;nbsp;post:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://fredrik.nsquared2.com/ViewPost.aspx?PostID=416"&gt;http://fredrik.nsquared2.com/ViewPost.aspx?PostID=416&lt;/A&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/Lhsl7o0Gvlg" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=454</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=454</feedburner:origLink></item>
        <item>
            <pubDate>Thu, 18 Oct 2007 09:11:13 GMT</pubDate>
            <category>Other</category>
            <title>Looking for speakers - Developer Summit 2008</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/VSaR-Cg03ik/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I&amp;#8217;m the track owner of the Web tracks on a conference "Developer Summit" that will take place&amp;nbsp;in Stockholm (Sweden) 9-11 of&amp;nbsp;April 2008. As an owner of the track I'm for looking for speakers. So if anyone of you are interested to speak at the conference, please drop me an e-mail with your contact information, suggestion on a track, earlier experience etc.&amp;nbsp; Here is a pointer for the last&amp;nbsp;conference: &lt;/FONT&gt;&lt;A href="http://www.cornerstone.se/expertzone/dev07/"&gt;&lt;FONT face=Verdana size=2&gt;http://www.cornerstone.se/expertzone/dev07/&lt;/FONT&gt;&lt;/A&gt;.&lt;FONT face=Verdana size=2&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;What I have planed so far are sessions about the following areas:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Silverligth&lt;BR&gt;&lt;BR&gt;ASP.Net 3.5&lt;BR&gt;&lt;BR&gt;ASP.Net Futures&lt;BR&gt;&lt;BR&gt;ASP.Net MVC Pattern&lt;BR&gt;&lt;BR&gt;UI Patterns/Architecture&lt;BR&gt;&lt;BR&gt;ASP.Net AJAX&lt;BR&gt;&lt;BR&gt;Design&lt;BR&gt;&lt;BR&gt;etc.&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/VSaR-Cg03ik" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=453</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=453</feedburner:origLink></item>
        <item>
            <pubDate>Wed, 10 Oct 2007 22:07:21 GMT</pubDate>
            <category>ASP.Net Ajax</category>
            <title>The book ASP.Net AJAX in Action, what a book :)</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/npFSF9aPKQw/viewpost.aspx</link>
            <description>&lt;FONT face=Verdana size=2&gt;If you want to learn ASP.Net AJAX and also want to have a good deep dive into it, then I will recommend a very good book &lt;A href="http://www.amazon.com/gp/product/1933988142/104-9219624-7383145?ie=UTF8&amp;amp;tag=scoblo04-20&amp;amp;linkCode=xm2&amp;amp;camp=1789&amp;amp;creativeASIN=1933988142"&gt;ASP.Net AJAX in Action&lt;/A&gt;. It will give you not all the basic you need to know, it will also make you a good client-side script writer, were you will learn how to use all shortcut you can when using the client-side ASP.Net AJAX Library.&lt;/FONT&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/npFSF9aPKQw" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=452</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=452</feedburner:origLink></item>
        <item>
            <pubDate>Wed, 03 Oct 2007 11:45:36 GMT</pubDate>
            <category>Silverlight</category>
            <title>The Downloader object</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/leoVIrrsd1M/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;This will be my first post about some Silverlight code. In this post I will write about how we can easy use the Downloader object shipped with Silverlight, and display a progress bar that will show us the progress of the download. I decided to use Microsoft Expression Blend 2 when I created the code in this post. You can get the current preview version of Expression Blend at the following site: &lt;A href="http://silverlight.net/GetStarted/"&gt;http://silverlight.net/GetStarted/&lt;/A&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;&lt;BR&gt;The application uses Silverlight 1.0 and not 1.1 because 1.1 is still in a alpha version at the time I created this post.&lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;The Downloader object.&lt;BR&gt;&lt;/STRONG&gt;&lt;BR&gt;With Silverlight we will have an object called the Downloader object which we can use to download content on the fly. Maybe we don&amp;#8217;t want to have all the data for our Silverlight loaded when the app is initialized, instead load content on demand etc. It&amp;#8217;s very easy to use the Downloader object in our code.&amp;nbsp; To create an instance of the Downloader object we use the createObject method which can for example be accessible from the Silverlight host/plugin object, and we pass the string &amp;#8220;downloader&amp;#8221; (the name of the object to create) as an argument to the createObject method:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;var plugin = document.getElementById("SilverlightPlugIn");&lt;BR&gt;var downloader = plugin.createObject("downloader");&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Note: We can also get the host object by using the getHost() method, in my example I will use the getHost method.&lt;BR&gt;&lt;BR&gt;When we have an instance of the Downloader object we can start to use it, the first thing to do is to hook up to at some events that the downloader object has, such as the &amp;#8220;downloadProgressChanged&amp;#8221; and the &amp;#8220;completed&amp;#8221; event. The &amp;#8220;downloadProgressChanged&amp;#8221; can be used to check the current state of the downloaded content, this is the event we can use to update our progress bar etc. The &amp;#8220;completed&amp;#8221; event will of course be trigged when the download is completed. It will be from the &amp;#8220;completed&amp;#8221; event we will get the downloaded content. To get the downloaded content we can use several methods, such as the Downloader object&amp;#8217;s ReponseText to get the downloaded content as a text, or we can use some UI elements methods like SetSource etc. I will use the SetSource of the MediaElement in my example to set the source of a MediaElement to my downloaded content. To set up the &amp;#8220;downloadProgressChanged&amp;#8221; and &amp;#8220;completed&amp;#8221; event, we can use the Downloader object&amp;#8217;s addEventListener method:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;downloader.addEventListener("downloadProgressChanged", onDownloadProgressChanged);&lt;BR&gt;downloader.addEventListener("completed", onCompleted);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The first argument the addEventListener takes is the name of the event we will bind a &amp;#8220;method&amp;#8221; to. The last argument is the name of the method that should be executed when the event is trigged.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Now when we have added the events we can use the Downloader object to start downloading some content. To download content we use the open method and the send method of the Downloader object. With the open method we specify that we want to get a specific file from our domain (in this case the files in our application folders):&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;downloader.open("GET", "thebutterflyandthebear.wmv");&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I will in this example download the &amp;#8221;thebutterflyandthebear.wmv&amp;#8221; media filed shipped with the Silverligth SDK.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;When we have specified which file to download we must send the request to start the download, this is done by calling the Downloader object&amp;#8217;s send method:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;downloader.send();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Before I move on about how to get the downloaded content I will first show you the XAML code of my progress bar that is used in this example:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;lt;canvas &amp;#8230;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;Canvas Name="myProgressBar" Width="404" Height="28" Opacity="0" Canvas.Left="125"&amp;nbsp;&amp;nbsp;&amp;nbsp; Canvas.Top="144"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Rectangle Width="404" Height="28" Stroke="#FFFFFFFF" StrokeThickness="2"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Rectangle.Fill&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStop Color="#FF000000" Offset="0"/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStop Color="#FF18244A" Offset="1"/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/LinearGradientBrush&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Rectangle.Fill&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/Rectangle&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp; &amp;lt;Rectangle Name="progressBar" Opacity="0.86" Width="0" Height="24" Stroke="#FF000000" StrokeThickness="2" Canvas.Left="2" Canvas.Top="2"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Rectangle.Fill&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStop Color="#FF000000" Offset="0"/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStop Color="#FF8899DD" Offset="1"/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/LinearGradientBrush&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Rectangle.Fill&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/Rectangle&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp; &amp;lt;MediaElement Name="myMediaPlayer" Width="467" Height="341" Canvas.Left="101"&amp;nbsp;&amp;nbsp;&amp;nbsp; Canvas.Top="85" Stretch="Fill"/&amp;gt;&lt;BR&gt;&amp;lt;canvas&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp; &amp;lt;TextBlock Name="progressText" Width="71" Height="24" Canvas.Left="182" Canvas.Top="2" Foreground="#FFFFFFFF" Text="" TextWrapping="Wrap"/&amp;gt;&lt;BR&gt;&amp;lt;/Canvas&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The progress bar is grouped into an own canvas where I have used two rectangles, one for the &amp;#8220;border&amp;#8221; and one for the progress indication itself (the name of the rectangle is set to &amp;#8220;progressBar&amp;#8221;). I have also added a TextBlock (progressText) that will show in percentage how much data that is currently downloaded during the download progress. There is also a MediaElement added to the application, this will be used to display the downloaded media file.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Now let take a look at the implementation of the &amp;#8220;downloadProgressChanged&amp;#8221; and the &amp;#8220;completed&amp;#8221; event. The events will have two arguments, the sender (which in this case will the Download object) and eventArgs wich have some event argument information. Here is the code for the &amp;#8220;downloadProgressChanged&amp;#8221; event:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;function onDownloadProgressChanged(sender, eventArgs)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var plugin = sender.getHost();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var percentage = Math.floor(sender.downloadProgress * 100);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var progressText = plugin.content.findName("progressText");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var progressBar = plugin.content.findName("progressBar");&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; progressText.text = percentage + "%";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; progressBar.width = percentage * 4; &lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;By using the getHost method of the sender argument, we can get the Silverlight host object. I will use host object find the element that I will update, like the Rectangle that should show the progress bar and the text with the percentage of how much data that is currently downloaded. By using the Downloader object&amp;#8217;s downloadProgress property times 100 we can get the percentage of the current downloaded content. I will use this value to update the TextBlock &amp;#8220;progressText&amp;#8221;, I will also use the value to increase the progress bar width.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;In the onCompleted method we can get the data that the Downloaded object has downloaded:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;function onCompleted(sender, eventArgs)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var plugin = sender.getHost();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var progressText = plugin.content.findName("progressText");&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; progressText.text = "Done";&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var myMediaPlayer = plugin.content.findName("myMediaPlayer");&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; myMediaPlayer.setSource(sender, "");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; myMediaPlayer.play();&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;To get the downloaded content from the Downloaded object I have used the MediaElement&amp;#8217;s setSource method. This method takes two arguments, the Downloader object which have the media content that should be the source of the MediaElement, and the second one is the name of a file within a .zip file. If we use the Downloader object&amp;#8217;s open method and point to a .zip file, we need to specify which file within the .zip file we want to set as a source to the MediaElement. When we download one file we pass an empty string as the second argument.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Here is the live demo of the application:&lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://fredrik.nsquared2.com/silverlight/downloadcontent/default.html"&gt;&lt;FONT face=Verdana size=2&gt;http://fredrik.nsquared2.com/silverlight/downloadcontent/default.html&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Here is the source code for the application:&lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://fredrik.nsquared2.com/silverlight/downloadcontent/downloadcontent.zip"&gt;&lt;FONT face=Verdana size=2&gt;http://fredrik.nsquared2.com/silverlight/downloadcontent/downloadcontent.zip&lt;/FONT&gt;&lt;/A&gt;&lt;BR&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/leoVIrrsd1M" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=451</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=451</feedburner:origLink></item>
        <item>
            <pubDate>Fri, 21 Sep 2007 11:49:46 GMT</pubDate>
            <category>Silverlight</category>
            <title>The Silverlight 1.0 Course</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/qyyGD0W4c9s/viewpost.aspx</link>
            <description>&lt;FONT face=Verdana size=2&gt;I just heard that the &lt;A href="http://www.cornerstone.se/course/showcourse.aspx?CNO=COUR2007090715261701796076"&gt;Silverlight course&lt;/A&gt; I will have at &lt;A href="http://www.cornerstone.se"&gt;Cornerstone&lt;/A&gt; in Sweden already got&amp;nbsp;several of bookings, I feel happy about that, because I have spend some time on creating the Ultimate Silverlight course, and the interest among both .Net developers and Flash people are huge, and that makes both me and Microsoft happy ;) I will thank Microsoft and the people over at the USA in the ASP.Net and Silverlight team for the comments and feedback on the content of the course.&lt;/FONT&gt; 
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/qyyGD0W4c9s" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=450</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=450</feedburner:origLink></item>
        <item>
            <pubDate>Wed, 19 Sep 2007 15:48:59 GMT</pubDate>
            <category>Other</category>
            <title>ATE at TechED 2007</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/5ESGGdrzqeY/viewpost.aspx</link>
            <description>&lt;FONT face=Verdana size=2&gt;I would only like to inform you that I will work as an &amp;#8221;Ask the Expert&amp;#8221; at &lt;A href="http://www.mseventseurope.com/teched/07/developers/content/Pages/Default.aspx"&gt;TechED 2007&lt;/A&gt;&amp;nbsp;this year. So I hope to see as many of you as possible at the conference.&lt;/FONT&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/5ESGGdrzqeY" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=449</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=449</feedburner:origLink></item>
        <item>
            <pubDate>Thu, 13 Sep 2007 09:18:43 GMT</pubDate>
            <category>Silverlight</category>
            <title>The Silverlight 1.0 Course</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/tQQ4sbuZArs/viewpost.aspx</link>
            <description>&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;SPAN lang=EN-US style="mso-ansi-language: EN-US"&gt;&lt;FONT face=Verdana size=2&gt;I have now created a Silverlight 1.0 course with a teaser of 1.1. The course is 2 days long and target developers to create Silverlight apps for the web.&amp;nbsp; The attendance will learn how to get started with Silverlight, using animations, events, using media, AJAX + Silverlight and much more. This course will take place in Sweden, so for my Swedish readers if you need more information take a look at the following pointer: &lt;/FONT&gt;&lt;A href="http://www.cornerstone.se/course/showcourse.aspx?CNO=COUR2007090715261701796076"&gt;&lt;FONT face=Verdana size=2&gt;The Silverlight 1.0 Course&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/tQQ4sbuZArs" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=448</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=448</feedburner:origLink></item>
        <item>
            <pubDate>Wed, 12 Sep 2007 18:58:16 GMT</pubDate>
            <category>Other</category>
            <title>Pimp my code</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/en-koPwn2SU/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Prepare the roadies, tell the groupies and bring your entourage. Cornerstone has just released the tickets for this years most awesome event: "Pimp My Code". &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;This event is all about code, it's about writing beautiful code, testable code, re-usable code and readable code. If you're in the business of writing code you should be there. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;We will be hitting Gothenburg(24th Oct) and Stockholm(23rd Oct) to begin with.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The agenda: &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Patterns For Mere Code Mortals - Patrik L&amp;#246;wendahl, Cornerstone&lt;BR&gt;Common patterns and principles explained in C# without those dull UML boxes.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Pimp your project with Enterprise Library - Magnus M&amp;#229;rtensson, Dotway&lt;BR&gt;Enterprise Library deep dive with focus on the pimping your objects with the Policy Injection block.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;From Model View Controller to Microsoft Web Client Factory - Tobias Fj&amp;#228;lling, Dotway&lt;BR&gt;ASP.NET UI patterns. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Learning From Legacy - Andreas Brink, Factor 10&lt;BR&gt;Making legacy code less legacy with simple enough techniques.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Developers are from mars and operations is from Venus - Mikaell Durell, Microsoft&lt;BR&gt;Make the CIO love your applications.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Pimp My Code - Fredrik Normen, Cornerstone&lt;BR&gt;Do's and don'ts when writing code and how to refactor from and to them.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;To read more and get your ticket before they run out, visit: &lt;/FONT&gt;&lt;A href="http://www.cornerstone.se/expertzone/pmc/"&gt;&lt;FONT face=Verdana size=2&gt;http://www.cornerstone.se/expertzone/pmc/&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I will see you there!&lt;/FONT&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/en-koPwn2SU" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=447</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=447</feedburner:origLink></item>
        <item>
            <pubDate>Wed, 05 Sep 2007 15:00:16 GMT</pubDate>
            <category>Silverlight</category>
            <title>Silverlight 1.0 Released and Silverlight for Linux Announced</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/fa1gFEdVuHw/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Silverlight 1.0 Released and Silverlight for Linux Announced, you can read more &lt;/FONT&gt;&lt;A href="http://weblogs.asp.net/scottgu/archive/2007/09/04/silverlight-1-0-released-and-silverlight-for-linux-announced.aspx"&gt;&lt;FONT face=Verdana size=2&gt;here&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;You can download Silverligth from &lt;/FONT&gt;&lt;A href="http://www.silverlight.net"&gt;&lt;FONT face=Verdana size=2&gt;www.silverlight.net&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/fa1gFEdVuHw" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=446</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=446</feedburner:origLink></item>
        <item>
            <pubDate>Fri, 31 Aug 2007 12:14:09 GMT</pubDate>
            <category>Other</category>
            <title>SweNug Architect Summit 2007 - at last here again</title>
            <link>http://feedproxy.google.com/~r/FredrikNormnsBlog/~3/--1Z9KRw2wI/viewpost.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;SweNug Architect Summit 2007 will take place between the 5th to 6th October this year. It will start on Friday at 06:00 PM with an introduction, and will end somewhere around 05:00 PM on Saturday. We will use Open spaces, so there are no speakers. The idea is that the attendance will set the agenda and talk about interesting things regarding architecture. Because we use Open Spaces we only have spots for about 30-40 people and you should have a burning interest in the architecture topic and also willing to share your thoughts and ideas.&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;&lt;BR&gt;The SweNug Architect Summit will be in Cornerstone&amp;#8217;s facility in Stockholm (Sweden). You can find a map and an address at the following link: &lt;/FONT&gt;&lt;A href="http://www.cornerstone.se/aboutCornerstone/showRoadDiscription.aspx?cityID=2"&gt;&lt;FONT face=Verdana size=2&gt;http://www.cornerstone.se/aboutCornerstone/showRoadDiscription.aspx?cityID=2&lt;/FONT&gt;&lt;/A&gt;&lt;BR&gt;&lt;FONT face=Verdana size=2&gt;&lt;BR&gt;This will be an opportunity for all of you to meet experience people in the field and have a live conversation with each other. The registration process is easy, just send your name and contact info to:&lt;BR&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;A href="mailto:fredrik.normen@cornerstone.se"&gt;&lt;FONT face=Verdana size=2&gt;fredrik.normen@cornerstone.se&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; or &lt;/FONT&gt;&lt;A href="mailto:patrik.lowendahl@cornerstone.se"&gt;&lt;FONT face=Verdana size=2&gt;patrik.lowendahl@cornerstone.se&lt;/FONT&gt;&lt;/A&gt;&lt;BR&gt;&lt;FONT face=Verdana size=2&gt;&lt;BR&gt;The best thing, it&amp;#8217;s free!&lt;/FONT&gt;&lt;/P&gt;
&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.blogtopsites.com/computers/"&gt;&lt;img style="border:none" src="http://www.blogtopsites.com/track_50273.gif" alt="Computers Blogs - Blog Top Sites" style="display:none" /&gt;&lt;/a&gt;&lt;br/&gt;
&lt;!-- Bloggtoppen.se --&gt; &lt;a href="http://www.bloggtoppen.se/"&gt;&lt;img border="0" src="http://www.bloggtoppen.se/tracker.php?do=in&amp;id=11236" alt="Bloggtoppen.se" style="display:none" /&gt;&lt;/a&gt; &lt;!-- /Bloggtoppen.se --&gt;&lt;img src="http://feeds.feedburner.com/~r/FredrikNormnsBlog/~4/--1Z9KRw2wI" height="1" width="1"/&gt;</description>
            <guid isPermaLink="false">http://fredrik.nsquared2.com/viewpost.aspx?PostID=445</guid>
        <feedburner:origLink>http://fredrik.nsquared2.com/viewpost.aspx?PostID=445</feedburner:origLink></item>
    </channel>
</rss>
