<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>thinking in geek &#187; web architecture</title>
	<atom:link href="http://joshrobb.com/blog/category/web-architecture/feed/" rel="self" type="application/rss+xml" />
	<link>http://joshrobb.com/blog</link>
	<description>tagline's are so web2.0</description>
	<lastBuildDate>Fri, 11 Mar 2011 07:17:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>ASP.NET == Usability disaster?</title>
		<link>http://joshrobb.com/blog/2008/09/29/aspnet-usability-disaster/</link>
		<comments>http://joshrobb.com/blog/2008/09/29/aspnet-usability-disaster/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 09:24:08 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[web architecture]]></category>

		<guid isPermaLink="false">http://joshrobb.com/blog/?p=18</guid>
		<description><![CDATA[[This has been in the queue for a long time - over 12 months - codebetter just tipped me over the edge!] Peter Van Dijck asks: Iâ€™ve only worked twice with companies using .NET for web interfaces, and in both cases the UI was a disaster and the usability problems guaranteed lots of consulting hours.. [...]]]></description>
			<content:encoded><![CDATA[<p>[This has been in the queue for a long time - over 12 months - codebetter just tipped me over the edge!]</p>
<p><a href="http://poorbuthappy.com/ease/archives/2007/05/01/3626/3626">Peter Van Dijck asks</a>:</p>
<blockquote><p>Iâ€™ve only worked twice with companies using .NET for web interfaces, and in both cases the UI was a disaster and the usability problems guaranteed lots of consulting hours.. Why is that? Or was that a fluke? (2 cases is hardly proof of anything) I know itâ€™s possible to make usable and elegant web UI with any technology, but does .NET somehow encourage bad UI?</p></blockquote>
<p>This is a great question and in my opinion &#8211; the answer is yes. (AssumingÂ that Peter really means WebForms.) Â <img style="float:right" title="spike pit of death" src="http://www.hotkey.net.au/~marshalle/booby/pit.gif" alt="spike pit of death" width="350" height="321" /></p>
<p>This is demonstrated in so many small ways by framework defaults which are totally brain dead (__doPostBack anyone?). Rather than lead dev&#8217;s into the <a href="http://blogs.msdn.com/brada/archive/2003/10/02/50420.aspx">pit of success</a> &#8211; the framework leads devs to the spiky elephant trap of death.Â </p>
<p>Â <br />
What&#8217;s that &#8211; an example? How about the &lt;customErrors&gt; defaults. When an error occurs during processing an ASP.NET request &#8211; the <strong>default</strong>Â behaviorÂ of a new web.config is to redirect the user to another URL. This is what a new web.config looks like in VS2k5.Â </p>
<p>Â Â  Â  Â  Â &lt;customErrors mode=&#8221;RemoteOnly&#8221; defaultRedirect=&#8221;GenericErrorPage.htm&#8221;&gt;</p>
<p>Â Â  Â  Â  Â  Â  Â &lt;error statusCode=&#8221;403&#8243; redirect=&#8221;NoAccess.htm&#8221; /&gt;</p>
<p>Â Â  Â  Â  Â  Â  Â &lt;error statusCode=&#8221;404&#8243; redirect=&#8221;FileNotFound.htm&#8221; /&gt;</p>
<p>Â Â  Â  Â  Â &lt;/customErrors&gt;</p>
<div>This is really brain deadÂ behavior! Let&#8217;s count the ways:Â </div>
<div>1. There&#8217;s no way to change the HTTP status code from a html page. (E.g. &#8211; should be 404, 500 etc). This is just flat out bad &#8211; status codes are important for lots of reasons.</div>
<div>2. The <strong><em>effing</em></strong> URL will change. This makes it difficult to correct typing errors or retry a request in case of a server error (500).Â </div>
<div>3. Those files don&#8217;t even exist! You can get a 404 when the real error is a 500 because the file that your getting redirected to don&#8217;t <strong>effing</strong> exist!Â </div>
<div>This just happened to me &#8211; I was just wondering if there is a port of the monorailÂ SmartGridComponent to ASP.NET MVC. I do a Google search and get a <a href="http://devlicio.us/blogs/billy_mccafferty/archive/2008/08/10/41786.aspx">likely looking result forÂ Billy McCafferty&#8217;s blog</a>. I click on the link and I get the following page:Â </div>
<div>
<blockquote>
<div><strong>Oops something went wrong!</strong></div>
<div>Either the site is offline or an unhandled error occurred. We apologize and have logged the error. Please try your request again or if you know who your site administrator is let them know too.</div>
</blockquote>
</div>
<p>Â </p>
<p>The URL in the browsers address bar is:Â </p>
<blockquote><p>http://devlicio.us/error.htm?aspxerrorpath=/themes/blogs/default/post.aspx</p></blockquote>
<div>HOW the F$%K do I try my request again?</div>
<div>If I&#8217;ve opened this result in a new tab (which is my habbit) I&#8217;m screwed! There is no back button, refresh (F5 or whatever) just reloads the error page and will <em>never</em>Â show me the correct page.</div>
<div>If I just clicked the link &#8211; the back button takes me back to my google search where I can click on the link again &#8211; refresh is still borked.Â </div>
<p>Another example? Linkbutton? Anyone who&#8217;s tried to open a link in a new tab/window and got a blank window with a URL like:Â javascript:__doPostBack(&#8216;ctl00$Masthead1$LocaleManagement$ctl00$ctl05&#8242;,&#8221;) &#8211; knows the pain I&#8217;m talking about.Â </p>
<p>Go on &#8211; right now &#8211; go try and open a MSDN library page in different language in a new tab. (It&#8217;s the little menu up the top right where it says (e.g.): United States &#8211; English).Â </p>
<p>In my apps &#8211; I fix this by disabling customErrors and writing new error handling code which both maintains the url and returns the correct HTTP statuses &#8211; but this is code which I should not have to write. This is code which all web servers/apps need to implement correctly &#8211; it should be automatic. We shouldn&#8217;t have to write custom code to get a HTTP/404 returned when an appÂ encounters a missing file!</p>
]]></content:encoded>
			<wfw:commentRss>http://joshrobb.com/blog/2008/09/29/aspnet-usability-disaster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enterprise plaforms &#8211; teaching new dogs old tricks</title>
		<link>http://joshrobb.com/blog/2007/11/19/enterprise-plaforms-teaching-new-dogs-old-tricks/</link>
		<comments>http://joshrobb.com/blog/2007/11/19/enterprise-plaforms-teaching-new-dogs-old-tricks/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 23:23:19 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[web architecture]]></category>

		<guid isPermaLink="false">http://joshrobb.com/blog/2007/11/19/enterprise-plaforms-teaching-new-dogs-old-tricks/</guid>
		<description><![CDATA[Oren is talking about building a substrate for an enterprise platform. This has been something I&#8217;ve wanted to do since I first got my hands on c# and the rest of the .net framework in 2001. I&#8217;ve never done it because it always seemed that a one size fits all solution would be unworkable. At [...]]]></description>
			<content:encoded><![CDATA[<p>Oren is talking about building a <a href="http://ayende.com/Blog/archive/2007/11/17/A-vision-of-enterprise-platform.aspx">substrate for an enterprise platform</a>. This has been something I&#8217;ve wanted to do since I first got my hands on c# and the rest of the .net framework in 2001. I&#8217;ve never done it because it always seemed that a one size fits all solution would be unworkable.</p>
<p>At the time &#8211; the best web architecture I knew of was the <a href="http://en.wikipedia.org/wiki/ArsDigita_Corporation">ArsDigita</a> <a href="http://en.wikipedia.org/wiki/ArsDigita_Community_System">Community System</a> (still available and maintained as <a href="http://openacs.org/">OpenACS</a>). What Oren is describing sounds similar in many ways.</p>
<p>The ACS architecture is based on the days when Oracle and TCL were good options for building web based systems&#8230;. but the underlying design is still very very good (e.g. it was the first place I every saw the Party pattern). They were focused on designing good data models and separating concerns.</p>
<p>They have the following available in their <a href="http://openacs.org/doc/current/kernel-doc.html">kernel</a>:</p>
<ul>
<li><a href="http://openacs.org/doc/current/parties.html">Parties</a>, Users and <a href="http://openacs.org/doc/current/groups-design.html">(nestable) groups</a></li>
<li><a href="http://openacs.org/doc/current/permissions-tediously-explained.html">A permissions system</a> which supports per &#8220;<a href="http://openacs.org/doc/current/objects.html">object</a>&#8221; (think row) permissions.</li>
<li>A <a href="http://openacs.org/doc/current/apm-design.html">package manager</a> which allows you to install (and remove) modules of functionality into an existing system (including schema changes, new routes etc). e.g. adding a e-commerce, blogging or threaded discussion module is a matter of clicking in a web ui.</li>
<li><a href="http://openacs.org/doc/current/tutorial-schedule-procs.html">Scheduled tasks</a></li>
</ul>
<p>This thing was and is pretty scalable (it runs the <a href="http://photo.net">photo.net</a> community).</p>
<p>It&#8217;s over 10 years old still a source of good ideas. I recommend taking a poke around their documentation and seeing what you can learn.</p>
<p>(I remember reading once that Philip Greenspun &#8211; the original ACS designer was asked by Microsoft to build a new version while the .net framework 1.0 was in development as a showpiece. For some reason he didn&#8217;t but I always felt that it was a shame this never happened).</p>
]]></content:encoded>
			<wfw:commentRss>http://joshrobb.com/blog/2007/11/19/enterprise-plaforms-teaching-new-dogs-old-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiple instances of memcached on win32</title>
		<link>http://joshrobb.com/blog/2007/11/08/multiple-instances-of-memcached-on-win32/</link>
		<comments>http://joshrobb.com/blog/2007/11/08/multiple-instances-of-memcached-on-win32/#comments</comments>
		<pubDate>Thu, 08 Nov 2007 18:04:45 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[web architecture]]></category>

		<guid isPermaLink="false">http://joshrobb.com/blog/2007/11/08/multiple-instances-of-memcached-on-win32/</guid>
		<description><![CDATA[It seems like the win32 crowd is discovering memcached. I&#8217;ve got a couple of support queries about it over the last month or two and I thought I&#8217;d post an interesting one here: &#8220;How can you run multiple instances of memcached on a single machine?&#8221; There&#8217;s a couple of reasons why you&#8217;d want to do [...]]]></description>
			<content:encoded><![CDATA[<p>It seems like the win32 crowd is <a href="http://www.25hoursaday.com/weblog/2007/07/05/ASPNETCachingVsMemcachedSeekingEfficientDataPartitioningLookupAndRetrieval.aspx">discovering</a> <a href="http://jehiah.cz/projects/memcached-win32/">memcached</a>. I&#8217;ve got a couple of support queries about it over the last month or two and I thought I&#8217;d post an interesting one here:</p>
<blockquote><p>&#8220;How can you run multiple instances of memcached on a single machine?&#8221;</p></blockquote>
<p>There&#8217;s a couple of reasons why you&#8217;d want to do this.  The most obvious is that you&#8217;ve got multiple clients being serviced on a single machine and you want to absolutely ensure that data is not leaking from one client to another.</p>
<p>If you want to setup multiple instances the once you&#8217;ve got the win32 port downloaded and unziped somewhere you need to use the following magic incantation:</p>
<blockquote><p>sc create memcached2 binPath= &#8220;c:\memcached\memcached.exe -p 11111 -d runservice&#8221;</p></blockquote>
<p>You can pass any other params you wish (e.g. amount of memory to use). To run multiple instances just install multiple services with different names/ports.</p>
<p>Note: &#8220;sc&#8221; is the command line tool for working with the win32 service control manager. It allows you to stop/start/create/delete and more &#8211; windows services. Check out it&#8217;s command line help by typing &#8220;sc&#8221;<enter> at the command line.</p>
]]></content:encoded>
			<wfw:commentRss>http://joshrobb.com/blog/2007/11/08/multiple-instances-of-memcached-on-win32/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET MVC</title>
		<link>http://joshrobb.com/blog/2007/10/16/aspnet-mvc/</link>
		<comments>http://joshrobb.com/blog/2007/10/16/aspnet-mvc/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 19:25:51 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[web architecture]]></category>

		<guid isPermaLink="false">http://joshrobb.com/blog/2007/10/16/aspnet-mvc/</guid>
		<description><![CDATA[I got a chance over the weekend to watch the videos from altnetconf on the new Microsoft ASP.NET MVC framework. It&#8217;s a really exciting development. Anyway &#8211; as I&#8217;ve listened I&#8217;ve got myself a list of questions about features &#8211; I figured I&#8217;d put them here so I can see how they get on. In [...]]]></description>
			<content:encoded><![CDATA[<p>I got a chance over the weekend to watch the <a href="http://www.hanselman.com/blog/ScottGuMVCPresentationAndScottHaScreencastFromALTNETConference.aspx">videos</a> from <a href="http://www.altnetconf.com/">altnetconf</a> on the new <a href="http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx">Microsoft ASP.NET MVC framework</a>. It&#8217;s a really exciting development. Anyway &#8211; as I&#8217;ve listened I&#8217;ve got myself a list of questions about features &#8211; I figured I&#8217;d put them here so I can see how they get on.</p>
<ol>
<li>In views ScottGu shows how to write views using &lt;%=  %&gt;  style code. Now that was all good when asp classic was a new and good idea. These days some (lots?) of people think that HtmlEncode&#8217;ing by default is a good idea. It makes attacks like XSS and CSRF more difficult and is the default for much of the WebForms controls. It&#8217;d be nice to see support for this integrated into the WebForms compiler or maybe a rails like &lt;%h=  %&gt; option.</li>
<li>Scott demos a new extension method: .UpdateFrom(NameValueCollection) which allows you to update a class from a NameValueCollection. This is super sweet &#8211; especially with the built in reflection caching he mentions. I&#8217;d like to know if this extension methos has support for whitelist/blacklist of incoming property names/values? (Like the <a href="http://www.castleproject.org/monorail/documentation/trunk/usersguide/smartcontrolleradv.html">MonoRail</a> <a href="http://api.castleproject.org/html/P_Castle_MonoRail_Framework_DataBindAttribute_Exclude.htm">DataBindAttribute.Exclude/Allow</a> properties). IMO &#8211; this is an important security consideration.</li>
<li>Can you configure the routing rules based on HostHeader+Url or is it just Url?)</li>
<li>In the example he uses &#8211; the Layout is specified by the View (i.e. MasterPage=&#8221;") &#8211; this is an improper separation of concerns &#8211; it should be upto the Controller to specify the &#8220;layout&#8221; (masterpage).</li>
</ol>
<p>Anyway &#8211; it&#8217;s really just a list of things I&#8217;ve thought of and am curious about. Overall I&#8217;m amazingly excited and really looking forward to getting my hands on some bits.</p>
]]></content:encoded>
			<wfw:commentRss>http://joshrobb.com/blog/2007/10/16/aspnet-mvc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebForms hurt me good&#8230;</title>
		<link>http://joshrobb.com/blog/2007/09/04/webforms-hurt-me-good/</link>
		<comments>http://joshrobb.com/blog/2007/09/04/webforms-hurt-me-good/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 00:01:07 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[web architecture]]></category>

		<guid isPermaLink="false">http://joshrobb.com/blog/2007/09/04/webforms-hurt-me-good/</guid>
		<description><![CDATA[Today I spent a long time trying to add a control to the Page.Controls collection from a MasterPage. Short version: without writing a(nother) IHttpModule which hooks Page_PreLoad and fires off an event of it&#8217;s own on the MasterPage. You can&#8217;t. (unless I&#8217;m missing something). Another classic example of WebForms being too complicated for it&#8217;s own [...]]]></description>
			<content:encoded><![CDATA[<p>Today I spent a long time trying to add a control to the Page.Controls collection from a MasterPage. Short version: without writing a(nother) IHttpModule which hooks Page_PreLoad and fires off an event of it&#8217;s own on the MasterPage. You can&#8217;t. (unless I&#8217;m missing something).</p>
<p>Another classic example of WebForms being too complicated for it&#8217;s own good.</p>
<p>In other news: <a href="http://www.ayende.com/blog">Oren</a> and <a href="http://www.matshelander.com/wordpress/">Mats</a> are having a dustup over <a href="http://ayende.com/Blog/archive/2007/08/25/In-Defense-of-WebForms-Well-maybe-not.aspx">webforms</a>. I have this remarkible experence when I work with WebForms. Sometimes I get the entire model/life-cycle/event flow etc in my head and fix or work around quite complex scenarios to get some piece of functionality working.</p>
<p>e.g. Writing a control which/removes adds instances of other controls to itself when buttons are presses.</p>
<p>When this happens I experience this strange sense of achievement and even pride. The feeling that I have really done some &#8220;hardcore&#8221; programming today. Then I remember that I just managed to inject a string into the middle of another string and write the result to a stream.</p>
<p>Then I feel sad.</p>
]]></content:encoded>
			<wfw:commentRss>http://joshrobb.com/blog/2007/09/04/webforms-hurt-me-good/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Business Intelligence in Business Apps</title>
		<link>http://joshrobb.com/blog/2007/08/23/business-intelligence-in-business-apps/</link>
		<comments>http://joshrobb.com/blog/2007/08/23/business-intelligence-in-business-apps/#comments</comments>
		<pubDate>Thu, 23 Aug 2007 12:28:57 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[web architecture]]></category>

		<guid isPermaLink="false">http://joshrobb.com/blog/2007/08/23/business-intelligence-in-business-apps/</guid>
		<description><![CDATA[I&#8217;ve been mulling over Ron Kohavi&#8217;s paper Integrating E-Commerce and Data Mining: Architecture and Challenge. In the space of applications that I work on &#8211; Business Intelligence and Analytics are becoming more and more important. It&#8217;s not just important that the system allows you to do whatever. (The classic post Blog entries for example). I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been mulling over Ron Kohavi&#8217;s paper <a href="http://robotics.stanford.edu/%7Eronnyk/icdmIntegratingEcom.pdf" rel="nofollow">Integrating E-Commerce and Data Mining: Architecture and Challenge</a>. In the space of applications that I work on &#8211; Business Intelligence and Analytics are becoming more and more important. It&#8217;s not just important that the system allows you to do whatever. (The classic post Blog entries for example). I need to be able to provide information about how users are interacting with the application.</p>
<ul>
<li>Who&#8217;s using what features?</li>
<li>Where are the users coming from?</li>
<li>How long does it take subset X of users to perform action Y?</li>
</ul>
<p>Some of these are closely related to traditional web analytics, but many of them cannot be answered without application level event logging. Ron&#8217;s papers describe how Blue Martini did this within their e-commerce framework and what a huge advantage this gave them when doing BI. One of the insights of the paper above is that having a meta-model for your application is <em>really</em> important for later analysis. You need to know:</p>
<ul>
<li>When you changed the default answer for question X on the registration form?</li>
<li>When did you add question Y to the checkout process?</li>
</ul>
<p>If you keep a metamodel and use that for updating your live DB<sup><a href="http://joshrobb.com/blog/2007/08/23/business-intelligence-in-business-apps/#footnote_0_34" id="identifier_0_34" class="footnote-link footnote-identifier-link" title="(Blue Martini used a highly optimised/denormalised datastore for it&amp;#8217;s e-commerce front end because of the performance requirements. ">1</a></sup>) then you can capture these changes as you change the data store. Ron&#8217;s team went further and built a data warehouse<sup><a href="http://joshrobb.com/blog/2007/08/23/business-intelligence-in-business-apps/#footnote_1_34" id="identifier_1_34" class="footnote-link footnote-identifier-link" title="(Including slowly changing &amp;#8211; aka type 2 &amp;#8211; and hierarchical dimensions">2</a></sup>) and ETL process automatically from the meta model &#8211; that was automatically updated as the live DB evolved.</p>
<p>I&#8217;ve been using some of these ideas independently for a long time (e.g. Event logging is a good idea) &#8211; but it&#8217;s the combination of of a meta model &#8211; including change history &#8211; and event logging that really provides the power here.</p>
<p>Short version. How I&#8217;m thinking about building business apps is changing. As I think about the business requirements, data model etc.. I&#8217;m now considering how we are going to capture/store/analyse the meta model and the business event stream. This seems like a significant evolution in my thinking.</p>
<ol class="footnotes"><li id="footnote_0_34" class="footnote">(Blue Martini used a highly optimised/denormalised datastore for it&#8217;s e-commerce front end because of the performance requirements. </li><li id="footnote_1_34" class="footnote">(Including slowly changing &#8211; aka type 2 &#8211; and hierarchical dimensions</li></ol>]]></content:encoded>
			<wfw:commentRss>http://joshrobb.com/blog/2007/08/23/business-intelligence-in-business-apps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SoC in WebForms</title>
		<link>http://joshrobb.com/blog/2007/08/02/soc-in-webforms/</link>
		<comments>http://joshrobb.com/blog/2007/08/02/soc-in-webforms/#comments</comments>
		<pubDate>Thu, 02 Aug 2007 16:40:40 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[castle]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[web architecture]]></category>

		<guid isPermaLink="false">http://joshrobb.com/blog/2007/08/02/soc-in-webforms/</guid>
		<description><![CDATA[Scott Bellware makes a brillant comment on Hammett&#8217;s weblog: ASP .NET templated controls did almost nothing to encourage separation of orthogonal concerns. It simply ended up separating concerns that arenâ€™t separate concerns. Pure Genius &#8211; this summarises an entire field of criticism (e.g. [1][2]). The whole issue with the OnRowDataBound/FindControl() style of programming is that [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://codebetter.com/blogs/scott.bellware/">Scott Bellware</a> makes a <a href="http://hammett.castleproject.org/?p=183#comment-21908">brillant comment</a> on <a href="http://hammett.castleproject.org/">Hammett&#8217;s</a> weblog:</p>
<blockquote><p>ASP .NET templated controls did almost nothing to encourage separation of orthogonal concerns. It simply ended up separating concerns that arenâ€™t separate concerns.</p></blockquote>
<p>Pure Genius &#8211; this summarises an entire field of criticism (e.g. <a href="http://www.ayende.com/Blog/archive/2007/07/23/The-Correct-Separation-Of-Concerns.aspx">[1]</a><a href="http://hammett.castleproject.org/?p=161">[2]</a>). The whole issue with the OnRowDataBound/FindControl() style of programming is that things which are fundamentally simple (iteration and string concatenation) are impossibly complex because concerns have been separated which are not orthogonal.</p>
<p>There&#8217;s an important caveat  to this &#8211; which is that WebForms is actually trying to solve a different problem from the one that I and many other developers build web apps are trying to solve. WebForms was intended to allow VB6 windows programmers to build web based apps &#8211; without having to understand HTTP, HTML, CSS, Javascript, GET/POST/HEAD etc.</p>
<p>This has actually proven to work pretty well in specific circumstances. e.g. A team of developers building an inhouse (intranet) line of business app. A good friend of mine was tasked to lead a team of 20 or so Oracle Designer developer in building a next gen version of the product they had been working on in ASP.NET 1.1. They were able to pick it up and get productive remarkably quickly because they could continue to work with a Control based, form based model that was familar to them.</p>
<p>Where it&#8217;s made life immeasurably harder is for developers who are building public facing web apps. Apps the HTML they&#8217;re actually emitting matters, where cross browser compat is something that needs to be deeply understood &#8211; not abstracted away (thats a whole &#8216;nother post).</p>
<p>The reason this is even an issue is because of the Microsoft DevDiv monoculture. If it&#8217;s a Microsoft solution then it&#8217;s obviously the best. In the Java world &#8211; there&#8217;s JSP (classic asp using Java) and JSF (roughly webforms) &#8211; but there&#8217;s a whole boatload of other solutions to problems.</p>
<p>I don&#8217;t see anyone arguing that the only right way to build web apps using java is to use JSF. People are free to examine the problems they face, look at the solutions proposed by various other people who have published their work (e.g. Tapestry, Grails, RIFE, Struts, WebWork, Struts 2 etc&#8230;) and either use an existing solution or roll their own. Same in the Python (Django, Web.py, Zope), PHP (Zend Framework, Cake, various PEAR libraries), Perl and pretty much any other community you care to examine.</p>
<p>Which tool is right for you depends entirely on your context (the problem, your experience, your team, their experience etc). If Webforms is working for you &#8211; then fantastic but it&#8217;s not the right solution for everyone.</p>
]]></content:encoded>
			<wfw:commentRss>http://joshrobb.com/blog/2007/08/02/soc-in-webforms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BackgroundMotion code == Great</title>
		<link>http://joshrobb.com/blog/2007/07/05/backgroundmotion-code-great/</link>
		<comments>http://joshrobb.com/blog/2007/07/05/backgroundmotion-code-great/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 08:00:00 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[web architecture]]></category>

		<guid isPermaLink="false">http://joshrobb.com/blog/1999/11/30/backgroundmotion-code-great/</guid>
		<description><![CDATA[Note: This is a review of the recently release BackgroundMotion source code and developer guidance. Full disclosure â€“ I used to work with Jeremy and consider him a friend. I finally made some time today to sit down and browse through the source code for BackgroundMotion. For those of you who haven&#8217;t come across this [...]]]></description>
			<content:encoded><![CDATA[<p><em>Note: This is a review of the recently release BackgroundMotion source code and developer guidance. Full disclosure â€“ I used to work with Jeremy and consider him a friend.<br />
</em></p>
<p>I finally made some time today to sit down and browse through the source code for <a href="http://backgroundmotion.com">BackgroundMotion</a>. For those of you who haven&#8217;t come across this project &#8211; it&#8217;s kind of a best practices sample built by the great guys at <a href="http://www.mindscape.co.nz">Mindscape</a>. Background motion is a Web2.0, AJAXified, community driven site for submitting videos for use with <a href="http://windowsultimate.com/blogs/extras/archive/2007/03/14/windows-dreamscene.aspx">Windows Vista Dreamscene</a> (the use a video as your background rather than just an image thingy). It&#8217;s pretty buzzword compliant &#8211; it&#8217;s got tags, AJAX and user generated content. On the backend it uses ASP.NET AJAX, LINQ to SQL, the Web Client Software factory, MVP, Unit testing and all sorts of other goodies.</p>
<p>Unlike lots of the samples and guidance coming from the P&amp;P team &#8211; this one is also a real functioning LIVE application. Rather than just completing something to the degree necessary to show the main concepts &#8211; this is a pretty finished piece of work. Well &#8211; production ready at least &#8211; what software is ever &#8220;finished&#8221;?</p>
<p>It&#8217;s also a great resource for looking at structuring a real world application using the full Microsoft .NET 3.5 stack. There are heaps of great ideas in there including:</p>
<ul>
<li>Echoes of discussions in <a href="http://jimmynilsson.com/blog/">Jimmy Nilsson&#8217;s</a> book <a href="http://www.amazon.co.uk/exec/obidos/ASIN/0321268202/">Applying Domain-Driven Design and Patterns: Using .Net</a></li>
<li>Implementations of UnitOfWork , Repository&lt;T&gt; + Repository Specialization  very similar to  <a href="http://www.ayende.com">Oren&#8217;s</a> <a href="http://rhino-tools.svn.sourceforge.net/viewvc/rhino-tools/trunk/SampleApplications/Exesto/">Exesto sample</a> + <a href="http://sourceforge.net/projects/rhino-tools">Rhino Tools</a></li>
<li>A declarative .net DataBinding Extender control similar to the ones in <a href="http://www.springframework.net/doc-latest/reference/html/web.html">Spring.Net</a>, the <a href="http://castleproject.org/monorail/">MonoRail</a> <a href="http://svn.castleproject.org:8080/svn/castle/trunk/MonoRail/TestSite/views/binding/DataBound.aspx">WebForms View Engine</a> and <a href="http://www.west-wind.com/">Rick Strahl&#8217;s </a><a href="http://msdn.microsoft.com/msdnmag/issues/06/12/ExtendASPNET/default.aspx?loc=en">wwDataBinder</a></li>
</ul>
<p>There are also <a href="http://backgroundmotion.com/DeveloperGuide.aspx">short videos</a> from the guys giving an overview of some of the technology/patterns and choices that they&#8217;ve used. I particularly liked the great discussion of <a href="http://backgroundmotion.com/Learn/ModelViewPresenter.aspx">MVP with WebForms</a>.</p>
<p>One minor criticism: I remember chatting with <a href="http://www.turtle.net.nz">Jeremy</a> about the <a href="http://www.codeplex.com/websf/Wiki/View.aspx?title=Composite%20Web%20Application%20Block">Composite Web Application Block</a> when it was released and complaining that after downloading it, reading the docs and source â€“ I couldn&#8217;t figure out how to use it. His answer at the time was: Wait until we release the BackgroundMotion source â€“ then you&#8217;ll have a real example. Well â€“ I&#8217;ve looked through the code â€“ and I still have no idea how the CWAB really adds value. Even after watching the <a href="http://backgroundmotion.com/Learn/PlayVideo.aspx?v=Nugget2">video</a> and reading the <a href="http://backgroundmotion.com/Learn/WebClientSoftwareFactory.aspx">Web Client Software Factory page</a> â€“ I&#8217;m clueless. Maybe I&#8217;m just not smart enough to get it.</p>
]]></content:encoded>
			<wfw:commentRss>http://joshrobb.com/blog/2007/07/05/backgroundmotion-code-great/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rails as the Visual Basic of the Web</title>
		<link>http://joshrobb.com/blog/2007/04/13/rails-as-the-visual-basic-of-the-web/</link>
		<comments>http://joshrobb.com/blog/2007/04/13/rails-as-the-visual-basic-of-the-web/#comments</comments>
		<pubDate>Fri, 13 Apr 2007 14:12:26 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[web architecture]]></category>

		<guid isPermaLink="false">http://joshrobb.com/blog/2007/04/13/rails-as-the-visual-basic-of-the-web/</guid>
		<description><![CDATA[A couple of things have got me thinking along these lines recently. Giles Bowkett made an interesting post on his blog: &#8220;[T]his has always been my fear for Rails; that in five to ten years, the worst jobs you could get will be Rails jobs where you&#8217;re maintaining stuff built by non-programmers who figured Rails [...]]]></description>
			<content:encoded><![CDATA[<address>A couple of things have got me thinking along these lines recently.</address>
<ol>
<li>Giles Bowkett made an <a href="http://gilesbowkett.blogspot.com/2007/03/conversation-with-reg-braithwaite.html">interesting post</a> on his blog:<br />
<blockquote><p>&#8220;[T]his has always been my fear for Rails; that in five to ten years, the worst jobs you could get will be Rails jobs where you&#8217;re maintaining stuff built by non-programmers who figured Rails made programming so easy that they didn&#8217;t really need to understand what they were doing.&#8221;</p></blockquote>
</li>
<li> In <a href="http://smallthought.com/avi/">Avi Bryant</a>&#8216;s ETech presentation <a href="http://smallthought.com/avi/?p=20">Applied Web Heresies</a> (<a href="http://smallthought.com/avi/etech.pdf">slides</a>) he makes the following statement:<br />
<blockquote><p>&#8220;Meaningful <acronym title="Uniform Resource Locators">URL</acronym>s don&#8217;t carry enough meaning<br />
Names make me think too much<acronym title="Don't repeat yourself"><br />
DRY</acronym> (not everything is an <acronym title="Application Programming Interface">API<acronym>)&#8221;</acronym></acronym></p></blockquote>
</li>
</ol>
<p>This is reminiscent of Visual Basic (and VBA, Access etc..). I know I&#8217;ve done maintenance on some scary code which was written by someone who didn&#8217;t understand enough about what they were doing.</p>
<p><strong>Not Everything is an API </strong></p>
<p>The obsession of Rails dudes with making every object a <acronym title="REpresentational State Transfer">REST</acronym> endpoint is a particularly scary form of religion. In VB6 every &#8220;class&#8221; was exposed as a COM object. For those of you who are not familiar with COM &#8211; this means that every public class in your application was exposed as an API. Weather you wanted it available to other applications or not. As you can imagine &#8211; this resulted in some truly monstrous misuse of parts of applications by other applications and lead to the worst kind of spaghetti dependencies imaginable (circular build dependencies etc).</p>
<p>In general API&#8217;s should be carefully thought through, designed and exposed as a separate development exercise from building a web application. For example:</p>
<ol>
<li>Google maps was released</li>
<li>People started hacking mashups using it.</li>
<li>The GMaps team went away and <em>designed</em> a JavaScript api which is:
<ul>
<li>versioned</li>
<li>licenced</li>
<li>secure</li>
<li>supportable</li>
</ul>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://joshrobb.com/blog/2007/04/13/rails-as-the-visual-basic-of-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

