<?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>Tea-Driven Development &#187; alt.net</title>
	<atom:link href="http://blog.mattwynne.net/tag/altnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mattwynne.net</link>
	<description>Matt Wynne taking it one tea at a time</description>
	<lastBuildDate>Tue, 10 Jan 2012 20:07:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Avoid Spaghetti Execution with the Judicious use of Inline Scripting</title>
		<link>http://blog.mattwynne.net/2007/10/30/avoid-spaghetti-execution-with-the-judicious-use-of-inline-scripting/</link>
		<comments>http://blog.mattwynne.net/2007/10/30/avoid-spaghetti-execution-with-the-judicious-use-of-inline-scripting/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 08:55:03 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[alt.net]]></category>
		<category><![CDATA[asp.net]]></category>

		<guid isPermaLink="false">http://blog.mattwynne.net/2007/10/30/avoid-spaghetti-execution-with-the-judicious-use-of-inline-scripting/</guid>
		<description><![CDATA[Rob Conery has kicked up a bit of a stink posting about the use of inline scripting in modern ASP.NET apps. I may post more on this subject when I have time, but I had to just weigh in with my support for disciplined use of this technique, which can save you hundreds of pointless [...]]]></description>
			<content:encoded><![CDATA[<p>Rob Conery has <a href="http://blog.wekeroad.com/2007/10/15/crazy-talk-inline-scripting-and-code-behind/">kicked up a bit of a stink</a> posting about  the use of inline scripting in modern ASP.NET apps.</p>

<p>I may post more on this subject when I have time, but I had to just weigh in with my support for disciplined use of this technique, which can save you hundreds of pointless lines of code and execution cycles in a large app if used wisely.</p>

<p>One trick we use is to replace all those silly asp:LinkButton tags with a good ole anchor tag, and a call to a special utility class called LinkBuilder which knows how the site&#8217;s URLs hang together, like so:
<pre>
&lt;a href="&lt;%= LinkBuilder.Show(catalogueItem) %&gt;"&gt;Cancel&lt;/a&gt;</pre>
This sort of markup can hardly be acused of being spaghetti code (the LinkBuilder method has a single line inside it), and means that we avoid what you might call &#8216;spaghetti execution&#8217; when you actually come to spin the thing up.</p>

<p>Think about what a sequence diagram of the equivalent use of an asp:LinkButton with a wired OnClick event would look like. Eugh.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mattwynne.net/2007/10/30/avoid-spaghetti-execution-with-the-judicious-use-of-inline-scripting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

