<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>AboutCode.net</title>
    <link>http://www.aboutcode.net/</link>
    <description>Thoughts on Software by Andrew Davey</description>
    <language>en-us</language>
    <copyright>Andrew Davey</copyright>
    <lastBuildDate>Thu, 15 Oct 2009 13:40:39 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.2.8279.16125</generator>
    <managingEditor>andrew@equin.co.uk</managingEditor>
    <webMaster>andrew@equin.co.uk</webMaster>
    <item>
      <trackback:ping>http://www.aboutcode.net/Trackback.aspx?guid=c7511e34-d295-44ed-bab9-be266e539b7a</trackback:ping>
      <pingback:server>http://www.aboutcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.aboutcode.net/PermaLink,guid,c7511e34-d295-44ed-bab9-be266e539b7a.aspx</pingback:target>
      <dc:creator>Andrew Davey</dc:creator>
      <wfw:comment>http://www.aboutcode.net/CommentView,guid,c7511e34-d295-44ed-bab9-be266e539b7a.aspx</wfw:comment>
      <wfw:commentRss>http://www.aboutcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=c7511e34-d295-44ed-bab9-be266e539b7a</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The <a href="http://altnetgroup.com/" target="_blank">Alternative Network Group</a> seems
to be getting more exciting all the time. <a href="http://serialseb.blogspot.com/" target="_blank">Seb</a> is
doing a great job organising beers and workshops. I would like to suggest a third
type of event: AltNetDemos.
</p>
        <p>
I seem to have lots of half-baked, prototype ideas in a month. Some of these make
it into open source projects, screencasts, blog posts and <a title="Follow me on Twitter" href="http://twitter.com/andrewdavey" target="_blank">tweets</a>.
However, it would be great to demo some things live to people.I’m imagining 5-10 minutes
with a laptop and projector in front of 30+ people. Let’s say we get 5 people per
session to demo and follow up with drinks/food. This provides time for discussions
about whatever people find interesting (like the start of an AltNetBeers evening).
These events can be a great way to generate buzz for new open source projects, bounce
ideas around and generally geek out with shiny technology!
</p>
        <p>
So what do reckon?
</p>
        <img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=c7511e34-d295-44ed-bab9-be266e539b7a" />
      </body>
      <title>AltNetDemos</title>
      <guid isPermaLink="false">http://www.aboutcode.net/PermaLink,guid,c7511e34-d295-44ed-bab9-be266e539b7a.aspx</guid>
      <link>http://www.aboutcode.net/2009/10/15/AltNetDemos.aspx</link>
      <pubDate>Thu, 15 Oct 2009 13:40:39 GMT</pubDate>
      <description>&lt;p&gt;
The &lt;a href="http://altnetgroup.com/" target="_blank"&gt;Alternative Network Group&lt;/a&gt; seems
to be getting more exciting all the time. &lt;a href="http://serialseb.blogspot.com/" target="_blank"&gt;Seb&lt;/a&gt; is
doing a great job organising beers and workshops. I would like to suggest a third
type of event: AltNetDemos.
&lt;/p&gt;
&lt;p&gt;
I seem to have lots of half-baked, prototype ideas in a month. Some of these make
it into open source projects, screencasts, blog posts and &lt;a title="Follow me on Twitter" href="http://twitter.com/andrewdavey" target="_blank"&gt;tweets&lt;/a&gt;.
However, it would be great to demo some things live to people.I’m imagining 5-10 minutes
with a laptop and projector in front of 30+ people. Let’s say we get 5 people per
session to demo and follow up with drinks/food. This provides time for discussions
about whatever people find interesting (like the start of an AltNetBeers evening).
These events can be a great way to generate buzz for new open source projects, bounce
ideas around and generally geek out with shiny technology!
&lt;/p&gt;
&lt;p&gt;
So what do reckon?
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=c7511e34-d295-44ed-bab9-be266e539b7a" /&gt;</description>
      <comments>http://www.aboutcode.net/CommentView,guid,c7511e34-d295-44ed-bab9-be266e539b7a.aspx</comments>
      <category>altnetdemos</category>
      <category>altnetgroup</category>
      <category>community</category>
    </item>
    <item>
      <trackback:ping>http://www.aboutcode.net/Trackback.aspx?guid=fe7d96cd-d308-491d-bccf-b58a1b87abc7</trackback:ping>
      <pingback:server>http://www.aboutcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.aboutcode.net/PermaLink,guid,fe7d96cd-d308-491d-bccf-b58a1b87abc7.aspx</pingback:target>
      <dc:creator>Andrew Davey</dc:creator>
      <wfw:comment>http://www.aboutcode.net/CommentView,guid,fe7d96cd-d308-491d-bccf-b58a1b87abc7.aspx</wfw:comment>
      <wfw:commentRss>http://www.aboutcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=fe7d96cd-d308-491d-bccf-b58a1b87abc7</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
When creating web applications I like to extract common pieces of mark-up into helper
functions. I use <a title="Hasic - View engine for asp.net mvc" href="http://www.assembla.com/wiki/show/hasic" target="_blank">Hasic</a> which
means helper functions are just simple VB functions that return XElement objects.
</p>
        <p>
However, dynamic web pages often use javascript to add elements at runtime. Consider
a page with a table of data which has an form to add rows. We want to add rows without
reloading the whole page. So we use AJAX to post the new data, then, in javascript,
create the new table row and append to the table.
</p>
        <p>
So we have a repetition of the same HTML template; server-side and client-side.
</p>
        <p>
Using Hasic we can eliminate this repetition. The following class field defines an
HTML template:
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:876b5e3b-2583-4f70-8ada-8625ddfed5d3" class="wlWriterEditableSmartContent">
          <pre style="background-color:#FFFFFF;overflow: auto;">
            <span style="color: #0000FF;">Shared</span>
            <span style="color: #000000;"> customerRow </span>
            <span style="color: #0000FF;">As</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #0000FF;">New</span>
            <span style="color: #000000;"> HtmlTemplate(</span>
            <span style="color: #0000FF;">Of</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #0000FF;">String</span>
            <span style="color: #000000;">, </span>
            <span style="color: #0000FF;">String</span>
            <span style="color: #000000;">)(</span>
            <span style="color: #800000;">"</span>
            <span style="color: #800000;">customerRow</span>
            <span style="color: #800000;">"</span>
            <span style="color: #000000;">, </span>
            <span style="color: #0000FF;">Function</span>
            <span style="color: #000000;">(first,
last) _ </span>
            <span style="color: #000000;">&lt;</span>
            <span style="color: #000000;">tr</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">&lt;</span>
            <span style="color: #000000;">td</span>
            <span style="color: #000000;">&gt;&lt;</span>
            <span style="color: #000000;">%</span>
            <span style="color: #000000;">=</span>
            <span style="color: #000000;"> first
%</span>
            <span style="color: #000000;">&gt;&lt;/</span>
            <span style="color: #000000;">td</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">&lt;</span>
            <span style="color: #000000;">td</span>
            <span style="color: #000000;">&gt;&lt;</span>
            <span style="color: #000000;">%</span>
            <span style="color: #000000;">=</span>
            <span style="color: #000000;"> last
%</span>
            <span style="color: #000000;">&gt;&lt;/</span>
            <span style="color: #000000;">td</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">&lt;/</span>
            <span style="color: #000000;">tr</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">)</span>
          </pre>
          <!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com -->
        </div>
        <p>
Let’s break this down. We are creating an HTML template that takes two string arguments
and returns an XElement. We have named it “customerRow” and given a lambda expression
that returns the HTML. That second argument is an Expression(of Func(of String, String,
XElement)). So the HtmlTemplate is able to parse the expression tree and generate
an equivalent javascript function.
</p>
        <p>
Within my page (server-side) I can use the template like a function (by using an indexer
property).
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:99710bf3-98c7-44ac-af52-bb4dd1552674" class="wlWriterEditableSmartContent">
          <pre style="background-color:#FFFFFF;overflow: auto;">
            <span style="color: #0000FF;">Protected</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #0000FF;">Overrides</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #0000FF;">Function</span>
            <span style="color: #000000;"> Contents() </span>
            <span style="color: #0000FF;">As</span>
            <span style="color: #000000;"> XElement </span>
            <span style="color: #0000FF;">Return</span>
            <span style="color: #000000;"> _ </span>
            <span style="color: #000000;">&lt;</span>
            <span style="color: #000000;">_</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">&lt;</span>
            <span style="color: #000000;">table
id</span>
            <span style="color: #000000;">=</span>
            <span style="color: #800000;">"</span>
            <span style="color: #800000;">customers</span>
            <span style="color: #800000;">"</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">&lt;</span>
            <span style="color: #000000;">tr</span>
            <span style="color: #000000;">&gt;&lt;</span>
            <span style="color: #000000;">th</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">First
name</span>
            <span style="color: #000000;">&lt;/</span>
            <span style="color: #000000;">th</span>
            <span style="color: #000000;">&gt;&lt;</span>
            <span style="color: #000000;">th</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">Last
name</span>
            <span style="color: #000000;">&lt;/</span>
            <span style="color: #000000;">th</span>
            <span style="color: #000000;">&gt;&lt;/</span>
            <span style="color: #000000;">tr</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">&lt;</span>
            <span style="color: #000000;">%</span>
            <span style="color: #000000;">=</span>
            <span style="color: #000000;"> customerRow(</span>
            <span style="color: #800000;">"</span>
            <span style="color: #800000;">Andrew</span>
            <span style="color: #800000;">"</span>
            <span style="color: #000000;">, </span>
            <span style="color: #800000;">"</span>
            <span style="color: #800000;">Davey</span>
            <span style="color: #800000;">"</span>
            <span style="color: #000000;">)
%</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">&lt;</span>
            <span style="color: #000000;">%</span>
            <span style="color: #000000;">=</span>
            <span style="color: #000000;"> customerRow(</span>
            <span style="color: #800000;">"</span>
            <span style="color: #800000;">John</span>
            <span style="color: #800000;">"</span>
            <span style="color: #000000;">, </span>
            <span style="color: #800000;">"</span>
            <span style="color: #800000;">Smith</span>
            <span style="color: #800000;">"</span>
            <span style="color: #000000;">)
%</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">&lt;/</span>
            <span style="color: #000000;">table</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">&lt;</span>
            <span style="color: #000000;">div</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">&lt;</span>
            <span style="color: #000000;">button
id</span>
            <span style="color: #000000;">=</span>
            <span style="color: #800000;">"</span>
            <span style="color: #800000;">add</span>
            <span style="color: #800000;">"</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">Add
Row</span>
            <span style="color: #000000;">&lt;/</span>
            <span style="color: #000000;">button</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">&lt;/</span>
            <span style="color: #000000;">div</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">&lt;</span>
            <span style="color: #000000;">script
type</span>
            <span style="color: #000000;">=</span>
            <span style="color: #800000;">"</span>
            <span style="color: #800000;">text/javascript</span>
            <span style="color: #800000;">"</span>
            <span style="color: #000000;"> src</span>
            <span style="color: #000000;">=</span>
            <span style="color: #800000;">"</span>
            <span style="color: #800000;">http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js</span>
            <span style="color: #800000;">"</span>
            <span style="color: #000000;">&gt;&lt;/</span>
            <span style="color: #000000;">script</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">&lt;</span>
            <span style="color: #000000;">%</span>
            <span style="color: #000000;">=</span>
            <span style="color: #000000;"> InlineJavascript(customerRow.Javascript)
%</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">&lt;</span>
            <span style="color: #000000;">script
type</span>
            <span style="color: #000000;">=</span>
            <span style="color: #800000;">"</span>
            <span style="color: #800000;">text/javascript</span>
            <span style="color: #800000;">"</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;"> $(</span>
            <span style="color: #0000FF;">function</span>
            <span style="color: #000000;">()
{ $(</span>
            <span style="color: #008000;">'</span>
            <span style="color: #008000;">#add').click(</span>
            <span style="color: #008000;">
            </span>
            <span style="color: #000000;">
            </span>
            <span style="color: #0000FF;">function</span>
            <span style="color: #000000;"> addRow()
{ $(</span>
            <span style="color: #008000;">'</span>
            <span style="color: #008000;">#customers').append(customerRow('John','Smith'));</span>
            <span style="color: #008000;">
            </span>
            <span style="color: #000000;"> }
); }); </span>
            <span style="color: #000000;">&lt;/</span>
            <span style="color: #000000;">script</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">&lt;</span>
            <span style="color: #000000;">_</span>
            <span style="color: #000000;">&gt;</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #0000FF;">End
Sub</span>
          </pre>
          <!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com -->
        </div>
        <p>
The above code also includes the javascript for the page. Notice the customerRow.Javascript
property. This returns the javascript function as a string. InlineJavascript is a
helper that wraps up the javascript into a CDATA making the angle brackets safe. The
javascript function looks like this:
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:1614a948-ce4c-4a0d-8223-e76f18ee4bca" class="wlWriterEditableSmartContent">
          <pre style="background-color:#FFFFFF;overflow: auto;">
            <span style="color: #0000FF;">function</span>
            <span style="color: #000000;"> customerRow(first,last)
{ </span>
            <span style="color: #0000FF;">return</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">'</span>
            <span style="color: #000000;">&lt;tr&gt;&lt;td&gt;</span>
            <span style="color: #000000;">'</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">+</span>
            <span style="color: #000000;"> last </span>
            <span style="color: #000000;">+</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">'</span>
            <span style="color: #000000;">&lt;/td&gt;&lt;td&gt;</span>
            <span style="color: #000000;">'</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">+</span>
            <span style="color: #000000;"> first </span>
            <span style="color: #000000;">+</span>
            <span style="color: #000000;">
            </span>
            <span style="color: #000000;">'</span>
            <span style="color: #000000;">&lt;/td&gt;&lt;/tr&gt;</span>
            <span style="color: #000000;">'</span>
            <span style="color: #000000;">;
}</span>
          </pre>
          <!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com -->
        </div>
        <p>
The name of the function is what we gave to the HtmlTemplate constructor. Concat-ing
strings may not be the best way, but it works for this prototype.
</p>
        <p>
I hope you can see the value here. The template function is written only once. DRY
win :)
</p>
        <img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=fe7d96cd-d308-491d-bccf-b58a1b87abc7" />
      </body>
      <title>Generating Javascript Template Functions from Expression Trees</title>
      <guid isPermaLink="false">http://www.aboutcode.net/PermaLink,guid,fe7d96cd-d308-491d-bccf-b58a1b87abc7.aspx</guid>
      <link>http://www.aboutcode.net/2009/10/15/GeneratingJavascriptTemplateFunctionsFromExpressionTrees.aspx</link>
      <pubDate>Thu, 15 Oct 2009 11:39:59 GMT</pubDate>
      <description>&lt;p&gt;
When creating web applications I like to extract common pieces of mark-up into helper
functions. I use &lt;a title="Hasic - View engine for asp.net mvc" href="http://www.assembla.com/wiki/show/hasic" target="_blank"&gt;Hasic&lt;/a&gt; which
means helper functions are just simple VB functions that return XElement objects.
&lt;/p&gt;
&lt;p&gt;
However, dynamic web pages often use javascript to add elements at runtime. Consider
a page with a table of data which has an form to add rows. We want to add rows without
reloading the whole page. So we use AJAX to post the new data, then, in javascript,
create the new table row and append to the table.
&lt;/p&gt;
&lt;p&gt;
So we have a repetition of the same HTML template; server-side and client-side.
&lt;/p&gt;
&lt;p&gt;
Using Hasic we can eliminate this repetition. The following class field defines an
HTML template:
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:876b5e3b-2583-4f70-8ada-8625ddfed5d3" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;Shared&lt;/span&gt;&lt;span style="color: #000000;"&gt; customerRow &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;As&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;New&lt;/span&gt;&lt;span style="color: #000000;"&gt; HtmlTemplate(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Of&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;String&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;String&lt;/span&gt;&lt;span style="color: #000000;"&gt;)(&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;customerRow&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Function&lt;/span&gt;&lt;span style="color: #000000;"&gt;(first,
last) _ &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;tr&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;td&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;%&lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; first
%&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt;td&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;td&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;%&lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; last
%&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt;td&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt;tr&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;
&lt;/div&gt;
&lt;p&gt;
Let’s break this down. We are creating an HTML template that takes two string arguments
and returns an XElement. We have named it “customerRow” and given a lambda expression
that returns the HTML. That second argument is an Expression(of Func(of String, String,
XElement)). So the HtmlTemplate is able to parse the expression tree and generate
an equivalent javascript function.
&lt;/p&gt;
&lt;p&gt;
Within my page (server-side) I can use the template like a function (by using an indexer
property).
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:99710bf3-98c7-44ac-af52-bb4dd1552674" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;Protected&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Overrides&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Function&lt;/span&gt;&lt;span style="color: #000000;"&gt; Contents() &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;As&lt;/span&gt;&lt;span style="color: #000000;"&gt; XElement &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Return&lt;/span&gt;&lt;span style="color: #000000;"&gt; _ &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;_&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;table
id&lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;customers&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;tr&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;th&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;First
name&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt;th&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;th&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Last
name&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt;th&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt;tr&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;%&lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; customerRow(&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;Andrew&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;Davey&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;)
%&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;%&lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; customerRow(&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;John&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;Smith&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;)
%&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt;table&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;div&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;button
id&lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;add&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Add
Row&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt;button&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt;div&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;script
type&lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;text/javascript&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt; src&lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt;script&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;%&lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; InlineJavascript(customerRow.Javascript)
%&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;script
type&lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;text/javascript&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; $(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="color: #000000;"&gt;()
{ $(&lt;/span&gt;&lt;span style="color: #008000;"&gt;'&lt;/span&gt;&lt;span style="color: #008000;"&gt;#add').click(&lt;/span&gt;&lt;span style="color: #008000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="color: #000000;"&gt; addRow()
{ $(&lt;/span&gt;&lt;span style="color: #008000;"&gt;'&lt;/span&gt;&lt;span style="color: #008000;"&gt;#customers').append(customerRow('John','Smith'));&lt;/span&gt;&lt;span style="color: #008000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt; }
); }); &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt;script&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;_&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;End
Sub&lt;/span&gt;&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;
&lt;/div&gt;
&lt;p&gt;
The above code also includes the javascript for the page. Notice the customerRow.Javascript
property. This returns the javascript function as a string. InlineJavascript is a
helper that wraps up the javascript into a CDATA making the angle brackets safe. The
javascript function looks like this:
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:1614a948-ce4c-4a0d-8223-e76f18ee4bca" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="color: #000000;"&gt; customerRow(first,last)
{ &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;+&lt;/span&gt;&lt;span style="color: #000000;"&gt; last &lt;/span&gt;&lt;span style="color: #000000;"&gt;+&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;+&lt;/span&gt;&lt;span style="color: #000000;"&gt; first &lt;/span&gt;&lt;span style="color: #000000;"&gt;+&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;;
}&lt;/span&gt;&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;
&lt;/div&gt;
&lt;p&gt;
The name of the function is what we gave to the HtmlTemplate constructor. Concat-ing
strings may not be the best way, but it works for this prototype.
&lt;/p&gt;
&lt;p&gt;
I hope you can see the value here. The template function is written only once. DRY
win :)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=fe7d96cd-d308-491d-bccf-b58a1b87abc7" /&gt;</description>
      <comments>http://www.aboutcode.net/CommentView,guid,fe7d96cd-d308-491d-bccf-b58a1b87abc7.aspx</comments>
      <category>hasic</category>
      <category>html</category>
      <category>javascript</category>
      <category>vb.net</category>
      <category>web</category>
    </item>
    <item>
      <trackback:ping>http://www.aboutcode.net/Trackback.aspx?guid=7b4b0ced-9377-4f42-8366-9470a28955e2</trackback:ping>
      <pingback:server>http://www.aboutcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.aboutcode.net/PermaLink,guid,7b4b0ced-9377-4f42-8366-9470a28955e2.aspx</pingback:target>
      <dc:creator>Andrew Davey</dc:creator>
      <wfw:comment>http://www.aboutcode.net/CommentView,guid,7b4b0ced-9377-4f42-8366-9470a28955e2.aspx</wfw:comment>
      <wfw:commentRss>http://www.aboutcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=7b4b0ced-9377-4f42-8366-9470a28955e2</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Say hello to <strong>ProntoCMS</strong> a new open-source web content management system.
</p>
        <p>
The project is hosted here: <a title="http://code.google.com/p/prontocms/" href="http://code.google.com/p/prontocms/">http://code.google.com/p/prontocms/</a></p>
        <p>
Pronto is built on <a href="http://www.asp.net/mvc">ASP.NET MVC</a> and uses <a href="http://jquery.com/">JQuery</a> and
FCKeditor. It is very light-weight and ideal for small websites.
</p>
        <p>
The code in subversion contains a couple of (very minimal) sample projects. Hopefully
I will get around to writing some documentation soon.
</p>
        <p>
Please take a look at the code and let me know what you think.
</p>
        <img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=7b4b0ced-9377-4f42-8366-9470a28955e2" />
      </body>
      <title>Announcing ProntoCMS</title>
      <guid isPermaLink="false">http://www.aboutcode.net/PermaLink,guid,7b4b0ced-9377-4f42-8366-9470a28955e2.aspx</guid>
      <link>http://www.aboutcode.net/2009/10/11/AnnouncingProntoCMS.aspx</link>
      <pubDate>Sun, 11 Oct 2009 12:47:03 GMT</pubDate>
      <description>&lt;p&gt;
Say hello to &lt;strong&gt;ProntoCMS&lt;/strong&gt; a new open-source web content management system.
&lt;/p&gt;
&lt;p&gt;
The project is hosted here: &lt;a title="http://code.google.com/p/prontocms/" href="http://code.google.com/p/prontocms/"&gt;http://code.google.com/p/prontocms/&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Pronto is built on &lt;a href="http://www.asp.net/mvc"&gt;ASP.NET MVC&lt;/a&gt; and uses &lt;a href="http://jquery.com/"&gt;JQuery&lt;/a&gt; and
FCKeditor. It is very light-weight and ideal for small websites.
&lt;/p&gt;
&lt;p&gt;
The code in subversion contains a couple of (very minimal) sample projects. Hopefully
I will get around to writing some documentation soon.
&lt;/p&gt;
&lt;p&gt;
Please take a look at the code and let me know what you think.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=7b4b0ced-9377-4f42-8366-9470a28955e2" /&gt;</description>
      <comments>http://www.aboutcode.net/CommentView,guid,7b4b0ced-9377-4f42-8366-9470a28955e2.aspx</comments>
      <category>.net</category>
      <category>cms</category>
      <category>prontocms</category>
      <category>web</category>
    </item>
    <item>
      <trackback:ping>http://www.aboutcode.net/Trackback.aspx?guid=cceb7b0e-34ad-4d6c-8435-5d7f51fa8771</trackback:ping>
      <pingback:server>http://www.aboutcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.aboutcode.net/PermaLink,guid,cceb7b0e-34ad-4d6c-8435-5d7f51fa8771.aspx</pingback:target>
      <dc:creator>Andrew Davey</dc:creator>
      <wfw:comment>http://www.aboutcode.net/CommentView,guid,cceb7b0e-34ad-4d6c-8435-5d7f51fa8771.aspx</wfw:comment>
      <wfw:commentRss>http://www.aboutcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=cceb7b0e-34ad-4d6c-8435-5d7f51fa8771</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Thanks to everyone who left encouraging comments on my <a href="http://www.aboutcode.net/2009/10/08/ShouldIOpenSourceMyNewCMS.aspx">previous
post about a new CMS</a> I’ve created.
</p>
        <p>
I have decided that I will be open sourcing the project. However I now need a snappy
name for it. Naming is so hard for some reason!
</p>
        <p>
Any ideas are greatly appreciated. The CMS is light-weight, very simple, runs on asp.net
mvc and has plenty of ajax goodness.
</p>
        <img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=cceb7b0e-34ad-4d6c-8435-5d7f51fa8771" />
      </body>
      <title>Name needed for new open source CMS</title>
      <guid isPermaLink="false">http://www.aboutcode.net/PermaLink,guid,cceb7b0e-34ad-4d6c-8435-5d7f51fa8771.aspx</guid>
      <link>http://www.aboutcode.net/2009/10/10/NameNeededForNewOpenSourceCMS.aspx</link>
      <pubDate>Sat, 10 Oct 2009 17:24:40 GMT</pubDate>
      <description>&lt;p&gt;
Thanks to everyone who left encouraging comments on my &lt;a href="http://www.aboutcode.net/2009/10/08/ShouldIOpenSourceMyNewCMS.aspx"&gt;previous
post about a new CMS&lt;/a&gt; I’ve created.
&lt;/p&gt;
&lt;p&gt;
I have decided that I will be open sourcing the project. However I now need a snappy
name for it. Naming is so hard for some reason!
&lt;/p&gt;
&lt;p&gt;
Any ideas are greatly appreciated. The CMS is light-weight, very simple, runs on asp.net
mvc and has plenty of ajax goodness.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=cceb7b0e-34ad-4d6c-8435-5d7f51fa8771" /&gt;</description>
      <comments>http://www.aboutcode.net/CommentView,guid,cceb7b0e-34ad-4d6c-8435-5d7f51fa8771.aspx</comments>
      <category>.net</category>
      <category>cms</category>
      <category>mvc</category>
      <category>oss</category>
      <category>web</category>
    </item>
    <item>
      <trackback:ping>http://www.aboutcode.net/Trackback.aspx?guid=0f434d07-fe80-487b-b7c0-9fdb27dac4a8</trackback:ping>
      <pingback:server>http://www.aboutcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.aboutcode.net/PermaLink,guid,0f434d07-fe80-487b-b7c0-9fdb27dac4a8.aspx</pingback:target>
      <dc:creator>Andrew Davey</dc:creator>
      <wfw:comment>http://www.aboutcode.net/CommentView,guid,0f434d07-fe80-487b-b7c0-9fdb27dac4a8.aspx</wfw:comment>
      <wfw:commentRss>http://www.aboutcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=0f434d07-fe80-487b-b7c0-9fdb27dac4a8</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Over the course of a couple of website developments I created a simple content management
system. I know there are loads our there already, but I wanted something simple and
easy for non-techie users. It runs on ASP.NET MVC, has an elegant extensibility model
and produces clean HTML 5. I very happy with it and plan to use it on all upcoming
simple websites.
</p>
        <p>
The system is file based, so no SQL database is needed. This makes it ideal for running
in shared hosting. It’s perfect for the ~10 page website. But there’s no reason it
can’t scale up to larger sites too.
</p>
        <p>
So I’m obviously enamoured with my own work :) but is it worth sharing? I would love
to get the code out there for people to poke at. However, is it really worth my time
doing so – setting up a project, documentation etc? My recent open sourced work seems
to have taken off like a lead balloon (Snooze, <a href="http://www.assembla.com/wiki/show/hasic">Hasic</a>,
etc)! Do you want to see my new CMS? Or shall I just keep it to myself?
</p>
        <img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=0f434d07-fe80-487b-b7c0-9fdb27dac4a8" />
      </body>
      <title>Should I open source my new CMS?</title>
      <guid isPermaLink="false">http://www.aboutcode.net/PermaLink,guid,0f434d07-fe80-487b-b7c0-9fdb27dac4a8.aspx</guid>
      <link>http://www.aboutcode.net/2009/10/08/ShouldIOpenSourceMyNewCMS.aspx</link>
      <pubDate>Thu, 08 Oct 2009 14:55:37 GMT</pubDate>
      <description>&lt;p&gt;
Over the course of a couple of website developments I created a simple content management
system. I know there are loads our there already, but I wanted something simple and
easy for non-techie users. It runs on ASP.NET MVC, has an elegant extensibility model
and produces clean HTML 5. I very happy with it and plan to use it on all upcoming
simple websites.
&lt;/p&gt;
&lt;p&gt;
The system is file based, so no SQL database is needed. This makes it ideal for running
in shared hosting. It’s perfect for the ~10 page website. But there’s no reason it
can’t scale up to larger sites too.
&lt;/p&gt;
&lt;p&gt;
So I’m obviously enamoured with my own work :) but is it worth sharing? I would love
to get the code out there for people to poke at. However, is it really worth my time
doing so – setting up a project, documentation etc? My recent open sourced work seems
to have taken off like a lead balloon (Snooze, &lt;a href="http://www.assembla.com/wiki/show/hasic"&gt;Hasic&lt;/a&gt;,
etc)! Do you want to see my new CMS? Or shall I just keep it to myself?
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=0f434d07-fe80-487b-b7c0-9fdb27dac4a8" /&gt;</description>
      <comments>http://www.aboutcode.net/CommentView,guid,0f434d07-fe80-487b-b7c0-9fdb27dac4a8.aspx</comments>
      <category>.net</category>
      <category>c#</category>
      <category>cms</category>
      <category>mvc</category>
      <category>web</category>
    </item>
    <item>
      <trackback:ping>http://www.aboutcode.net/Trackback.aspx?guid=0c0b2ce4-42b7-4b0a-a347-7a3c52bd96cf</trackback:ping>
      <pingback:server>http://www.aboutcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.aboutcode.net/PermaLink,guid,0c0b2ce4-42b7-4b0a-a347-7a3c52bd96cf.aspx</pingback:target>
      <dc:creator>Andrew Davey</dc:creator>
      <wfw:comment>http://www.aboutcode.net/CommentView,guid,0c0b2ce4-42b7-4b0a-a347-7a3c52bd96cf.aspx</wfw:comment>
      <wfw:commentRss>http://www.aboutcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=0c0b2ce4-42b7-4b0a-a347-7a3c52bd96cf</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="Hasic - A kick-ass view engine for asp.net mvc" href="http://www.assembla.com/wiki/show/hasic">Hasic</a> is
a kick-ass view engine for <a href="http://www.asp.net/mvc">ASP.NET MVC</a>, with
a completely different approach. It uses VB.NET's XML literals instead of nasty strings
like most other view engines.
</p>
        <p>
That's right, VB! If you are already closing your web browser upon reading that then
shame on you. I'm not saying your whole app is in VB, just the views.
</p>
        <p>
Using VB means this stuff comes for free:
</p>
        <ul>
          <li>
Syntax colouring 
</li>
          <li>
Full intellisense in Visual Studio 
</li>
          <li>
Compiled views 
</li>
          <li>
Extensibility using regular CLR classes, functions etc</li>
        </ul>
        <p>
I’m looking for feedback. So please try out Hasic and let me know what you think –
thanks!
</p>
        <img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=0c0b2ce4-42b7-4b0a-a347-7a3c52bd96cf" />
      </body>
      <title>Hasic – A kick-ass view engine for asp.net mvc</title>
      <guid isPermaLink="false">http://www.aboutcode.net/PermaLink,guid,0c0b2ce4-42b7-4b0a-a347-7a3c52bd96cf.aspx</guid>
      <link>http://www.aboutcode.net/2009/10/08/HasicAKickassViewEngineForAspnetMvc.aspx</link>
      <pubDate>Thu, 08 Oct 2009 14:30:43 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a title="Hasic - A kick-ass view engine for asp.net mvc" href="http://www.assembla.com/wiki/show/hasic"&gt;Hasic&lt;/a&gt; is
a kick-ass view engine for &lt;a href="http://www.asp.net/mvc"&gt;ASP.NET MVC&lt;/a&gt;, with
a completely different approach. It uses VB.NET's XML literals instead of nasty strings
like most other view engines.
&lt;/p&gt;
&lt;p&gt;
That's right, VB! If you are already closing your web browser upon reading that then
shame on you. I'm not saying your whole app is in VB, just the views.
&lt;/p&gt;
&lt;p&gt;
Using VB means this stuff comes for free:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Syntax colouring 
&lt;/li&gt;
&lt;li&gt;
Full intellisense in Visual Studio 
&lt;/li&gt;
&lt;li&gt;
Compiled views 
&lt;/li&gt;
&lt;li&gt;
Extensibility using regular CLR classes, functions etc&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
I’m looking for feedback. So please try out Hasic and let me know what you think –
thanks!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=0c0b2ce4-42b7-4b0a-a347-7a3c52bd96cf" /&gt;</description>
      <comments>http://www.aboutcode.net/CommentView,guid,0c0b2ce4-42b7-4b0a-a347-7a3c52bd96cf.aspx</comments>
      <category>.net</category>
      <category>mvc</category>
      <category>vb.net</category>
      <category>web</category>
    </item>
    <item>
      <trackback:ping>http://www.aboutcode.net/Trackback.aspx?guid=cc157a45-2519-48a5-a9c3-6db41d864af9</trackback:ping>
      <pingback:server>http://www.aboutcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.aboutcode.net/PermaLink,guid,cc157a45-2519-48a5-a9c3-6db41d864af9.aspx</pingback:target>
      <dc:creator>Andrew Davey</dc:creator>
      <wfw:comment>http://www.aboutcode.net/CommentView,guid,cc157a45-2519-48a5-a9c3-6db41d864af9.aspx</wfw:comment>
      <wfw:commentRss>http://www.aboutcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=cc157a45-2519-48a5-a9c3-6db41d864af9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Another approach I'm investigating for HTML form generation is using VB's XML literals.
</p>
        <p>
Check out this screencast for a demo: <a title="WSoDB4B9M2" href="http://screencast.com/t/WSoDB4B9M2">http://screencast.com/t/WSoDB4B9M2</a></p>
        <p>
 
</p>
        <p>
XML literals + Expression Trees gives us some serious power!
</p>
        <img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=cc157a45-2519-48a5-a9c3-6db41d864af9" />
      </body>
      <title>HTML Forms using VB XML Literals</title>
      <guid isPermaLink="false">http://www.aboutcode.net/PermaLink,guid,cc157a45-2519-48a5-a9c3-6db41d864af9.aspx</guid>
      <link>http://www.aboutcode.net/2009/03/13/HTMLFormsUsingVBXMLLiterals.aspx</link>
      <pubDate>Fri, 13 Mar 2009 18:44:33 GMT</pubDate>
      <description>&lt;p&gt;
Another approach I'm investigating for HTML form generation is using VB's XML literals.
&lt;/p&gt;
&lt;p&gt;
Check out this screencast for a demo: &lt;a title="WSoDB4B9M2" href="http://screencast.com/t/WSoDB4B9M2"&gt;http://screencast.com/t/WSoDB4B9M2&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
XML literals + Expression Trees gives us some serious power!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=cc157a45-2519-48a5-a9c3-6db41d864af9" /&gt;</description>
      <comments>http://www.aboutcode.net/CommentView,guid,cc157a45-2519-48a5-a9c3-6db41d864af9.aspx</comments>
      <category>.net</category>
      <category>html</category>
      <category>screencast</category>
      <category>vb.net</category>
      <category>web</category>
      <category>xml</category>
    </item>
    <item>
      <trackback:ping>http://www.aboutcode.net/Trackback.aspx?guid=f40c1ace-f631-46f2-aaea-fc9efa16a44b</trackback:ping>
      <pingback:server>http://www.aboutcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.aboutcode.net/PermaLink,guid,f40c1ace-f631-46f2-aaea-fc9efa16a44b.aspx</pingback:target>
      <dc:creator>Andrew Davey</dc:creator>
      <wfw:comment>http://www.aboutcode.net/CommentView,guid,f40c1ace-f631-46f2-aaea-fc9efa16a44b.aspx</wfw:comment>
      <wfw:commentRss>http://www.aboutcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=f40c1ace-f631-46f2-aaea-fc9efa16a44b</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
HTML forms seem to be general enough to warrant a better abstraction than manually
creating the HTML, or even using simple HTML helpers. Ideally the semantics of the
form should be enough to generate all the HTML content.
</p>
        <p>
I have been prototyping some ideas in this area. Here is some code that demonstrates
a simple (but incomplete) login form.
</p>
        <style type="text/css">
.cf { font-family: courier new; font-size: 10pt; color: black; background: white; }
.cl { margin: 0px; }
.cb1 { color: blue; }
.cb2 { color: #2b91af; }
.cb3 { color: #a31515; }
</style>
        <div class="cf">
          <pre class="cl">
            <span class="cb1">class</span>
            <span class="cb2">LoginData</span>
          </pre>
          <pre class="cl">{</pre>
          <pre class="cl">    <span class="cb1">public</span><span class="cb1">string</span> Username
{ <span class="cb1">get</span>; <span class="cb1">set</span>; }</pre>
          <pre class="cl">    <span class="cb1">public</span><span class="cb1">string</span> Password
{ <span class="cb1">get</span>; <span class="cb1">set</span>; }</pre>
          <pre class="cl">    <span class="cb1">public</span><span class="cb1">bool</span> Persist
{ <span class="cb1">get</span>; <span class="cb1">set</span>; }</pre>
          <pre class="cl">}</pre>
          <pre class="cl"> </pre>
          <pre class="cl"> </pre>
          <pre class="cl">
            <span class="cb1">class</span>
            <span class="cb2">LoginForm</span> : <span class="cb2">Form</span>&lt;<span class="cb2">LoginData</span>&gt;</pre>
          <pre class="cl">{</pre>
          <pre class="cl">    <span class="cb1">public</span> LoginForm()</pre>
          <pre class="cl">    {</pre>
          <pre class="cl">        FieldContainer = <span class="cb1">new</span><span class="cb2">DivFieldContainer</span>();</pre>
          <pre class="cl"> </pre>
          <pre class="cl">        Add(d =&gt; d.Username);</pre>
          <pre class="cl">        Add(d =&gt; d.Password).AsPassword();</pre>
          <pre class="cl">        Add(d =&gt; d.Persist).WithLabel(<span class="cb3">"Stay
logged in on this computer"</span>);</pre>
          <pre class="cl">    }</pre>
          <pre class="cl">}</pre>
          <pre class="cl"> </pre>
          <pre class="cl">
            <span class="cb1">class</span>
            <span class="cb2">Program</span>
          </pre>
          <pre class="cl">{</pre>
          <pre class="cl">    <span class="cb1">static</span><span class="cb1">void</span> Main(<span class="cb1">string</span>[]
args)</pre>
          <pre class="cl">    {</pre>
          <pre class="cl">        <span class="cb1">var</span> data
= <span class="cb1">new</span><span class="cb2">LoginData</span>() { Username = <span class="cb3">"test"</span> };</pre>
          <pre class="cl">        <span class="cb1">var</span> form
= <span class="cb1">new</span><span class="cb2">LoginForm</span>();</pre>
          <pre class="cl"> </pre>
          <pre class="cl">        <span class="cb1">var</span> html
= form.Create(data);</pre>
          <pre class="cl">        <span class="cb2">Console</span>.WriteLine(html.ToString());</pre>
          <pre class="cl">    }</pre>
          <pre class="cl">}</pre>
        </div>
        <p>
This generates the following HTML. 
</p>
        <pre>&lt;form method="POST" action="http://localhost/"&gt;<br />
  &lt;div&gt;<br />
    &lt;label for="Username"&gt;Username&lt;/label&gt;<br />
    &lt;input id="Username" type="text" name="Username" value="test"
/&gt;<br />
  &lt;/div&gt;<br />
  &lt;div&gt;<br />
    &lt;label for="Password"&gt;Password&lt;/label&gt;<br />
    &lt;input id="Password" type="password" name="Password" /&gt;<br />
  &lt;/div&gt;<br />
  &lt;div&gt;<br />
    &lt;input id="Persist" type="checkbox" name="Persist" /&gt;<br />
    &lt;label for="Persist"&gt;Stay logged in on this computer&lt;/label&gt;<br />
  &lt;/div&gt;<br />
&lt;/form&gt;</pre>
        <p>
There is a clear separation of the data from the form meta-data. This lets me do interesting
things like applying conventions, for example, the generation of label text from property
names. I want to use mostly global conventions for a form, and then override a few
specific fields where needed. 
</p>
        <p>
I think validation can also fit nicely into this approach. Validation logic can be
put on the data model. The form model can then specify how errors are added to the
HTML.
</p>
        <p>
Has anyone else seen anything like this before? I don’t want the reinvent the wheel.
Or at least I can steal some good ideas ;)
</p>
        <img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=f40c1ace-f631-46f2-aaea-fc9efa16a44b" />
      </body>
      <title>Automatic HTML Forms</title>
      <guid isPermaLink="false">http://www.aboutcode.net/PermaLink,guid,f40c1ace-f631-46f2-aaea-fc9efa16a44b.aspx</guid>
      <link>http://www.aboutcode.net/2009/03/13/AutomaticHTMLForms.aspx</link>
      <pubDate>Fri, 13 Mar 2009 11:51:16 GMT</pubDate>
      <description>&lt;p&gt;
HTML forms seem to be general enough to warrant a better abstraction than manually
creating the HTML, or even using simple HTML helpers. Ideally the semantics of the
form should be enough to generate all the HTML content.
&lt;/p&gt;
&lt;p&gt;
I have been prototyping some ideas in this area. Here is some code that demonstrates
a simple (but incomplete) login form.
&lt;/p&gt;
&lt;style type="text/css"&gt;
.cf { font-family: courier new; font-size: 10pt; color: black; background: white; }
.cl { margin: 0px; }
.cb1 { color: blue; }
.cb2 { color: #2b91af; }
.cb3 { color: #a31515; }
&lt;/style&gt;
&lt;div class="cf"&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;class&lt;/span&gt; &lt;span class="cb2"&gt;LoginData&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;{&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;public&lt;/span&gt; &lt;span class="cb1"&gt;string&lt;/span&gt; Username
{ &lt;span class="cb1"&gt;get&lt;/span&gt;; &lt;span class="cb1"&gt;set&lt;/span&gt;; }&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;public&lt;/span&gt; &lt;span class="cb1"&gt;string&lt;/span&gt; Password
{ &lt;span class="cb1"&gt;get&lt;/span&gt;; &lt;span class="cb1"&gt;set&lt;/span&gt;; }&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;public&lt;/span&gt; &lt;span class="cb1"&gt;bool&lt;/span&gt; Persist
{ &lt;span class="cb1"&gt;get&lt;/span&gt;; &lt;span class="cb1"&gt;set&lt;/span&gt;; }&lt;/pre&gt;&lt;pre class="cl"&gt;}&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;class&lt;/span&gt; &lt;span class="cb2"&gt;LoginForm&lt;/span&gt; : &lt;span class="cb2"&gt;Form&lt;/span&gt;&amp;lt;&lt;span class="cb2"&gt;LoginData&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;pre class="cl"&gt;{&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;public&lt;/span&gt; LoginForm()&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FieldContainer = &lt;span class="cb1"&gt;new&lt;/span&gt; &lt;span class="cb2"&gt;DivFieldContainer&lt;/span&gt;();&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add(d =&amp;gt; d.Username);&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add(d =&amp;gt; d.Password).AsPassword();&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add(d =&amp;gt; d.Persist).WithLabel(&lt;span class="cb3"&gt;"Stay
logged in on this computer"&lt;/span&gt;);&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre class="cl"&gt;}&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="cl"&gt;&lt;span class="cb1"&gt;class&lt;/span&gt; &lt;span class="cb2"&gt;Program&lt;/span&gt;&lt;/pre&gt;&lt;pre class="cl"&gt;{&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;static&lt;/span&gt; &lt;span class="cb1"&gt;void&lt;/span&gt; Main(&lt;span class="cb1"&gt;string&lt;/span&gt;[]
args)&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;var&lt;/span&gt; data
= &lt;span class="cb1"&gt;new&lt;/span&gt; &lt;span class="cb2"&gt;LoginData&lt;/span&gt;() { Username = &lt;span class="cb3"&gt;"test"&lt;/span&gt; };&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;var&lt;/span&gt; form
= &lt;span class="cb1"&gt;new&lt;/span&gt; &lt;span class="cb2"&gt;LoginForm&lt;/span&gt;();&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;var&lt;/span&gt; html
= form.Create(data);&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;Console&lt;/span&gt;.WriteLine(html.ToString());&lt;/pre&gt;&lt;pre class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre class="cl"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
This generates the following HTML. &lt;pre&gt;&amp;lt;form method="POST" action="http://localhost/"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;div&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;label for="Username"&amp;gt;Username&amp;lt;/label&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input id="Username" type="text" name="Username" value="test"
/&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;div&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;label for="Password"&amp;gt;Password&amp;lt;/label&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input id="Password" type="password" name="Password" /&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;div&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input id="Persist" type="checkbox" name="Persist" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;label for="Persist"&amp;gt;Stay logged in on this computer&amp;lt;/label&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;p&gt;
There is a clear separation of the data from the form meta-data. This lets me do interesting
things like applying conventions, for example, the generation of label text from property
names. I want to use mostly global conventions for a form, and then override a few
specific fields where needed. 
&lt;p&gt;
I think validation can also fit nicely into this approach. Validation logic can be
put on the data model. The form model can then specify how errors are added to the
HTML.
&lt;/p&gt;
&lt;p&gt;
Has anyone else seen anything like this before? I don’t want the reinvent the wheel.
Or at least I can steal some good ideas ;)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=f40c1ace-f631-46f2-aaea-fc9efa16a44b" /&gt;</description>
      <comments>http://www.aboutcode.net/CommentView,guid,f40c1ace-f631-46f2-aaea-fc9efa16a44b.aspx</comments>
      <category>.net</category>
      <category>c#</category>
      <category>html</category>
      <category>web</category>
    </item>
    <item>
      <trackback:ping>http://www.aboutcode.net/Trackback.aspx?guid=c9d9ee2e-555e-4b7f-8509-8bd8a9dcc5ad</trackback:ping>
      <pingback:server>http://www.aboutcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.aboutcode.net/PermaLink,guid,c9d9ee2e-555e-4b7f-8509-8bd8a9dcc5ad.aspx</pingback:target>
      <dc:creator>Andrew Davey</dc:creator>
      <wfw:comment>http://www.aboutcode.net/CommentView,guid,c9d9ee2e-555e-4b7f-8509-8bd8a9dcc5ad.aspx</wfw:comment>
      <wfw:commentRss>http://www.aboutcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=c9d9ee2e-555e-4b7f-8509-8bd8a9dcc5ad</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Don't call SmtpClient.SendMail directly within your controller actions because it
directly couples your controller to SmtpClient.
</p>
        <p>
Don't even create an interface IMailer and wrapping implementation of this to SmtpClient.
</p>
        <p>
Instead, create a new ActionResult subclass called EmailResult. Make this class have
the properties From, To, Subject and BodyData. In the ExecuteResult method use the
ViewEngine infrastructure to render a view of the BodyData into your own StringWriter.
You can then send the resulting content via email using SmtpClient.
</p>
        <img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=c9d9ee2e-555e-4b7f-8509-8bd8a9dcc5ad" />
      </body>
      <title>Email ActionResult in ASP.NET MVC</title>
      <guid isPermaLink="false">http://www.aboutcode.net/PermaLink,guid,c9d9ee2e-555e-4b7f-8509-8bd8a9dcc5ad.aspx</guid>
      <link>http://www.aboutcode.net/2009/01/19/EmailActionResultInASPNETMVC.aspx</link>
      <pubDate>Mon, 19 Jan 2009 16:39:44 GMT</pubDate>
      <description>&lt;p&gt;
Don't call SmtpClient.SendMail directly within your controller actions because it
directly couples your controller to SmtpClient.
&lt;/p&gt;
&lt;p&gt;
Don't even create an interface IMailer and wrapping implementation of this to SmtpClient.
&lt;/p&gt;
&lt;p&gt;
Instead, create a new ActionResult subclass called EmailResult. Make this class have
the properties From, To, Subject and BodyData. In the ExecuteResult method use the
ViewEngine infrastructure to render a view of the BodyData into your own StringWriter.
You can then send the resulting content via email using SmtpClient.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=c9d9ee2e-555e-4b7f-8509-8bd8a9dcc5ad" /&gt;</description>
      <comments>http://www.aboutcode.net/CommentView,guid,c9d9ee2e-555e-4b7f-8509-8bd8a9dcc5ad.aspx</comments>
      <category>.net</category>
      <category>asp</category>
      <category>mvc</category>
      <category>web</category>
    </item>
    <item>
      <trackback:ping>http://www.aboutcode.net/Trackback.aspx?guid=ccfe3888-bdd7-4f13-b704-53f6e5cf5020</trackback:ping>
      <pingback:server>http://www.aboutcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.aboutcode.net/PermaLink,guid,ccfe3888-bdd7-4f13-b704-53f6e5cf5020.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.aboutcode.net/CommentView,guid,ccfe3888-bdd7-4f13-b704-53f6e5cf5020.aspx</wfw:comment>
      <wfw:commentRss>http://www.aboutcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ccfe3888-bdd7-4f13-b704-53f6e5cf5020</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Avoid using HttpContext in controller actions to make testing much easier. Therefore
all inputs to an action needs to be passed as parameters. In my new REST framework
that builds on ASP.NET MVC I have created some useful model binders to make this easy.
</p>
        <p>
          <font face="Courier New">[ResourceUriTemplate("")]<br />
public class RootUri : ResourceUri<br />
{<br />
    public ResourceResponse Get([HttpCookie] string visited, [AppSetting]
int visitTimeout)<br />
    { 
<br />
    ...<br />
    }<br />
}</font>
        </p>
        <p>
The HttpCookieAttribute looks for a cookie called "visited". The AppSettingAttribute
looks in web.config for an appSetting with the key "visitTimeout". The method is now
easy to test and has very readable definition. :) 
</p>
        <p>
  
</p>
        <p>
Both attributes will cast the raw string found into the required type by using a TypeConverter. 
</p>
        <p>
The AppSettingAttribute constructor can also take a key name if you want something
different from the parameter name. 
</p>
        <p>
The code is in <a href="http://svn2.assembla.com/svn/snooze/branches/aspnet" target="_blank">SubVersion</a>,
but I'll repeat some here to show just how easy it was: 
</p>
        <p>
          <font face="Courier New">namespace Snooze<br />
{<br />
    public class AppSettingAttribute : CustomModelBinderAttribute<br />
    {<br />
        public AppSettingAttribute()<br />
        {<br />
        } </font>
        </p>
        <p>
          <font face="Courier New">        public AppSettingAttribute(string
key)<br />
        {<br />
            _key = key;<br />
        } </font>
        </p>
        <p>
          <font face="Courier New">        string _key; </font>
        </p>
        <p>
          <font face="Courier New">        public override
IModelBinder GetBinder()<br />
        {<br />
            return new AppSettingModelBinder(_key);<br />
        }<br />
    } </font>
        </p>
        <p>
          <font face="Courier New">    public class AppSettingModelBinder : IModelBinder<br />
    {<br />
        public AppSettingModelBinder(string key)<br />
        {<br />
            _key = key;<br />
        } </font>
        </p>
        <p>
          <font face="Courier New">        string _key; </font>
        </p>
        <p>
          <font face="Courier New">        public ModelBinderResult
BindModel(ModelBindingContext bindingContext)<br />
        {<br />
            string setting
= WebConfigurationManager.AppSettings[_key ?? bindingContext.ModelName];<br />
            object value;<br />
            if (bindingContext.ModelType
== typeof(string))<br />
            {<br />
               
value = setting;<br />
            }<br />
            else<br />
            {<br />
               
value = TypeDescriptor.GetConverter(bindingContext.ModelType).ConvertFromString(setting);<br />
            }<br />
            return new ModelBinderResult(value);<br />
        }<br />
    }<br />
}</font>
        </p>
        <img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=ccfe3888-bdd7-4f13-b704-53f6e5cf5020" />
      </body>
      <title>Model Binders for HttpCookie and AppSetting</title>
      <guid isPermaLink="false">http://www.aboutcode.net/PermaLink,guid,ccfe3888-bdd7-4f13-b704-53f6e5cf5020.aspx</guid>
      <link>http://www.aboutcode.net/2008/12/08/ModelBindersForHttpCookieAndAppSetting.aspx</link>
      <pubDate>Mon, 08 Dec 2008 20:55:53 GMT</pubDate>
      <description>&lt;p&gt;
Avoid using HttpContext in controller actions to make testing much easier. Therefore
all inputs to an action needs to be passed as parameters. In my new REST framework
that builds on ASP.NET MVC I have created some useful model binders to make this easy.
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;[ResourceUriTemplate("")]&lt;br&gt;
public class RootUri : ResourceUri&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public ResourceResponse Get([HttpCookie] string visited, [AppSetting]
int visitTimeout)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; { 
&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;
The HttpCookieAttribute looks for a cookie called "visited". The AppSettingAttribute
looks in web.config for an appSetting with the key "visitTimeout". The method is now
easy to test and has very readable definition. :) 
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
Both attributes will cast the raw string found into the required type by using a TypeConverter. 
&lt;p&gt;
The AppSettingAttribute constructor can also take a key name if you want something
different from the parameter name. 
&lt;p&gt;
The code is in &lt;a href="http://svn2.assembla.com/svn/snooze/branches/aspnet" target="_blank"&gt;SubVersion&lt;/a&gt;,
but I'll repeat some here to show just how easy it was: 
&lt;p&gt;
&lt;font face="Courier New"&gt;namespace Snooze&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public class AppSettingAttribute : CustomModelBinderAttribute&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; public AppSettingAttribute()&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; } &lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public AppSettingAttribute(string
key)&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; _key = key;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string _key; &lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public override
IModelBinder GetBinder()&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; return new AppSettingModelBinder(_key);&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; } &lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class AppSettingModelBinder : IModelBinder&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; public AppSettingModelBinder(string key)&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; _key = key;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string _key; &lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public ModelBinderResult
BindModel(ModelBindingContext bindingContext)&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; string setting
= WebConfigurationManager.AppSettings[_key ?? bindingContext.ModelName];&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; object value;&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; if (bindingContext.ModelType
== typeof(string))&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
value = setting;&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; else&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
value = TypeDescriptor.GetConverter(bindingContext.ModelType).ConvertFromString(setting);&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; return new ModelBinderResult(value);&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; }&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=ccfe3888-bdd7-4f13-b704-53f6e5cf5020" /&gt;</description>
      <comments>http://www.aboutcode.net/CommentView,guid,ccfe3888-bdd7-4f13-b704-53f6e5cf5020.aspx</comments>
      <category>.net</category>
      <category>mvc</category>
      <category>REST</category>
      <category>web</category>
    </item>
    <item>
      <trackback:ping>http://www.aboutcode.net/Trackback.aspx?guid=5c58c4bc-9e1a-4eac-87e0-466d78c7bfcf</trackback:ping>
      <pingback:server>http://www.aboutcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.aboutcode.net/PermaLink,guid,5c58c4bc-9e1a-4eac-87e0-466d78c7bfcf.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.aboutcode.net/CommentView,guid,5c58c4bc-9e1a-4eac-87e0-466d78c7bfcf.aspx</wfw:comment>
      <wfw:commentRss>http://www.aboutcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=5c58c4bc-9e1a-4eac-87e0-466d78c7bfcf</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Filters in ASP.NET MVC provide a great way to attach functionality around controllers.
By building on top of the MVC framework, my ResourceUri class (which inherits from
Controller) gets all the filter goodness as well.
</p>
        <p>
My library also has a SubResourceUri class. Any filters applied to the parent ResourceUri
are also executed for the SubResourceUri.
</p>
        <p>
          <font face="Courier New">[ResourceUriTemplate("customers/{CustomerId}")]<br />
[MyLoggingFilter]<br />
public class CustomerUri : ResourceUri { ... }<br /><br />
[ResourceUriTemplate("orders/{OrderId}")]<br />
public class OrderUri : SubResourceUri&lt;CustomerUri&gt; { ...}</font>
        </p>
        <p>
For example, when we GET an order the filter still catches the request and outputs
logging information.
</p>
        <p>
Another use is authorization. You can place an authorization filter on top level URI
and it will protect all sub-URIs beneath it. 
</p>
        <p>
 
</p>
        <p>
Keep track of the latest developments on the code here: <a title="http://svn2.assembla.com/svn/snooze/branches/aspnet" href="http://svn2.assembla.com/svn/snooze/branches/aspnet">http://svn2.assembla.com/svn/snooze/branches/aspnet</a></p>
        <img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=5c58c4bc-9e1a-4eac-87e0-466d78c7bfcf" />
      </body>
      <title>Sub-resources and filters</title>
      <guid isPermaLink="false">http://www.aboutcode.net/PermaLink,guid,5c58c4bc-9e1a-4eac-87e0-466d78c7bfcf.aspx</guid>
      <link>http://www.aboutcode.net/2008/12/07/SubresourcesAndFilters.aspx</link>
      <pubDate>Sun, 07 Dec 2008 21:34:25 GMT</pubDate>
      <description>&lt;p&gt;
Filters in ASP.NET MVC provide a great way to attach functionality around controllers.
By building on top of the MVC framework, my ResourceUri class (which inherits from
Controller) gets all the filter goodness as well.
&lt;/p&gt;
&lt;p&gt;
My library also has a SubResourceUri class. Any filters applied to the parent ResourceUri
are also executed for the SubResourceUri.
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;[ResourceUriTemplate("customers/{CustomerId}")]&lt;br&gt;
[MyLoggingFilter]&lt;br&gt;
public class CustomerUri : ResourceUri { ... }&lt;br&gt;
&lt;br&gt;
[ResourceUriTemplate("orders/{OrderId}")]&lt;br&gt;
public class OrderUri : SubResourceUri&amp;lt;CustomerUri&amp;gt; { ...}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
For example, when we GET an order the filter still catches the request and outputs
logging information.
&lt;/p&gt;
&lt;p&gt;
Another use is authorization. You can place an authorization filter on top level URI
and it will protect all sub-URIs beneath it. 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Keep track of the latest developments on the code here: &lt;a title="http://svn2.assembla.com/svn/snooze/branches/aspnet" href="http://svn2.assembla.com/svn/snooze/branches/aspnet"&gt;http://svn2.assembla.com/svn/snooze/branches/aspnet&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=5c58c4bc-9e1a-4eac-87e0-466d78c7bfcf" /&gt;</description>
      <comments>http://www.aboutcode.net/CommentView,guid,5c58c4bc-9e1a-4eac-87e0-466d78c7bfcf.aspx</comments>
      <category>.net</category>
      <category>mvc</category>
      <category>REST</category>
      <category>web</category>
    </item>
    <item>
      <trackback:ping>http://www.aboutcode.net/Trackback.aspx?guid=248f1839-a7b8-4f6e-a03f-9b2f9d8cea8b</trackback:ping>
      <pingback:server>http://www.aboutcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.aboutcode.net/PermaLink,guid,248f1839-a7b8-4f6e-a03f-9b2f9d8cea8b.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.aboutcode.net/CommentView,guid,248f1839-a7b8-4f6e-a03f-9b2f9d8cea8b.aspx</wfw:comment>
      <wfw:commentRss>http://www.aboutcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=248f1839-a7b8-4f6e-a03f-9b2f9d8cea8b</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Continued work on my resource-oriented library for ASP.NET MVC has expanded to include
an <a href="http://msdn.microsoft.com/en-us/library/system.xml.linq.xdocument.aspx" target="_blank">XDocument</a> based
view engine for ASP.NET MVC.
</p>
        <p>
This means we can now use VB.NET XML literals to define XHTML views (or any XML views).
</p>
        <p>
Get the <a href="http://svn2.assembla.com/svn/snooze/branches/aspnet" target="_blank">latest
from SVN</a>.
</p>
        <img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=248f1839-a7b8-4f6e-a03f-9b2f9d8cea8b" />
      </body>
      <title>XDocument View Engine for ASP.NET MVC</title>
      <guid isPermaLink="false">http://www.aboutcode.net/PermaLink,guid,248f1839-a7b8-4f6e-a03f-9b2f9d8cea8b.aspx</guid>
      <link>http://www.aboutcode.net/2008/11/30/XDocumentViewEngineForASPNETMVC.aspx</link>
      <pubDate>Sun, 30 Nov 2008 22:49:44 GMT</pubDate>
      <description>&lt;p&gt;
Continued work on my resource-oriented library for ASP.NET MVC has expanded to include
an &lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.linq.xdocument.aspx" target="_blank"&gt;XDocument&lt;/a&gt; based
view engine for ASP.NET MVC.
&lt;/p&gt;
&lt;p&gt;
This means we can now use VB.NET XML literals to define XHTML views (or any XML views).
&lt;/p&gt;
&lt;p&gt;
Get the &lt;a href="http://svn2.assembla.com/svn/snooze/branches/aspnet" target="_blank"&gt;latest
from SVN&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=248f1839-a7b8-4f6e-a03f-9b2f9d8cea8b" /&gt;</description>
      <comments>http://www.aboutcode.net/CommentView,guid,248f1839-a7b8-4f6e-a03f-9b2f9d8cea8b.aspx</comments>
      <category>.net</category>
      <category>html</category>
      <category>mvc</category>
      <category>REST</category>
      <category>vb.net</category>
      <category>web</category>
      <category>xml</category>
    </item>
    <item>
      <trackback:ping>http://www.aboutcode.net/Trackback.aspx?guid=ed499724-c6b0-43d5-892b-34ee7bdbab6a</trackback:ping>
      <pingback:server>http://www.aboutcode.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.aboutcode.net/PermaLink,guid,ed499724-c6b0-43d5-892b-34ee7bdbab6a.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.aboutcode.net/CommentView,guid,ed499724-c6b0-43d5-892b-34ee7bdbab6a.aspx</wfw:comment>
      <wfw:commentRss>http://www.aboutcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ed499724-c6b0-43d5-892b-34ee7bdbab6a</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Now that the ASP.NET MVC API has settled down I decided to bring some of my ideas
about REST and resource-oriented programming to it. 
</p>
        <p>
The following screencast shows my current prototype in action:<br /><a href="http://www.aboutcode.net/screencasts/snooze-aspnet-mvc.wmv">http://www.aboutcode.net/screencasts/snooze-aspnet-mvc.wmv</a></p>
        <p>
I'm keen for comments and feedback. 
</p>
        <p>
The source code is currently available via SVN here:<br /><a href="http://svn2.assembla.com/svn/snooze/branches/aspnet">http://svn2.assembla.com/svn/snooze/branches/aspnet</a></p>
        <img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=ed499724-c6b0-43d5-892b-34ee7bdbab6a" />
      </body>
      <title>New Resource-Oriented Library for ASP.NET MVC</title>
      <guid isPermaLink="false">http://www.aboutcode.net/PermaLink,guid,ed499724-c6b0-43d5-892b-34ee7bdbab6a.aspx</guid>
      <link>http://www.aboutcode.net/2008/11/26/NewResourceOrientedLibraryForASPNETMVC.aspx</link>
      <pubDate>Wed, 26 Nov 2008 03:23:02 GMT</pubDate>
      <description>&lt;p&gt;
Now that the ASP.NET MVC API has settled down I decided to bring some of my ideas
about REST and resource-oriented programming to it. 
&lt;p&gt;
The following screencast shows my current prototype in action:&lt;br&gt;
&lt;a href="http://www.aboutcode.net/screencasts/snooze-aspnet-mvc.wmv"&gt;http://www.aboutcode.net/screencasts/snooze-aspnet-mvc.wmv&lt;/a&gt; 
&lt;p&gt;
I'm keen for comments and feedback. 
&lt;p&gt;
The source code is currently available via SVN here:&lt;br&gt;
&lt;a href="http://svn2.assembla.com/svn/snooze/branches/aspnet"&gt;http://svn2.assembla.com/svn/snooze/branches/aspnet&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.aboutcode.net/aggbug.ashx?id=ed499724-c6b0-43d5-892b-34ee7bdbab6a" /&gt;</description>
      <comments>http://www.aboutcode.net/CommentView,guid,ed499724-c6b0-43d5-892b-34ee7bdbab6a.aspx</comments>
      <category>.net</category>
      <category>c#</category>
      <category>mvc</category>
      <category>REST</category>
      <category>screencast</category>
      <category>web</category>
    </item>
  </channel>
</rss>