<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Parsing The Payload</title>
	<atom:link href="http://lostechies.com/mokhan/2008/08/15/parsing-the-payload/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/mokhan/2008/08/15/parsing-the-payload/</link>
	<description>Just another LosTechies site</description>
	<lastBuildDate>Tue, 12 May 2009 07:06:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Colin Jack</title>
		<link>http://lostechies.com/mokhan/2008/08/15/parsing-the-payload/#comment-19</link>
		<dc:creator>Colin Jack</dc:creator>
		<pubDate>Sat, 16 Aug 2008 14:52:40 +0000</pubDate>
		<guid isPermaLink="false">/blogs/mokhan/archive/2008/08/14/parsing-the-payload.aspx#comment-19</guid>
		<description>@mO
Yeah the whole backwards thing is cool, need to try it to see if it works for me in practice but good idea for sure.

I use Windows Live Writer which has a plugin that lets you insert snippets from Visual Studio which is cool (Jimmy Bogard suggested it in the comments and provides a link):

http://colinjack.blogspot.com/2008/02/posting-c-code-snippets.html</description>
		<content:encoded><![CDATA[<p>@mO<br />
Yeah the whole backwards thing is cool, need to try it to see if it works for me in practice but good idea for sure.</p>
<p>I use Windows Live Writer which has a plugin that lets you insert snippets from Visual Studio which is cool (Jimmy Bogard suggested it in the comments and provides a link):</p>
<p><a href="http://colinjack.blogspot.com/2008/02/posting-c-code-snippets.html" rel="nofollow">http://colinjack.blogspot.com/2008/02/posting-c-code-snippets.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simone Busoli</title>
		<link>http://lostechies.com/mokhan/2008/08/15/parsing-the-payload/#comment-18</link>
		<dc:creator>Simone Busoli</dc:creator>
		<pubDate>Fri, 15 Aug 2008 19:53:36 +0000</pubDate>
		<guid isPermaLink="false">/blogs/mokhan/archive/2008/08/14/parsing-the-payload.aspx#comment-18</guid>
		<description>You can give a look at the DeserializeAttribute in Mvccontrib as well.</description>
		<content:encoded><![CDATA[<p>You can give a look at the DeserializeAttribute in Mvccontrib as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Schwartzberg</title>
		<link>http://lostechies.com/mokhan/2008/08/15/parsing-the-payload/#comment-17</link>
		<dc:creator>Josh Schwartzberg</dc:creator>
		<pubDate>Fri, 15 Aug 2008 15:19:12 +0000</pubDate>
		<guid isPermaLink="false">/blogs/mokhan/archive/2008/08/14/parsing-the-payload.aspx#comment-17</guid>
		<description>Unless I&#039;m missing something, and I realize it&#039;s slightly more verbose.  But, you should just be able to use the built in asp.net mvc binder:

public viewresult register_new_account() {
    var accountsubmissiondto = new accountsubmissiondto();
	System.Web.Mvc.BindingHelperExtensions.UpdateFrom(accountsubmissiondto, Request.Form);
    var validationresult = task.validate(accountsubmissiondto);
    if (validationresult.isvalid) {
        task.submit(accountsubmissiondto);
        return view(&quot;Success&quot;, accountsubmissiondto);
    }

    return view(&quot;Index&quot;, validationresult.brokenrules);
}</description>
		<content:encoded><![CDATA[<p>Unless I&#8217;m missing something, and I realize it&#8217;s slightly more verbose.  But, you should just be able to use the built in asp.net mvc binder:</p>
<p>public viewresult register_new_account() {<br />
    var accountsubmissiondto = new accountsubmissiondto();<br />
	System.Web.Mvc.BindingHelperExtensions.UpdateFrom(accountsubmissiondto, Request.Form);<br />
    var validationresult = task.validate(accountsubmissiondto);<br />
    if (validationresult.isvalid) {<br />
        task.submit(accountsubmissiondto);<br />
        return view(&#8220;Success&#8221;, accountsubmissiondto);<br />
    }</p>
<p>    return view(&#8220;Index&#8221;, validationresult.brokenrules);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mO</title>
		<link>http://lostechies.com/mokhan/2008/08/15/parsing-the-payload/#comment-16</link>
		<dc:creator>mO</dc:creator>
		<pubDate>Fri, 15 Aug 2008 13:47:29 +0000</pubDate>
		<guid isPermaLink="false">/blogs/mokhan/archive/2008/08/14/parsing-the-payload.aspx#comment-16</guid>
		<description>@Mr. Rob
That looks super clean... I will definitely have to learn more about Castle bindings. Thanks for the tip!

@joey
I keep tellin&#039; myself I&#039;m going to invest some time in spiking MonoRail... maybe you could point me to some good resources for getting started quickly?

@Mr. Colin
the tasks are indeed service layer components. 

I&#039;ve found that code snippets don&#039;t appear well in my feed as well. Can you suggest something for copying and pasting C# source code into html documents?
 
Our team just found that writing the specs &quot;backwards&quot; was just more readable. We try to keep the technical language as much as possible and try to write them as readable sentences.  </description>
		<content:encoded><![CDATA[<p>@Mr. Rob<br />
That looks super clean&#8230; I will definitely have to learn more about Castle bindings. Thanks for the tip!</p>
<p>@joey<br />
I keep tellin&#8217; myself I&#8217;m going to invest some time in spiking MonoRail&#8230; maybe you could point me to some good resources for getting started quickly?</p>
<p>@Mr. Colin<br />
the tasks are indeed service layer components. </p>
<p>I&#8217;ve found that code snippets don&#8217;t appear well in my feed as well. Can you suggest something for copying and pasting C# source code into html documents?</p>
<p>Our team just found that writing the specs &#8220;backwards&#8221; was just more readable. We try to keep the technical language as much as possible and try to write them as readable sentences.  </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin Jack</title>
		<link>http://lostechies.com/mokhan/2008/08/15/parsing-the-payload/#comment-15</link>
		<dc:creator>Colin Jack</dc:creator>
		<pubDate>Fri, 15 Aug 2008 09:37:19 +0000</pubDate>
		<guid isPermaLink="false">/blogs/mokhan/archive/2008/08/14/parsing-the-payload.aspx#comment-15</guid>
		<description>Very cool, and can definitely see how it helps. I&#039;ve got some questions/comments though.

What are the the tasks you show for, are they some sort of service or something different entirely?

Off topic but I like the way you structure your BDD specs backwards, can see the sense in that, mind you can see the sense in opposite too :)

Finally, the way you&#039;re inserting code snippets doesn&#039;t seem to work when you view it via a feed (I just tried from Google Reader) and it also seems to have lost some the casing when you view it in the browser e.g. &quot;validationresult.isvalid&quot;.

@Rob
Got a blog entry about the entirety of the approach you use, not familiar with the castle binding approach.</description>
		<content:encoded><![CDATA[<p>Very cool, and can definitely see how it helps. I&#8217;ve got some questions/comments though.</p>
<p>What are the the tasks you show for, are they some sort of service or something different entirely?</p>
<p>Off topic but I like the way you structure your BDD specs backwards, can see the sense in that, mind you can see the sense in opposite too <img src='http://lostechies.com/mokhan/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Finally, the way you&#8217;re inserting code snippets doesn&#8217;t seem to work when you view it via a feed (I just tried from Google Reader) and it also seems to have lost some the casing when you view it in the browser e.g. &#8220;validationresult.isvalid&#8221;.</p>
<p>@Rob<br />
Got a blog entry about the entirety of the approach you use, not familiar with the castle binding approach.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joey</title>
		<link>http://lostechies.com/mokhan/2008/08/15/parsing-the-payload/#comment-14</link>
		<dc:creator>joey</dc:creator>
		<pubDate>Fri, 15 Aug 2008 09:28:24 +0000</pubDate>
		<guid isPermaLink="false">/blogs/mokhan/archive/2008/08/14/parsing-the-payload.aspx#comment-14</guid>
		<description>Why don&#039;t people just use monorail? ;)  

I guess a better question is why are you using MVC what does MVC have over MonoRail?</description>
		<content:encoded><![CDATA[<p>Why don&#8217;t people just use monorail? <img src='http://lostechies.com/mokhan/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   </p>
<p>I guess a better question is why are you using MVC what does MVC have over MonoRail?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://lostechies.com/mokhan/2008/08/15/parsing-the-payload/#comment-13</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Fri, 15 Aug 2008 04:05:02 +0000</pubDate>
		<guid isPermaLink="false">/blogs/mokhan/archive/2008/08/14/parsing-the-payload.aspx#comment-13</guid>
		<description>This is a lot like what we are doing in our current MVC project (we are suing all the same pieces as you), with a couple of notable differences.  Insead of DTOs we are using command objects from our domain layer and using the Castle integration to accomplish the databinding.  So, you get something like this:

public ActionResult Create([CastleBind]CreateNewAccount command)
        {
            var result = Execute(command);

            if(result.HasErrors)
            {
                ViewData[&quot;Title&quot;] = &quot;New Account&quot;;
                ViewData[&quot;Errors&quot;] = result.Errors;
                ViewData[&quot;command&quot;] = command;
                return View(&quot;New&quot;);
            }

            ViewData[&quot;Title&quot;] = &quot;Account Created&quot;;
            ViewData[&quot;Message&quot;] = &quot;Your account was created successfully.&quot;;
            return View(&quot;AccountCreated&quot;);
        }</description>
		<content:encoded><![CDATA[<p>This is a lot like what we are doing in our current MVC project (we are suing all the same pieces as you), with a couple of notable differences.  Insead of DTOs we are using command objects from our domain layer and using the Castle integration to accomplish the databinding.  So, you get something like this:</p>
<p>public ActionResult Create([CastleBind]CreateNewAccount command)<br />
        {<br />
            var result = Execute(command);</p>
<p>            if(result.HasErrors)<br />
            {<br />
                ViewData["Title"] = &#8220;New Account&#8221;;<br />
                ViewData["Errors"] = result.Errors;<br />
                ViewData["command"] = command;<br />
                return View(&#8220;New&#8221;);<br />
            }</p>
<p>            ViewData["Title"] = &#8220;Account Created&#8221;;<br />
            ViewData["Message"] = &#8220;Your account was created successfully.&#8221;;<br />
            return View(&#8220;AccountCreated&#8221;);<br />
        }</p>
]]></content:encoded>
	</item>
</channel>
</rss>
