<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://experience.fellowshipone.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Intelligent Design : Framework</title><link>http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/Framework/default.aspx</link><description>Tags &amp; Topics: Framework</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61120.2)</generator><item><title>Innovating with MVC in ASP.NET</title><link>http://experience.fellowshipone.com/blogs/intelligentdesign/archive/2007/11/01/innovating-with-mvc-in-asp-net.aspx</link><pubDate>Thu, 01 Nov 2007 00:55:00 GMT</pubDate><guid isPermaLink="false">87eee960-b871-44cb-8a98-02588a960c04:8964</guid><dc:creator>FTProductDev</dc:creator><slash:comments>0</slash:comments><comments>http://experience.fellowshipone.com/blogs/intelligentdesign/comments/8964.aspx</comments><wfw:commentRss>http://experience.fellowshipone.com/blogs/intelligentdesign/commentrss.aspx?PostID=8964</wfw:commentRss><description>&lt;P&gt;If you were following our blog at the end of last year, you read my entry on MVC -&amp;nbsp;&lt;A class="" href="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/2006/09/22/Enterprise-.NET-architecture.aspx"&gt;Wrestling an Enterprise Architecture out of .NET&lt;/A&gt;.&amp;nbsp; Well, we pressed forward and developed a fully-working MVC2 architecture on top of ASP.NET.&amp;nbsp; We've had some bumps along the way, but we think it's been worth&amp;nbsp;the effort&amp;nbsp;to move to an MVC2 architecture.&amp;nbsp; The benefit of moving the majority of your application's logic into controllers cannot be overstated.&amp;nbsp; Testing and API extensibility are just a couple of the huge benefits.&amp;nbsp; We said as much to Scott Guthrie in an email conversation at the beginning of this year, and asked why Microsoft didn't address this architectural need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;We were very pleased to hear that Microsoft is going to do just that with their &lt;A class="" href="http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx"&gt;MVC framework in ASP.NET&lt;/A&gt;, and it feels good to know we were ahead of the curve.&amp;nbsp; Matt Vasquez and I also had the honor of attending a Software Design Review of MVC and some other technologies, along with about 20 others, in Redmond last week.&amp;nbsp; It was a great event, with tons of info on upcoming technologies and some good conversations with the developers.&amp;nbsp; Not to mention the fact that a thirty second question to Scott Guthrie after dinner solved a problem that our development team has spent at least a collective 24 hours trying to figure out.&amp;nbsp; While everything covered in the SDR is under a non-disclosure, suffice it to say that we're excited about this new MVC support from Microsoft.&amp;nbsp;&amp;nbsp;Our home-grown architecture is very legitimized by what we saw.&amp;nbsp; We're very close to what they've developed, but I'm sure we'll be able to use a lot of what they're creating to more cleanly handle what we had to hack onto ASP.NET.&amp;nbsp; It's also exciting to be able to influence the development of this new framework.&amp;nbsp; I plan on cranking some code from the SDR bits starting this weekend and giving lots of juicy feedback.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I pray that all our customers know that we place a great deal of importance on innovation.&amp;nbsp; It's a high priority for us to innovate both&amp;nbsp;our architecture and our processes to improve our product, and we aren't afraid to go to the lengths necessary to align our development with future-thinking choices.&amp;nbsp; It takes a pioneering spirit to not only see where technology needs to go, but to also take the effort/time/risk to move in that direction.&amp;nbsp; This past year, we moved to the Agile process of &lt;A class="" href="http://en.wikipedia.org/wiki/Scrum_(development)"&gt;Scrum&lt;/A&gt; and created our own MVC architecture on top of ASP.NET.&amp;nbsp; All of our new development now adhears to the MVC pattern (MVC2 if you want to be specific).&amp;nbsp; God has given us a pioneering spirit, and we're excited about where He's leading us.&lt;/P&gt;
&lt;P&gt;thardy&lt;/P&gt;&lt;img src="http://experience.fellowshipone.com/aggbug.aspx?PostID=8964" width="1" height="1"&gt;</description><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/MVC/default.aspx">MVC</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/Framework/default.aspx">Framework</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/Scrum/default.aspx">Scrum</category></item><item><title>Typed Navigation</title><link>http://experience.fellowshipone.com/blogs/intelligentdesign/archive/2007/01/09/Typed-Navigation.aspx</link><pubDate>Tue, 09 Jan 2007 17:12:00 GMT</pubDate><guid isPermaLink="false">87eee960-b871-44cb-8a98-02588a960c04:808</guid><dc:creator>thardy</dc:creator><slash:comments>0</slash:comments><comments>http://experience.fellowshipone.com/blogs/intelligentdesign/comments/808.aspx</comments><wfw:commentRss>http://experience.fellowshipone.com/blogs/intelligentdesign/commentrss.aspx?PostID=808</wfw:commentRss><description>&lt;p&gt;One of the features we&amp;#39;ve worked into our new home-grown architecture&amp;nbsp;is typed navigation.&amp;nbsp; Without typed navigation,&amp;nbsp;urls are strewn throughout the code, and any changes to navigation or querystrings involve updates to many pages. &amp;nbsp;Not only that, providing a page the data it needs to properly initialize can be difficult to manage and very easy to misunderstand by a developer who is working in a page they&amp;#39;re not familiar with.&amp;nbsp; These issues cause navigation edits to be error-prone and reduce maintainability and extensibility.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;The Need&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Consider the following common scenario - You&amp;#39;ve got a page (let&amp;#39;s say EmployeeDetail.aspx) that requires an EmployeeID be passed to it.&amp;nbsp; There are many different ways to get the ID to the page:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;QueryString - EmployeeDetail.aspx?empID=100&lt;/li&gt;&lt;li&gt;Session - Session[&amp;quot;EmployeeID&amp;quot;] = 100&lt;/li&gt;&lt;li&gt;Database retrieval&lt;/li&gt;&lt;li&gt;etc...&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Each method involves different code to set and retrieve the value.&amp;nbsp; In addition, almost every app uses multiple methods in different places and in different scenarios.&amp;nbsp; This results in too many decisions being made by too many different developers, which results in maintenance nightmares.&amp;nbsp; Strict processes can mitigate some of the maintenance pain,&amp;nbsp;if all of your developers ALWAYS use the exact same mechanism, but what about extensibility?&amp;nbsp; What if the page name needs to change at some point?&amp;nbsp; What if you decide to change the way you handle data transfer between pages?&amp;nbsp; Or, more commonly, what if a page simply changes the data it needs or accepts?&lt;/p&gt;&lt;p&gt;Cascading Style Sheets (CSS) is a good example of an architecture with big benefits in UI design - you can make a style change in one place, and that change gets applied in all pages where that style is used.&amp;nbsp; The same measuring stick can be applied to all architectures - can you make a configuration change in a few places (preferably one), and have it applied in all areas of usage?&amp;nbsp; I think most apps would fail this measure in the area of navigation.&amp;nbsp; If a page name changes, most application architectures would require manual changes in many pages - links, code behind redirects, data tables, etc.&amp;nbsp; Even more architectures would fail the test if a change is made to how data is transferred.&amp;nbsp; If a QueryString value changes from empID, to eID, how many code changes would need to be made?&amp;nbsp; What if a page now requires an orgID?&amp;nbsp; Or how about if you move from QueryString to Session, or vice versa?&amp;nbsp; This is where good architectures shine in the long run.&amp;nbsp; Yes you can continue to change the font&amp;nbsp;manually in all your pages when your app is small, but heavy usage of CSS is now widely accepted as best-practice simply because style maintenance and extensibility become absolutely crazy as the number of pages in your site gets large.&amp;nbsp; Why should navigation be any different?&amp;nbsp; It gets just as crazy as your app gets large, and can benefit just as much&amp;nbsp;from a consolidated architecture.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;The Solution&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Our solution is to use typed navigation.&amp;nbsp; There are several potential architectures available, one of which is &lt;a href="http://metasapiens.com/PageMethods/"&gt;PageMethods&lt;/a&gt;.&amp;nbsp; There&amp;#39;s a great list of the benefits of typed navigation on that page, so I&amp;#39;ll try not to rehash all of them here.&amp;nbsp; We took a good look at this&amp;nbsp;solution before developing our own architecture, but decided we wanted much more control over our navigation.&amp;nbsp; Also, the PageMethods solution is locked into generating urls with QueryStrings, and it involves&amp;nbsp;pages calling specific methods in other pages, which our new architecture steers clear of&amp;nbsp;due to MVC principles.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Our architecture includes the following:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Typed Location objects - every navigation destination (View) has its own Location class&lt;/li&gt;&lt;li&gt;Each Location&amp;nbsp;class defines a constant &amp;quot;ViewName&amp;quot; which maps to a url defined in a database, so no urls or page names are ever written in code&amp;nbsp; &lt;/li&gt;&lt;li&gt;Each Location&amp;nbsp;class can have multiple constructors - the constructors provide all the contracts to create&amp;nbsp;the View and allow pages to fulfill multiple roles (list/detail based on what data is sent to them)&lt;/li&gt;&lt;li&gt;Usage in links - a new Location object is created in code-behind and used to set&amp;nbsp;the&amp;nbsp;Location property on one of our HyperLink controls.&amp;nbsp; If set,&amp;nbsp;the HyperLink control has the Location&amp;nbsp;generate its URL when the control is rendered.&amp;nbsp; &lt;/li&gt;&lt;li&gt;Usage in server-side redirects - a controller simply creates a new Location object and calls a&amp;nbsp;public Navigate method on its View &lt;/li&gt;&lt;li&gt;Hydrating Location objects - our base Page class takes care of rehydrating the location object and transferring its data to the View&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Here are the only two options a developer will see regarding Navigation in our app:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;For a HyperLink:&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;font face="courier new,courier"&gt;lnkEmployeeDetail.Location = new EmployeeDetailLocation(employeeID);&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;p&gt;For a server-side redirect:&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;font face="courier new,courier"&gt;_myView.Navigate(new EmployeeDetailLocation(employeeID));&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Since all this is handled by the architecture, changes can be made in just a few places and totally change the Navigation mechanism.&amp;nbsp; We can switch from QueryStrings to Session variables, or rewrite URLs, or change how we rewrite URLs as often as we want.&amp;nbsp; No code that actually uses the Navigation would ever need to change, and&amp;nbsp;page names can change without missing a beat.&amp;nbsp;&amp;nbsp;All the code written to create strongly-typed Location objects would continue to navigate as usual.&amp;nbsp;&amp;nbsp;If a page&amp;#39;s initialization requirements changed, then code would break at compile time instead of runtime, with a very clear and self-describing explanation of exactly how the new Location object needs to be constructed.&amp;nbsp; That&amp;#39;s a lot better than having some forgotten link deep in your app with an obsolete parameter definition getting discovered by a customer after you&amp;#39;ve published your app to production.&lt;/p&gt;&lt;p&gt;Typed Navigation is one more step we&amp;#39;re taking to make our code easy to work with and understand, regardless of how long it&amp;#39;s been since anyone&amp;#39;s&amp;nbsp;touched it,&amp;nbsp;how many developers have had their hands in it, or how large it grows.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://experience.fellowshipone.com/aggbug.aspx?PostID=808" width="1" height="1"&gt;</description><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/.NET/default.aspx">.NET</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/Navigation/default.aspx">Navigation</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/Framework/default.aspx">Framework</category><category domain="http://experience.fellowshipone.com/blogs/intelligentdesign/archive/tags/URL/default.aspx">URL</category></item></channel></rss>