<?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:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" version="2.0">
  <channel>
    <title>altinoren.com - Castle</title>
    <link>http://altinoren.com/</link>
    <description>Gokhan Altinoren's Blog and Projects</description>
    <language>en-us</language>
    <copyright>Gokhan Altinoren</copyright>
    <lastBuildDate>Mon, 10 Nov 2008 10:40:43 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>gokhan@altinoren.com</managingEditor>
    <webMaster>gokhan@altinoren.com</webMaster>
    <item>
      <trackback:ping>http://altinoren.com/Trackback.aspx?guid=bca0aba7-dbaa-4ccf-bcf3-4d76efab1a40</trackback:ping>
      <pingback:server>http://altinoren.com/pingback.aspx</pingback:server>
      <pingback:target>http://altinoren.com/PermaLink,guid,bca0aba7-dbaa-4ccf-bcf3-4d76efab1a40.aspx</pingback:target>
      <dc:creator>Gokhan Altinoren</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">I'm sure someone did this before, but I'm
too lazy to search for it :)<br /><br />
Model Binders in MVC is a cool concept to map your form values to parameter objects
of your Action. There's also this automatic error message display capabilities in
MVC. All explained by The Gu <a href="http://weblogs.asp.net/scottgu/archive/2008/09/02/asp-net-mvc-preview-5-and-form-posting-scenarios.aspx">here</a>.<br /><br />
Here's my take on validating a model object during the binding process. Castle project
has a validation framework and a range of <a href="http://hammett.castleproject.org/?p=114">validators</a> which
can be used standalone. It would be cool to use it with MVC to ease the validation
pain a bit, huh?<br /><br />
First, we need a binder to validate the object using <a href="http://www.castleproject.org">Castle</a>'s
ValidatorRunner:<br /><br /><!-- code formatted by http://manoli.net/csharpformat/ --><style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }
</style><div class="csharpcode"><pre class="alt"><span class="kwrd">using</span> System.Web.Mvc;</pre><pre><span class="kwrd">using</span> Castle.Components.Validator;</pre><pre class="alt"> </pre><pre><span class="kwrd">public</span><span class="kwrd">class</span> ValidatingModelBinder
: DefaultModelBinder</pre><pre class="alt">    {</pre><pre><span class="kwrd">public</span><span class="kwrd">override</span> ModelBinderResult
BindModel(ModelBindingContext bindingContext)</pre><pre class="alt">        {</pre><pre>            var result = <span class="kwrd">base</span>.BindModel(bindingContext);</pre><pre class="alt"> </pre><pre><span class="kwrd">if</span> (result != <span class="kwrd">null</span> &amp;&amp;
result.Value != <span class="kwrd">null</span>)</pre><pre class="alt">            {</pre><pre>                var runner = <span class="kwrd">new</span> ValidatorRunner(<span class="kwrd">new</span> CachedValidationRegistry());</pre><pre class="alt"><span class="kwrd">if</span> (!runner.IsValid(result.Value))</pre><pre>                {</pre><pre class="alt">                    var summary = runner.GetErrorSummary(result.Value);</pre><pre><span class="kwrd">foreach</span> (var invalidProperty <span class="kwrd">in</span> summary.InvalidProperties)</pre><pre class="alt">                    {</pre><pre><span class="kwrd">foreach</span> (var error <span class="kwrd">in</span> summary.GetErrorsForProperty(invalidProperty))</pre><pre class="alt">                        {</pre><pre>                            bindingContext.ModelState.AddModelError(bindingContext.ModelName + <span class="str">"."</span> +
invalidProperty, error);</pre><pre class="alt">                        }</pre><pre>                    }</pre><pre class="alt">                }</pre><pre>            }</pre><pre class="alt"> </pre><pre><span class="kwrd">return</span> result;</pre><pre class="alt">        }</pre><pre>    }</pre></div><p>
And an object to validate:
</p><!-- code formatted by http://manoli.net/csharpformat/ --><style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }
</style><div class="csharpcode"><pre class="alt"><span class="kwrd">using</span> Castle.Components.Validator;</pre><pre> </pre><pre class="alt"><span class="kwrd">public</span><span class="kwrd">class</span> CreateUser</pre><pre>    {</pre><pre class="alt">        [ValidateNonEmpty(<span class="str">"Please enter user name."</span>)]</pre><pre><span class="kwrd">public</span><span class="kwrd">string</span> UserName
{ get; set; }</pre><pre class="alt">        [ValidateNonEmpty(<span class="str">"Please enter password."</span>)]</pre><pre><span class="kwrd">public</span><span class="kwrd">string</span> Password
{ get; set; }</pre><pre class="alt">        [ValidateEmail(<span class="str">"Email is not valid."</span>)]</pre><pre>        [ValidateNonEmpty(<span class="str">"Please enter email address."</span>)]</pre><pre class="alt"><span class="kwrd">public</span><span class="kwrd">string</span> Email
{ get; set; }</pre><pre>    }</pre></div><p>
And an action to use the object:
</p><!-- code formatted by http://manoli.net/csharpformat/ --><style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }
</style><div class="csharpcode"><pre class="alt"><span class="kwrd">public</span> ActionResult CreateUser(CreateUser
createUser)</pre><pre>        {</pre><pre class="alt"><span class="kwrd">if</span> (ViewData.ModelState.IsValid)</pre><pre>            {</pre><pre class="alt">                ViewData[<span class="str">"Message"</span>] = <span class="str">"Done."</span>;</pre><pre>            }</pre><pre class="alt"> </pre><pre><span class="kwrd">return</span> View();</pre><pre class="alt">        }</pre></div><p>
Please note that, when the action is invoked, parameter is already validated. We just
check ViewData.ModelState.IsValid and act accordingly.<br /></p><p>
Next, we'll tell the MVC engine to bind CreateUser objects through ValidatingModelBinder,
in Application_Start() of Global.asax.cs:
</p><!-- code formatted by http://manoli.net/csharpformat/ --><style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }
</style><div class="csharpcode"><pre class="alt">        ModelBinders.Binders.Add(<span class="kwrd">typeof</span>(CreateUser), <span class="kwrd">new</span> ValidatingModelBinder());</pre></div><p>
So, whenever the engine is bindign to a CreateUser, our binder will execute (and validate)
the object. Finally, code below for the view:
</p><!-- code formatted by http://manoli.net/csharpformat/ --><style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }
</style><div class="csharpcode"><pre class="alt"><span class="kwrd">&lt;</span><span class="html">asp:Content</span><span class="attr">ID</span><span class="kwrd">="Content1"</span><span class="attr">ContentPlaceHolderID</span><span class="kwrd">="MainContent"</span><span class="attr">runat</span><span class="kwrd">="server"</span><span class="kwrd">&gt;</span></pre><pre><span class="asp">&lt;%</span><span class="kwrd">if</span> (ViewData[<span class="str">"Message"</span>]
!= <span class="kwrd">null</span>)</pre><pre class="alt">      {<span class="asp">%&gt;</span></pre><pre><span class="asp">&lt;%</span>=ViewData[<span class="str">"Message"</span>]<span class="asp">%&gt;</span></pre><pre class="alt"><span class="asp">&lt;%</span>} <span class="asp">%&gt;</span></pre><pre><span class="asp">&lt;%</span>=Html.ValidationSummary() <span class="asp">%&gt;</span></pre><pre class="alt"><span class="kwrd">&lt;</span><span class="html">form</span><span class="attr">method</span><span class="kwrd">="post"</span><span class="attr">action</span><span class="kwrd">="/Home/CreateUser"</span><span class="kwrd">&gt;</span></pre><pre>        User name: <span class="kwrd">&lt;</span><span class="html">br</span><span class="kwrd">/&gt;</span></pre><pre class="alt"><span class="asp">&lt;%</span>=Html.TextBox(<span class="str">"CreateUser.UserName"</span>)<span class="asp">%&gt;</span><span class="asp">&lt;%</span>=Html.ValidationMessage(<span class="str">"CreateUser.UserName"</span>, <span class="str">"*"</span>)<span class="asp">%&gt;</span><span class="kwrd">&lt;</span><span class="html">br</span><span class="kwrd">/&gt;</span></pre><pre>        Password: <span class="kwrd">&lt;</span><span class="html">br</span><span class="kwrd">/&gt;</span></pre><pre class="alt"><span class="asp">&lt;%</span>=Html.Password(<span class="str">"CreateUser.Password"</span>)<span class="asp">%&gt;</span><span class="asp">&lt;%</span>=Html.ValidationMessage(<span class="str">"CreateUser.Password"</span>, <span class="str">"*"</span>)<span class="asp">%&gt;</span><span class="kwrd">&lt;</span><span class="html">br</span><span class="kwrd">/&gt;</span></pre><pre>        Email: <span class="kwrd">&lt;</span><span class="html">br</span><span class="kwrd">/&gt;</span></pre><pre class="alt"><span class="asp">&lt;%</span>=Html.TextBox(<span class="str">"CreateUser.Email"</span>)<span class="asp">%&gt;</span><span class="asp">&lt;%</span>=Html.ValidationMessage(<span class="str">"CreateUser.Email"</span>, <span class="str">"*"</span>)<span class="asp">%&gt;</span><span class="kwrd">&lt;</span><span class="html">br</span><span class="kwrd">/&gt;</span></pre><pre><span class="kwrd">&lt;</span><span class="html">input</span><span class="attr">type</span><span class="kwrd">="submit"</span><span class="attr">value</span><span class="kwrd">="Submit"</span><span class="kwrd">/&gt;</span></pre><pre class="alt"><span class="kwrd">&lt;/</span><span class="html">form</span><span class="kwrd">&gt;</span></pre><pre><span class="kwrd">&lt;/</span><span class="html">asp:Content</span><span class="kwrd">&gt;</span></pre></div><p>
Here's the result:
</p><img src="http://altinoren.com/content/binary/MVC_Castle_Validators.jpg" border="0" /><img width="0" height="0" src="http://altinoren.com/aggbug.ashx?id=bca0aba7-dbaa-4ccf-bcf3-4d76efab1a40" /></body>
      <title>Using Castle Validators with ASP.NET MVC Model Binders for Automatic Validation</title>
      <guid isPermaLink="false">http://altinoren.com/PermaLink,guid,bca0aba7-dbaa-4ccf-bcf3-4d76efab1a40.aspx</guid>
      <link>http://altinoren.com/PermaLink,guid,bca0aba7-dbaa-4ccf-bcf3-4d76efab1a40.aspx</link>
      <pubDate>Mon, 10 Nov 2008 10:40:43 GMT</pubDate>
      <description>I'm sure someone did this before, but I'm too lazy to search for it :)&lt;br&gt;
&lt;br&gt;
Model Binders in MVC is a cool concept to map your form values to parameter objects
of your Action. There's also this automatic error message display capabilities in
MVC. All explained by The Gu &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/09/02/asp-net-mvc-preview-5-and-form-posting-scenarios.aspx"&gt;here&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
Here's my take on validating a model object during the binding process. Castle project
has a validation framework and a range of &lt;a href="http://hammett.castleproject.org/?p=114"&gt;validators&lt;/a&gt; which
can be used standalone. It would be cool to use it with MVC to ease the validation
pain a bit, huh?&lt;br&gt;
&lt;br&gt;
First, we need a binder to validate the object using &lt;a href="http://www.castleproject.org"&gt;Castle&lt;/a&gt;'s
ValidatorRunner:&lt;br&gt;
&lt;br&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.Mvc;&lt;/pre&gt;
&lt;pre&gt;    &lt;span class="kwrd"&gt;using&lt;/span&gt; Castle.Components.Validator;&lt;/pre&gt;
&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ValidatingModelBinder
: DefaultModelBinder&lt;/pre&gt;
&lt;pre class="alt"&gt;    {&lt;/pre&gt;
&lt;pre&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; ModelBinderResult
BindModel(ModelBindingContext bindingContext)&lt;/pre&gt;
&lt;pre class="alt"&gt;        {&lt;/pre&gt;
&lt;pre&gt;            var result = &lt;span class="kwrd"&gt;base&lt;/span&gt;.BindModel(bindingContext);&lt;/pre&gt;
&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (result != &lt;span class="kwrd"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;
result.Value != &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre class="alt"&gt;            {&lt;/pre&gt;
&lt;pre&gt;                var runner = &lt;span class="kwrd"&gt;new&lt;/span&gt; ValidatorRunner(&lt;span class="kwrd"&gt;new&lt;/span&gt; CachedValidationRegistry());&lt;/pre&gt;
&lt;pre class="alt"&gt;                &lt;span class="kwrd"&gt;if&lt;/span&gt; (!runner.IsValid(result.Value))&lt;/pre&gt;
&lt;pre&gt;                {&lt;/pre&gt;
&lt;pre class="alt"&gt;                    var summary = runner.GetErrorSummary(result.Value);&lt;/pre&gt;
&lt;pre&gt;                    &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var invalidProperty &lt;span class="kwrd"&gt;in&lt;/span&gt; summary.InvalidProperties)&lt;/pre&gt;
&lt;pre class="alt"&gt;                    {&lt;/pre&gt;
&lt;pre&gt;                        &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var error &lt;span class="kwrd"&gt;in&lt;/span&gt; summary.GetErrorsForProperty(invalidProperty))&lt;/pre&gt;
&lt;pre class="alt"&gt;                        {&lt;/pre&gt;
&lt;pre&gt;                            bindingContext.ModelState.AddModelError(bindingContext.ModelName + &lt;span class="str"&gt;"."&lt;/span&gt; +
invalidProperty, error);&lt;/pre&gt;
&lt;pre class="alt"&gt;                        }&lt;/pre&gt;
&lt;pre&gt;                    }&lt;/pre&gt;
&lt;pre class="alt"&gt;                }&lt;/pre&gt;
&lt;pre&gt;            }&lt;/pre&gt;
&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; result;&lt;/pre&gt;
&lt;pre class="alt"&gt;        }&lt;/pre&gt;
&lt;pre&gt;    }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
And an object to validate:
&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;using&lt;/span&gt; Castle.Components.Validator;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; CreateUser&lt;/pre&gt;
&lt;pre&gt;    {&lt;/pre&gt;
&lt;pre class="alt"&gt;        [ValidateNonEmpty(&lt;span class="str"&gt;"Please enter user name."&lt;/span&gt;)]&lt;/pre&gt;
&lt;pre&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; UserName
{ get; set; }&lt;/pre&gt;
&lt;pre class="alt"&gt;        [ValidateNonEmpty(&lt;span class="str"&gt;"Please enter password."&lt;/span&gt;)]&lt;/pre&gt;
&lt;pre&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Password
{ get; set; }&lt;/pre&gt;
&lt;pre class="alt"&gt;        [ValidateEmail(&lt;span class="str"&gt;"Email is not valid."&lt;/span&gt;)]&lt;/pre&gt;
&lt;pre&gt;        [ValidateNonEmpty(&lt;span class="str"&gt;"Please enter email address."&lt;/span&gt;)]&lt;/pre&gt;
&lt;pre class="alt"&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Email
{ get; set; }&lt;/pre&gt;
&lt;pre&gt;    }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
And an action to use the object:
&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult CreateUser(CreateUser
createUser)&lt;/pre&gt;
&lt;pre&gt;        {&lt;/pre&gt;
&lt;pre class="alt"&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (ViewData.ModelState.IsValid)&lt;/pre&gt;
&lt;pre&gt;            {&lt;/pre&gt;
&lt;pre class="alt"&gt;                ViewData[&lt;span class="str"&gt;"Message"&lt;/span&gt;] = &lt;span class="str"&gt;"Done."&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;            }&lt;/pre&gt;
&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; View();&lt;/pre&gt;
&lt;pre class="alt"&gt;        }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
Please note that, when the action is invoked, parameter is already validated. We just
check ViewData.ModelState.IsValid and act accordingly.&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
Next, we'll tell the MVC engine to bind CreateUser objects through ValidatingModelBinder,
in Application_Start() of Global.asax.cs:
&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;        ModelBinders.Binders.Add(&lt;span class="kwrd"&gt;typeof&lt;/span&gt;(CreateUser), &lt;span class="kwrd"&gt;new&lt;/span&gt; ValidatingModelBinder());&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
So, whenever the engine is bindign to a CreateUser, our binder will execute (and validate)
the object. Finally, code below for the view:
&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Content&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="Content1"&lt;/span&gt; &lt;span class="attr"&gt;ContentPlaceHolderID&lt;/span&gt;&lt;span class="kwrd"&gt;="MainContent"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;    &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; (ViewData[&lt;span class="str"&gt;"Message"&lt;/span&gt;]
!= &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre class="alt"&gt;      {&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;        &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=ViewData[&lt;span class="str"&gt;"Message"&lt;/span&gt;]&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;    &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;} &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;    &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=Html.ValidationSummary() &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt; &lt;span class="attr"&gt;method&lt;/span&gt;&lt;span class="kwrd"&gt;="post"&lt;/span&gt; &lt;span class="attr"&gt;action&lt;/span&gt;&lt;span class="kwrd"&gt;="/Home/CreateUser"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;        User name: &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;        &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=Html.TextBox(&lt;span class="str"&gt;"CreateUser.UserName"&lt;/span&gt;)&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt; &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=Html.ValidationMessage(&lt;span class="str"&gt;"CreateUser.UserName"&lt;/span&gt;, &lt;span class="str"&gt;"*"&lt;/span&gt;)&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;        Password: &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;        &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=Html.Password(&lt;span class="str"&gt;"CreateUser.Password"&lt;/span&gt;)&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt; &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=Html.ValidationMessage(&lt;span class="str"&gt;"CreateUser.Password"&lt;/span&gt;, &lt;span class="str"&gt;"*"&lt;/span&gt;)&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;        Email: &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;        &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=Html.TextBox(&lt;span class="str"&gt;"CreateUser.Email"&lt;/span&gt;)&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt; &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=Html.ValidationMessage(&lt;span class="str"&gt;"CreateUser.Email"&lt;/span&gt;, &lt;span class="str"&gt;"*"&lt;/span&gt;)&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="submit"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="Submit"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Content&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
Here's the result:
&lt;/p&gt;
&lt;img src="http://altinoren.com/content/binary/MVC_Castle_Validators.jpg" border="0"&gt;&lt;img width="0" height="0" src="http://altinoren.com/aggbug.ashx?id=bca0aba7-dbaa-4ccf-bcf3-4d76efab1a40" /&gt;</description>
      <category>.Net</category>
      <category>Castle</category>
      <category>MVC</category>
    </item>
    <item>
      <trackback:ping>http://altinoren.com/Trackback.aspx?guid=7043a882-8325-4e48-b956-54868219297c</trackback:ping>
      <pingback:server>http://altinoren.com/pingback.aspx</pingback:server>
      <pingback:target>http://altinoren.com/PermaLink,guid,7043a882-8325-4e48-b956-54868219297c.aspx</pingback:target>
      <dc:creator>Gokhan Altinoren</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <a href="http://altinoren.com/PermaLink,guid,bcc67590-f893-4281-85c2-1889ca1c6520.aspx">Preview
3</a> has this functionality, but there are a few things to mention.<br /><br />
ActiveWriter use ActiveRecord assembly to generate NHibernate config files. So you'll
need Castle.ActiveRecord.dll, NHibernate.dll and all necessary dependincies to make
it work.<br /><br /><p></p><img src="http://altinoren.com/content/binary/NHibernateGenerationDetail.png" border="0" /><br /><br /><ol><li>
Set the target to <b>NHibernate<br /></b>This way, AW will generate .hbm.xml files for each entity in your model.</li><li>
Set the <b>Assembly Path</b> to where Castle.ActiveRecord.dll, NHibernate.dll and
all necessary dependincies reside.<br />
The design decision was that, I didn't want to package these assemblies with AW. Rather
than that, I thought user will most probably have them so they can choose whatever
version they want to generate the configuration. If you don't supply the path, AW
(VS, actually) will look for them in GAc and then {Your VS Path}<span style="font-size: 9pt;">\Common7\IDE\Castle.ActiveReco<wbr />rd.dll,
so if you have them in one of those places, it should be fine.<br /><br />
One other quirk is, if you first try to generate with the wrong path, setti ng the
correct one later won't work until you restart Visual Studio. This is the framework's
limitation, once you try to load an assembly and get an error, the result will be
cached for subsequent tries. So VS appdomain should be restarted to make it work.
I'll have a possible soliton for this for a future version of ActiveWriter (will try
to load in a dummy appdomain, then in the VS appdomain)<br /><br />
You may use the fully qualified assembly names for <b>Active Record Assembly Name</b> and <b>NHibernate
Assembly Name</b> to target a specific version in the GAC, if you have more than one
in there.<br /></span></li><li><span style="font-size: 9pt;">When you save the model, AW will generate configuration.</span></li></ol>
I'll prepare a better documentation in the <a href="http://using.castleproject.org/display/Contrib/ActiveWriter">wiki</a>.<br /><br />
Have fun.<br /><br /><font color="#ff0000">Update:</font><br /><br />
AW does not work with release version of Castle assemblies (RC2?) for NHibernate generation,
it works with the trunk (or with recently compiled assemblies). You can use the latest
bits from the build server: <a href="http://builds.castleproject.org/cruise/index.castle" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://builds.castleproject<wbr />.org/cruise/index.castle</a><br /><img width="0" height="0" src="http://altinoren.com/aggbug.ashx?id=7043a882-8325-4e48-b956-54868219297c" /></body>
      <title>How to Generate NHibernate Configuration Using ActiveWriter</title>
      <guid isPermaLink="false">http://altinoren.com/PermaLink,guid,7043a882-8325-4e48-b956-54868219297c.aspx</guid>
      <link>http://altinoren.com/PermaLink,guid,7043a882-8325-4e48-b956-54868219297c.aspx</link>
      <pubDate>Thu, 14 Jun 2007 11:46:32 GMT</pubDate>
      <description>&lt;a href="http://altinoren.com/PermaLink,guid,bcc67590-f893-4281-85c2-1889ca1c6520.aspx"&gt;Preview
3&lt;/a&gt; has this functionality, but there are a few things to mention.&lt;br&gt;
&lt;br&gt;
ActiveWriter use ActiveRecord assembly to generate NHibernate config files. So you'll
need Castle.ActiveRecord.dll, NHibernate.dll and all necessary dependincies to make
it work.&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img src="http://altinoren.com/content/binary/NHibernateGenerationDetail.png" border="0"&gt;
&lt;br&gt;
&lt;br&gt;
&lt;ol&gt;
&lt;li&gt;
Set the target to &lt;b&gt;NHibernate&lt;br&gt;
&lt;/b&gt;This way, AW will generate .hbm.xml files for each entity in your model.&lt;/li&gt;
&lt;li&gt;
Set the &lt;b&gt;Assembly Path&lt;/b&gt; to where Castle.ActiveRecord.dll, NHibernate.dll and
all necessary dependincies reside.&lt;br&gt;
The design decision was that, I didn't want to package these assemblies with AW. Rather
than that, I thought user will most probably have them so they can choose whatever
version they want to generate the configuration. If you don't supply the path, AW
(VS, actually) will look for them in GAc and then {Your VS Path}&lt;span style="font-size: 9pt;"&gt;\Common7\IDE\Castle.ActiveReco&lt;wbr&gt;rd.dll,
so if you have them in one of those places, it should be fine.&lt;br&gt;
&lt;br&gt;
One other quirk is, if you first try to generate with the wrong path, setti ng the
correct one later won't work until you restart Visual Studio. This is the framework's
limitation, once you try to load an assembly and get an error, the result will be
cached for subsequent tries. So VS appdomain should be restarted to make it work.
I'll have a possible soliton for this for a future version of ActiveWriter (will try
to load in a dummy appdomain, then in the VS appdomain)&lt;br&gt;
&lt;br&gt;
You may use the fully qualified assembly names for &lt;b&gt;Active Record Assembly Name&lt;/b&gt; and &lt;b&gt;NHibernate
Assembly Name&lt;/b&gt; to target a specific version in the GAC, if you have more than one
in there.&lt;br&gt;
&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;span style="font-size: 9pt;"&gt;When you save the model, AW will generate configuration.&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
I'll prepare a better documentation in the &lt;a href="http://using.castleproject.org/display/Contrib/ActiveWriter"&gt;wiki&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
Have fun.&lt;br&gt;
&lt;br&gt;
&lt;font color="#ff0000"&gt;Update:&lt;/font&gt;
&lt;br&gt;
&lt;br&gt;
AW does not work with release version of Castle assemblies (RC2?) for NHibernate generation,
it works with the trunk (or with recently compiled assemblies). You can use the latest
bits from the build server: &lt;a href="http://builds.castleproject.org/cruise/index.castle" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;http://builds.castleproject&lt;wbr&gt;.org/cruise/index.castle&lt;/a&gt;
&lt;br&gt;
&lt;img width="0" height="0" src="http://altinoren.com/aggbug.ashx?id=7043a882-8325-4e48-b956-54868219297c" /&gt;</description>
      <category>ActiveWriter</category>
      <category>Castle</category>
      <category>Code Generation</category>
      <category>NHibernate</category>
    </item>
    <item>
      <trackback:ping>http://altinoren.com/Trackback.aspx?guid=bcc67590-f893-4281-85c2-1889ca1c6520</trackback:ping>
      <pingback:server>http://altinoren.com/pingback.aspx</pingback:server>
      <pingback:target>http://altinoren.com/PermaLink,guid,bcc67590-f893-4281-85c2-1889ca1c6520.aspx</pingback:target>
      <dc:creator>Gokhan Altinoren</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
        </p>
        <a href="http://altinoren.com/content/binary/ActiveWriter%20Preview%203.rar">This</a> was
sitting on the trunk for a while because of a bug in NHibernate config generation.
I believe it's fixed now, so let's see if it works :)<br /><br />
First of all, this release is trying to be compatible with Castle trunk, it may generate
code usable by released Castle components but it follows recent changes (might miss
a few days). You know, Castle will be 1.0 one day and ActiveWriter will be a release,
not a preview, in that day.<br /><br />
And I'm trying create some documentation on <a href="http://using.castleproject.org/display/Contrib/ActiveWriter">using.castleproject.org</a> (Castle's
wiki) to make <a href="http://hammett.castleproject.org/">Hammett</a> stop whining
about the lack of documentation of contrib projects (kidding!). If you're using ActiveWriter
and want to share your tips, tricks, workarounds or anything about it, it would be
great if you contribute to the documentation.<br /><br />
The most important update is the direct NHibernate configuration support. Now you
can instruct ActiveWriter to generate NHibernate configuration files (.hbm.xml) for
each entity in your model. Generated classes won't have ActiveRecord attributes in
this case. More on this in a later post (<font color="#ff0000">Update:</font><a href="http://altinoren.com/PermaLink,guid,7043a882-8325-4e48-b956-54868219297c.aspx">here</a>).<br /><br /><img src="content/binary/NHibernateGeneration.png" border="0" /><br /><br />
Another interesting change is the use of Castle.Components.Validator instead of the
ActiveRecord validators. AR changed in the trunk to use it, so does ActiveWriter.<br /><br /><img src="http://altinoren.com/content/binary/CastleValidators.png" border="0" /><br /><br />
One more exiciting news is, you can drag tables of MySQL from Server Explorer onto
the modelin surface (see Michael's patch below).<br /><br />
Full list of changes below. A big thanks to all who sent patches, ideas and bug reports.<br /><br />
New:<br /><ul><li>
Now optionally generates NHibernate hbm.xml files.</li><li>
Namespace in generated code is now customizable (Idea: Robert van Hoornaar)</li><li>
Imports in generated code is now customizable (Idea: Robert van Hoornaar)</li><li>
Model classes can override model level base class definition. (Patch: Robert van Hoornaar)</li><li>
Model classes can override model level generics generation. (Idea: Robert van Hoornaar)</li><li>
Contrib-26: Add support for AR Nested / NH Component mappings. Allow the ability to
specify a column prefix for active record. (thx: Adam Tybor)</li><li>
Optionally generates classes implementing INotifyPropertyChanged.</li><li>
Support for drag-drop from Server Explorer for MySQL databases. Requires MySQL Connector/Net
(5.1) (included). (Patch: Michael Morton)</li><li>
Support for custom types through IUserType. See http://support.castleproject.org/browse/CONTRIB-28#action_11456
for usage. (Patch: Ricardo Stuven)</li><li>
Ability to define a nested class with a different property name than the nested class
(Idea: Craig Neuwirt)</li></ul>
Fixed:<br /><ul><li>
Contrib-23: Produces CascadeEnum instead of ManyRelationCascadeEnum</li><li>
Ability to generate virtual properties to support Lazy properly (thx: Ayende)</li><li>
Make sure that Char and AnsiChar types are treated as a System.String types, instead
of System.Char types (patch: Ayende)</li><li>
HasAndbelongToMany does not take custom property names and not found behavior into
account.</li><li>
Can’t add a Many To Many relationship to 2 entities when the Class and Table names
are different.</li><li>
Column keys in many-to-one relations is not optional. (Patch: Robert van Hoornaar)</li><li>
Partially fixing NHibernate code generation errors. Now works with a workaround.</li><li>
Nullable types only when NotNull=false (Patch: Ricardo Stuven)</li><li>
Changed to Castle.Components.Validator</li></ul>
And just one more thing. Someone asked me if ActiveWriter is a competitor for Linq
to SQL. AW is just a servent of the heavyweight champion, NHibernate/AR combo. Linq
to SQL is competing with NHibernate. I didn't have time to examine Linq to SQL designer,
but it's built using DSL Tools just like ActiveWriter so some functionality should
be alike. Other than that it's the framework, not the tools, important.<br /><img width="0" height="0" src="http://altinoren.com/aggbug.ashx?id=bcc67590-f893-4281-85c2-1889ca1c6520" /></body>
      <title>Fresh from the trunk: ActiveWriter Preview 3</title>
      <guid isPermaLink="false">http://altinoren.com/PermaLink,guid,bcc67590-f893-4281-85c2-1889ca1c6520.aspx</guid>
      <link>http://altinoren.com/PermaLink,guid,bcc67590-f893-4281-85c2-1889ca1c6520.aspx</link>
      <pubDate>Thu, 14 Jun 2007 08:29:25 GMT</pubDate>
      <description>&lt;p&gt;
&lt;/p&gt;
&lt;a href="http://altinoren.com/content/binary/ActiveWriter%20Preview%203.rar"&gt;This&lt;/a&gt; was
sitting on the trunk for a while because of a bug in NHibernate config generation.
I believe it's fixed now, so let's see if it works :)&lt;br&gt;
&lt;br&gt;
First of all, this release is trying to be compatible with Castle trunk, it may generate
code usable by released Castle components but it follows recent changes (might miss
a few days). You know, Castle will be 1.0 one day and ActiveWriter will be a release,
not a preview, in that day.&lt;br&gt;
&lt;br&gt;
And I'm trying create some documentation on &lt;a href="http://using.castleproject.org/display/Contrib/ActiveWriter"&gt;using.castleproject.org&lt;/a&gt; (Castle's
wiki) to make &lt;a href="http://hammett.castleproject.org/"&gt;Hammett&lt;/a&gt; stop whining
about the lack of documentation of contrib projects (kidding!). If you're using ActiveWriter
and want to share your tips, tricks, workarounds or anything about it, it would be
great if you contribute to the documentation.&lt;br&gt;
&lt;br&gt;
The most important update is the direct NHibernate configuration support. Now you
can instruct ActiveWriter to generate NHibernate configuration files (.hbm.xml) for
each entity in your model. Generated classes won't have ActiveRecord attributes in
this case. More on this in a later post (&lt;font color="#ff0000"&gt;Update:&lt;/font&gt; &lt;a href="http://altinoren.com/PermaLink,guid,7043a882-8325-4e48-b956-54868219297c.aspx"&gt;here&lt;/a&gt;).&lt;br&gt;
&lt;br&gt;
&lt;img src="content/binary/NHibernateGeneration.png" border="0"&gt;
&lt;br&gt;
&lt;br&gt;
Another interesting change is the use of Castle.Components.Validator instead of the
ActiveRecord validators. AR changed in the trunk to use it, so does ActiveWriter.&lt;br&gt;
&lt;br&gt;
&lt;img src="http://altinoren.com/content/binary/CastleValidators.png" border="0"&gt;
&lt;br&gt;
&lt;br&gt;
One more exiciting news is, you can drag tables of MySQL from Server Explorer onto
the modelin surface (see Michael's patch below).&lt;br&gt;
&lt;br&gt;
Full list of changes below. A big thanks to all who sent patches, ideas and bug reports.&lt;br&gt;
&lt;br&gt;
New:&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
Now optionally generates NHibernate hbm.xml files.&lt;/li&gt;
&lt;li&gt;
Namespace in generated code is now customizable (Idea: Robert van Hoornaar)&lt;/li&gt;
&lt;li&gt;
Imports in generated code is now customizable (Idea: Robert van Hoornaar)&lt;/li&gt;
&lt;li&gt;
Model classes can override model level base class definition. (Patch: Robert van Hoornaar)&lt;/li&gt;
&lt;li&gt;
Model classes can override model level generics generation. (Idea: Robert van Hoornaar)&lt;/li&gt;
&lt;li&gt;
Contrib-26: Add support for AR Nested / NH Component mappings. Allow the ability to
specify a column prefix for active record. (thx: Adam Tybor)&lt;/li&gt;
&lt;li&gt;
Optionally generates classes implementing INotifyPropertyChanged.&lt;/li&gt;
&lt;li&gt;
Support for drag-drop from Server Explorer for MySQL databases. Requires MySQL Connector/Net
(5.1) (included). (Patch: Michael Morton)&lt;/li&gt;
&lt;li&gt;
Support for custom types through IUserType. See http://support.castleproject.org/browse/CONTRIB-28#action_11456
for usage. (Patch: Ricardo Stuven)&lt;/li&gt;
&lt;li&gt;
Ability to define a nested class with a different property name than the nested class
(Idea: Craig Neuwirt)&lt;/li&gt;
&lt;/ul&gt;
Fixed:&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
Contrib-23: Produces CascadeEnum instead of ManyRelationCascadeEnum&lt;/li&gt;
&lt;li&gt;
Ability to generate virtual properties to support Lazy properly (thx: Ayende)&lt;/li&gt;
&lt;li&gt;
Make sure that Char and AnsiChar types are treated as a System.String types, instead
of System.Char types (patch: Ayende)&lt;/li&gt;
&lt;li&gt;
HasAndbelongToMany does not take custom property names and not found behavior into
account.&lt;/li&gt;
&lt;li&gt;
Can’t add a Many To Many relationship to 2 entities when the Class and Table names
are different.&lt;/li&gt;
&lt;li&gt;
Column keys in many-to-one relations is not optional. (Patch: Robert van Hoornaar)&lt;/li&gt;
&lt;li&gt;
Partially fixing NHibernate code generation errors. Now works with a workaround.&lt;/li&gt;
&lt;li&gt;
Nullable types only when NotNull=false (Patch: Ricardo Stuven)&lt;/li&gt;
&lt;li&gt;
Changed to Castle.Components.Validator&lt;/li&gt;
&lt;/ul&gt;
And just one more thing. Someone asked me if ActiveWriter is a competitor for Linq
to SQL. AW is just a servent of the heavyweight champion, NHibernate/AR combo. Linq
to SQL is competing with NHibernate. I didn't have time to examine Linq to SQL designer,
but it's built using DSL Tools just like ActiveWriter so some functionality should
be alike. Other than that it's the framework, not the tools, important.&lt;br&gt;
&lt;img width="0" height="0" src="http://altinoren.com/aggbug.ashx?id=bcc67590-f893-4281-85c2-1889ca1c6520" /&gt;</description>
      <category>ActiveWriter</category>
      <category>Castle</category>
      <category>Code Generation</category>
      <category>O/RM</category>
    </item>
    <item>
      <trackback:ping>http://altinoren.com/Trackback.aspx?guid=75929ea9-d788-462f-9dbd-630a7832734b</trackback:ping>
      <pingback:server>http://altinoren.com/pingback.aspx</pingback:server>
      <pingback:target>http://altinoren.com/PermaLink,guid,75929ea9-d788-462f-9dbd-630a7832734b.aspx</pingback:target>
      <dc:creator>Gokhan Altinoren</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">Ayende, in his <a href="http://ayende.com/Blog/archive/2007/05/08/What-lurks-in-the-dark-corners-of-the-Castle.aspx">post</a> on
virtual entry barriers / learning curve of Castle pieces, said:<br /><blockquote><i>One of the main differences between OSS and Commercial software is
the amount of time that is invested in the frills. Active Record and NHibernate has
a <a href="activewriter/">designer</a>, which is nice, but it is not a level 1 priority
to any of the people using either Active Record or NHibernate. The reason is that
both those frameworks were built knowing that a designer is not something that you
should need in order to work with them.</i><br /></blockquote>That is, of course, super true for MonoRail and when I started working
on ActiveWriter, I said "ActiveRecord is so simple, no one gonna use a code generator
for it". Now I think somewhat different, in the context of O/RM designers.<br /><br />
When I think of working with ActiveRecord, I see it in two different parts. First
is the sceleton of an entity; all the attributes tagging the class, properties and
fields to describe the model to ActiveRecord and then NHibernate, eventually.<br /><br /><!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs20     [ActiveRecord()]\par ??    \cf2 public\cf0  \cf2 partial\cf0  \cf2 class\cf0  ClassWithPK : ActiveRecordBase \{\par ??        \par ??        \cf2 private\cf0  \cf2 int\cf0  _primaryKeyProperty;\par ??        \par ??        [PrimaryKey(PrimaryKeyType.Native, ColumnType=\cf13 "Int32"\cf0 , Params=\cf13 "params"\cf0 , UnsavedValue=\cf13 "unsavedValue"\cf0 )]\par ??        \cf2 public\cf0  \cf2 int\cf0  PrimaryKeyProperty \{\par ??            \cf2 get\cf0  \{\par ??                \cf2 return\cf0  \cf2 this\cf0 ._primaryKeyProperty;\par ??            \}\par ??            \cf2 set\cf0  \{\par ??                \cf2 this\cf0 ._primaryKeyProperty = \cf2 value\cf0 ;\par ??            \}\par ??        \}\par ??    \}}
--><div style="background: white none repeat scroll 0% 50%; font-family: Courier New; font-size: 10pt; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><p style="margin: 0px;">
    [ActiveRecord()]
</p><p style="margin: 0px;">
    <span style="color: blue;">public</span><span style="color: blue;">partial</span><span style="color: blue;">class</span> Entity
: ActiveRecordBase {
</p><p style="margin: 0px;">
 
</p><p style="margin: 0px;">
        <span style="color: blue;">private</span><span style="color: blue;">int</span> _key;
</p><p style="margin: 0px;">
 
</p><p style="margin: 0px;">
        [PrimaryKey(PrimaryKeyType.Native, ColumnType=<span style="color: maroon;">"Int32"</span>)]
</p><p style="margin: 0px;">
        <span style="color: blue;">public</span><span style="color: blue;">int</span> Key
{
</p><p style="margin: 0px;">
            <span style="color: blue;">get</span> {
</p><p style="margin: 0px;">
                <span style="color: blue;">return</span><span style="color: blue;">this</span>._key;
</p><p style="margin: 0px;">
            }
</p><p style="margin: 0px;">
            <span style="color: blue;">set</span> {
</p><p style="margin: 0px;">
                <span style="color: blue;">this</span>._key
= <span style="color: blue;">value</span>;
</p><p style="margin: 0px;">
            }
</p><p style="margin: 0px;">
        }
</p><p style="margin: 0px;">
    }
</p></div><br />
This code is a no brainer to write and AR has quite good <a href="http://www.castleproject.org/activerecord/documentation/trunk/">documentation</a> to
get you there easily. But it's so repetative that it's the perfect place for using
a designer. I don't say that people using ActiveRecord should forget all the attributes
to define an entity alltogether, but once you studied the underlying workings of the
framework I believe even the most basic framework can use a designer when it comes
to the brute force part of the code. After all, you are designing some entitities
and that's what a designer do best.<br /><br />
One problem here is that it's not easy to modify this kind of generated code. Thanks
to 2.0, partial classes help great when adding new functionality, but it's impossible
to modify generated getters and setters. DSL Tools is using the term "double derived"
for the approach used to solve this problem, use an inherited empty entity instead
of the original one around to make it possible to override properties. This model
works fine in DSL Tools context but might make real world entities complicated. This
one and solutions like this which makes code more bloated are, I believe, the dark
side of code generating designers.<br /><br />
There is also the process of giving the entity some brains; validation, query helper
etc. I, again, can see the value of a designer here. ActiveWriter can generate entities
with ActiveRecord validators (and there's a JIRA entry waiting to port it to Castle
validators). Thanks to his permission, I'll integrate Ayende's Generator into ActiveWriter
to make it generate code with all the typed query functionality but ActiveWriter of
course won't be writing the query.<br /><br />
The other part of working with ActiveRecord is knowing what the framework gives you,
what does it do on behalf, what are the list of things to know beforehand to know
before it starts persisting. You should know about lazy loading, order of saving,
inverse relations etc. This is the point when you instruct the framework to manage
what you designed before, and I think where a designer should keep it's hands off.
ActiveWriter, and tools alike, should help developers to define metadata. They should
not act like metadata manipulators to do the programming. I consider Ayende's comments
above true in this part of the usage. A good O/RM designer should work without getting
the way, and shouldn't make the user careless by doing the thinking on behalf.<br /><p></p><img width="0" height="0" src="http://altinoren.com/aggbug.ashx?id=75929ea9-d788-462f-9dbd-630a7832734b" /></body>
      <title>Designers for ORM Tools?</title>
      <guid isPermaLink="false">http://altinoren.com/PermaLink,guid,75929ea9-d788-462f-9dbd-630a7832734b.aspx</guid>
      <link>http://altinoren.com/PermaLink,guid,75929ea9-d788-462f-9dbd-630a7832734b.aspx</link>
      <pubDate>Wed, 09 May 2007 14:42:35 GMT</pubDate>
      <description>Ayende, in his &lt;a href="http://ayende.com/Blog/archive/2007/05/08/What-lurks-in-the-dark-corners-of-the-Castle.aspx"&gt;post&lt;/a&gt; on
virtual entry barriers / learning curve of Castle pieces, said:&lt;br&gt;
&lt;blockquote&gt;&lt;i&gt;One of the main differences between OSS and Commercial software is
the amount of time that is invested in the frills. Active Record and NHibernate has
a &lt;a href="activewriter/"&gt;designer&lt;/a&gt;, which is nice, but it is not a level 1 priority
to any of the people using either Active Record or NHibernate. The reason is that
both those frameworks were built knowing that a designer is not something that you
should need in order to work with them.&lt;/i&gt;
&lt;br&gt;
&lt;/blockquote&gt;That is, of course, super true for MonoRail and when I started working
on ActiveWriter, I said "ActiveRecord is so simple, no one gonna use a code generator
for it". Now I think somewhat different, in the context of O/RM designers.&lt;br&gt;
&lt;br&gt;
When I think of working with ActiveRecord, I see it in two different parts. First
is the sceleton of an entity; all the attributes tagging the class, properties and
fields to describe the model to ActiveRecord and then NHibernate, eventually.&lt;br&gt;
&lt;br&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs20     [ActiveRecord()]\par ??    \cf2 public\cf0  \cf2 partial\cf0  \cf2 class\cf0  ClassWithPK : ActiveRecordBase \{\par ??        \par ??        \cf2 private\cf0  \cf2 int\cf0  _primaryKeyProperty;\par ??        \par ??        [PrimaryKey(PrimaryKeyType.Native, ColumnType=\cf13 "Int32"\cf0 , Params=\cf13 "params"\cf0 , UnsavedValue=\cf13 "unsavedValue"\cf0 )]\par ??        \cf2 public\cf0  \cf2 int\cf0  PrimaryKeyProperty \{\par ??            \cf2 get\cf0  \{\par ??                \cf2 return\cf0  \cf2 this\cf0 ._primaryKeyProperty;\par ??            \}\par ??            \cf2 set\cf0  \{\par ??                \cf2 this\cf0 ._primaryKeyProperty = \cf2 value\cf0 ;\par ??            \}\par ??        \}\par ??    \}}
--&gt;
&lt;div style="background: white none repeat scroll 0% 50%; font-family: Courier New; font-size: 10pt; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;
&lt;p style="margin: 0px;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [ActiveRecord()]
&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;partial&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; Entity
: ActiveRecordBase {
&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;int&lt;/span&gt; _key;
&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [PrimaryKey(PrimaryKeyType.Native, ColumnType=&lt;span style="color: maroon;"&gt;"Int32"&lt;/span&gt;)]
&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;int&lt;/span&gt; Key
{
&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;get&lt;/span&gt; {
&lt;/p&gt;
&lt;p style="margin: 0px;"&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; &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;this&lt;/span&gt;._key;
&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;set&lt;/span&gt; {
&lt;/p&gt;
&lt;p style="margin: 0px;"&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; &lt;span style="color: blue;"&gt;this&lt;/span&gt;._key
= &lt;span style="color: blue;"&gt;value&lt;/span&gt;;
&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/p&gt;
&lt;/div&gt;
&lt;br&gt;
This code is a no brainer to write and AR has quite good &lt;a href="http://www.castleproject.org/activerecord/documentation/trunk/"&gt;documentation&lt;/a&gt; to
get you there easily. But it's so repetative that it's the perfect place for using
a designer. I don't say that people using ActiveRecord should forget all the attributes
to define an entity alltogether, but once you studied the underlying workings of the
framework I believe even the most basic framework can use a designer when it comes
to the brute force part of the code. After all, you are designing some entitities
and that's what a designer do best.&lt;br&gt;
&lt;br&gt;
One problem here is that it's not easy to modify this kind of generated code. Thanks
to 2.0, partial classes help great when adding new functionality, but it's impossible
to modify generated getters and setters. DSL Tools is using the term "double derived"
for the approach used to solve this problem, use an inherited empty entity instead
of the original one around to make it possible to override properties. This model
works fine in DSL Tools context but might make real world entities complicated. This
one and solutions like this which makes code more bloated are, I believe, the dark
side of code generating designers.&lt;br&gt;
&lt;br&gt;
There is also the process of giving the entity some brains; validation, query helper
etc. I, again, can see the value of a designer here. ActiveWriter can generate entities
with ActiveRecord validators (and there's a JIRA entry waiting to port it to Castle
validators). Thanks to his permission, I'll integrate Ayende's Generator into ActiveWriter
to make it generate code with all the typed query functionality but ActiveWriter of
course won't be writing the query.&lt;br&gt;
&lt;br&gt;
The other part of working with ActiveRecord is knowing what the framework gives you,
what does it do on behalf, what are the list of things to know beforehand to know
before it starts persisting. You should know about lazy loading, order of saving,
inverse relations etc. This is the point when you instruct the framework to manage
what you designed before, and I think where a designer should keep it's hands off.
ActiveWriter, and tools alike, should help developers to define metadata. They should
not act like metadata manipulators to do the programming. I consider Ayende's comments
above true in this part of the usage. A good O/RM designer should work without getting
the way, and shouldn't make the user careless by doing the thinking on behalf.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://altinoren.com/aggbug.ashx?id=75929ea9-d788-462f-9dbd-630a7832734b" /&gt;</description>
      <category>Castle</category>
      <category>Code Generation</category>
      <category>Custom Tool</category>
      <category>O/RM</category>
    </item>
    <item>
      <trackback:ping>http://altinoren.com/Trackback.aspx?guid=f6183355-03a6-4666-b743-18a8b2d1c243</trackback:ping>
      <pingback:server>http://altinoren.com/pingback.aspx</pingback:server>
      <pingback:target>http://altinoren.com/PermaLink,guid,f6183355-03a6-4666-b743-18a8b2d1c243.aspx</pingback:target>
      <dc:creator>Gokhan Altinoren</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">Both about <a href="http://www.castleproject.org/monorail/index.html">MonoRail</a>,
actually.<br /><ul><li><a href="http://colinramsay.co.uk">Colin</a> talks about two <a href="http://www.castleproject.org/others/contrib/index.html">Castle
Contrib</a> projects, <a href="http://blog.eleutian.com/PermaLink,guid,088e158b-cd3c-4920-8df5-a3628013cc1d.aspx">CodeGenerator</a> and
ActiveWriter: His <a href="http://colinramsay.co.uk/2007/04/23/castle-contrib-screencast-five/">Screencast
Five</a>.<br /></li><li><a href="http://www.ayende.com/">Ayende</a> talks about MonoRail and differences between
MR and Web Forms: His <a href="http://www.ayende.com/hibernating-rhinos.aspx">Hibernating
Rhinos #2</a>.<br /></li></ul>
Seeing your work used in screencasts is priceless.<br /><p></p><img width="0" height="0" src="http://altinoren.com/aggbug.ashx?id=f6183355-03a6-4666-b743-18a8b2d1c243" /></body>
      <title>Two Screencasts Featuring ActiveWriter</title>
      <guid isPermaLink="false">http://altinoren.com/PermaLink,guid,f6183355-03a6-4666-b743-18a8b2d1c243.aspx</guid>
      <link>http://altinoren.com/PermaLink,guid,f6183355-03a6-4666-b743-18a8b2d1c243.aspx</link>
      <pubDate>Wed, 25 Apr 2007 08:57:28 GMT</pubDate>
      <description>Both about &lt;a href="http://www.castleproject.org/monorail/index.html"&gt;MonoRail&lt;/a&gt;,
actually.&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://colinramsay.co.uk"&gt;Colin&lt;/a&gt; talks about two &lt;a href="http://www.castleproject.org/others/contrib/index.html"&gt;Castle
Contrib&lt;/a&gt; projects, &lt;a href="http://blog.eleutian.com/PermaLink,guid,088e158b-cd3c-4920-8df5-a3628013cc1d.aspx"&gt;CodeGenerator&lt;/a&gt; and
ActiveWriter: His &lt;a href="http://colinramsay.co.uk/2007/04/23/castle-contrib-screencast-five/"&gt;Screencast
Five&lt;/a&gt;.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.ayende.com/"&gt;Ayende&lt;/a&gt; talks about MonoRail and differences between
MR and Web Forms: His &lt;a href="http://www.ayende.com/hibernating-rhinos.aspx"&gt;Hibernating
Rhinos #2&lt;/a&gt;.&lt;br&gt;
&lt;/li&gt;
&lt;/ul&gt;
Seeing your work used in screencasts is priceless.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://altinoren.com/aggbug.ashx?id=f6183355-03a6-4666-b743-18a8b2d1c243" /&gt;</description>
      <category>ActiveWriter</category>
      <category>Castle</category>
      <category>MonoRail</category>
    </item>
    <item>
      <trackback:ping>http://altinoren.com/Trackback.aspx?guid=3dfeb699-8e2e-43a1-a7cf-25b98831b0ee</trackback:ping>
      <pingback:server>http://altinoren.com/pingback.aspx</pingback:server>
      <pingback:target>http://altinoren.com/PermaLink,guid,3dfeb699-8e2e-43a1-a7cf-25b98831b0ee.aspx</pingback:target>
      <dc:creator>Gokhan Altinoren</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">I was using a private SVN for ActiveWriter
and thanks to <a href="http://hammett.castleproject.org/">Hammet</a>, the source is
now available through <a href="http://www.castleproject.org/others/contrib/index.html">Castle
Contrib Repository</a>.<br />
Having source on an open repository is great. AW now has it's own <a href="http://www.ohloh.net/projects/4668">Ohloh
page</a> :)<br /><ul><li>
Codebase: <span id="cocomo_loc">27,938</span> LOC (Most of them generated by DSL Tools,
actually:)<br /></li><li>
Effort (est.): <span id="cocomo_years">7</span> Person Years</li><li>
Project Cost: $<span id="cocomo_value">362,806</span></li></ul><span id="cocomo_value">I feel good! :)<br /></span><p></p><img width="0" height="0" src="http://altinoren.com/aggbug.ashx?id=3dfeb699-8e2e-43a1-a7cf-25b98831b0ee" /></body>
      <title>ActiveWriter Source  Moved to Castle Contrib Repository</title>
      <guid isPermaLink="false">http://altinoren.com/PermaLink,guid,3dfeb699-8e2e-43a1-a7cf-25b98831b0ee.aspx</guid>
      <link>http://altinoren.com/PermaLink,guid,3dfeb699-8e2e-43a1-a7cf-25b98831b0ee.aspx</link>
      <pubDate>Mon, 12 Mar 2007 10:11:10 GMT</pubDate>
      <description>I was using a private SVN for ActiveWriter and thanks to &lt;a href="http://hammett.castleproject.org/"&gt;Hammet&lt;/a&gt;,
the source is now available through &lt;a href="http://www.castleproject.org/others/contrib/index.html"&gt;Castle
Contrib Repository&lt;/a&gt;.&lt;br&gt;
Having source on an open repository is great. AW now has it's own &lt;a href="http://www.ohloh.net/projects/4668"&gt;Ohloh
page&lt;/a&gt; :)&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
Codebase: &lt;span id="cocomo_loc"&gt;27,938&lt;/span&gt; LOC (Most of them generated by DSL Tools,
actually:)&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
Effort (est.): &lt;span id="cocomo_years"&gt;7&lt;/span&gt; Person Years&lt;/li&gt;
&lt;li&gt;
Project Cost: $&lt;span id="cocomo_value"&gt;362,806&lt;/span&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;span id="cocomo_value"&gt;I feel good! :)&lt;br&gt;
&lt;/span&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://altinoren.com/aggbug.ashx?id=3dfeb699-8e2e-43a1-a7cf-25b98831b0ee" /&gt;</description>
      <category>ActiveWriter</category>
      <category>Castle</category>
      <category>SVN</category>
    </item>
    <item>
      <trackback:ping>http://altinoren.com/Trackback.aspx?guid=5bb4372a-4cef-41e5-b67a-0afd5143a3f7</trackback:ping>
      <pingback:server>http://altinoren.com/pingback.aspx</pingback:server>
      <pingback:target>http://altinoren.com/PermaLink,guid,5bb4372a-4cef-41e5-b67a-0afd5143a3f7.aspx</pingback:target>
      <dc:creator>Gokhan Altinoren</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">Go visit <a href="http://www.castleproject.org/">www.castleproject.org</a> and
get the lates bits.<br /><br />
The amount of information there is increadible, MonoRail getting started docs are
extremely helpful for me. After seeing "<a href="http://www.castleproject.org/activerecord/gettingstarted/index.html">Getting
Started with ActiveRecord</a>" topic, you will have no excuse not to use ActiveRecord
in your next project. And API documentation is just what I need for ActiveWriter's
properties window documentation :)<br /><br />
The question is, will I manage to release something new with ActiveWriter to celebrate
the Castle release and the hard work these guys doing? Let's see:<br /><p></p><img src="http://altinoren.com/content/binary/awtoolbox.JPG" border="0" /><br /><br />
Although implementing the toolwindow above turned out to be harder than I thought,
I was actually referring to generics support in ActiveWriter, which is still waiting
my attention. So, I'll try to hurry++ and sleep--;<br /><img width="0" height="0" src="http://altinoren.com/aggbug.ashx?id=5bb4372a-4cef-41e5-b67a-0afd5143a3f7" /></body>
      <title>Castle Project is close to RTM</title>
      <guid isPermaLink="false">http://altinoren.com/PermaLink,guid,5bb4372a-4cef-41e5-b67a-0afd5143a3f7.aspx</guid>
      <link>http://altinoren.com/PermaLink,guid,5bb4372a-4cef-41e5-b67a-0afd5143a3f7.aspx</link>
      <pubDate>Wed, 01 Nov 2006 19:58:57 GMT</pubDate>
      <description>Go visit &lt;a href="http://www.castleproject.org/"&gt;www.castleproject.org&lt;/a&gt; and get
the lates bits.&lt;br&gt;
&lt;br&gt;
The amount of information there is increadible, MonoRail getting started docs are
extremely helpful for me. After seeing "&lt;a href="http://www.castleproject.org/activerecord/gettingstarted/index.html"&gt;Getting
Started with ActiveRecord&lt;/a&gt;" topic, you will have no excuse not to use ActiveRecord
in your next project. And API documentation is just what I need for ActiveWriter's
properties window documentation :)&lt;br&gt;
&lt;br&gt;
The question is, will I manage to release something new with ActiveWriter to celebrate
the Castle release and the hard work these guys doing? Let's see:&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img src="http://altinoren.com/content/binary/awtoolbox.JPG" border="0"&gt;
&lt;br&gt;
&lt;br&gt;
Although implementing the toolwindow above turned out to be harder than I thought,
I was actually referring to generics support in ActiveWriter, which is still waiting
my attention. So, I'll try to hurry++ and sleep--;&lt;br&gt;
&lt;img width="0" height="0" src="http://altinoren.com/aggbug.ashx?id=5bb4372a-4cef-41e5-b67a-0afd5143a3f7" /&gt;</description>
      <category>Castle</category>
    </item>
  </channel>
</rss>