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

<channel>
	<title>blog.dervalp.com &#187; ASP.NET</title>
	<atom:link href="http://blog.dervalp.com/tag/aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dervalp.com</link>
	<description>Think before Programming (Public learning)</description>
	<lastBuildDate>Sat, 20 Mar 2010 22:22:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ASP.NET MVC : Url Helper Extension CSS, Javascript, Picture</title>
		<link>http://blog.dervalp.com/2009/05/29/aspnet-mvc-url-helper-extension-css-javascript-picture/</link>
		<comments>http://blog.dervalp.com/2009/05/29/aspnet-mvc-url-helper-extension-css-javascript-picture/#comments</comments>
		<pubDate>Fri, 29 May 2009 20:16:56 +0000</pubDate>
		<dc:creator>dervalp</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[helper]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Url]]></category>

		<guid isPermaLink="false">http://blog.dervalp.com/?p=303</guid>
		<description><![CDATA[Here a url helper, maybe it can interests you :


public static class UrlHelperExtension
{
public static string Image(this UrlHelper helper, string fileName)
{
return helper.Content(string.Format(&#34;~/Content/Images/{0}&#34;,fileName));
}

public static string Stylesheet(this UrlHelper helper, string fileName)
{
return helper.Content(string.Format(&#34;~/Content/Css/{0}.css&#34;,fileName));
}

public static string Javascript(this UrlHelper helper, string fileName)
{
return helper.Content(string.Format(&#34;~/Content/Scripts/{0}.js&#34;, fileName));
}
}

And here is how I use it :
For CSS :


&#60;link rel=&#34;stylesheet&#34; type=&#34;text/css&#34; href=&#34;&#60;%= Url.Stylesheet(&#34;reset&#34;) %&#62;&#34; media=&#34;all&#34; /&#62;

For javascript


&#60;script [...]]]></description>
			<content:encoded><![CDATA[<p>Here a url helper, maybe it can interests you :</p>
<pre class="brush: c;">

public static class UrlHelperExtension
{
public static string Image(this UrlHelper helper, string fileName)
{
return helper.Content(string.Format(&quot;~/Content/Images/{0}&quot;,fileName));
}

public static string Stylesheet(this UrlHelper helper, string fileName)
{
return helper.Content(string.Format(&quot;~/Content/Css/{0}.css&quot;,fileName));
}

public static string Javascript(this UrlHelper helper, string fileName)
{
return helper.Content(string.Format(&quot;~/Content/Scripts/{0}.js&quot;, fileName));
}
}
</pre>
<p>And here is how I use it :</p>
<p>For CSS :</p>
<pre class="brush: html;">

&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&lt;%= Url.Stylesheet(&quot;reset&quot;) %&gt;&quot; media=&quot;all&quot; /&gt;
</pre>
<p>For javascript</p>
<pre class="brush: html;">

&lt;script src=&quot;&lt;%= Url.Javascript(&quot;jquery-1.3.2.min&quot;) %&gt;&quot; type=&quot;text/javascript&quot; language=&quot;javascript&quot;&gt;&lt;/script&gt;
</pre>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d303').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d303" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.dervalp.com/2009/05/29/aspnet-mvc-url-helper-extension-css-javascript-picture/&amp;title=ASP.NET+MVC+%3A+Url+Helper+Extension+CSS%2C+Javascript%2C+Picture" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://blog.dervalp.com/2009/05/29/aspnet-mvc-url-helper-extension-css-javascript-picture/&amp;title=ASP.NET+MVC+%3A+Url+Helper+Extension+CSS%2C+Javascript%2C+Picture" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://blog.dervalp.com/2009/05/29/aspnet-mvc-url-helper-extension-css-javascript-picture/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://blog.dervalp.com/2009/05/29/aspnet-mvc-url-helper-extension-css-javascript-picture/&amp;title=ASP.NET+MVC+%3A+Url+Helper+Extension+CSS%2C+Javascript%2C+Picture" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://blog.dervalp.com/2009/05/29/aspnet-mvc-url-helper-extension-css-javascript-picture/&amp;title=ASP.NET+MVC+%3A+Url+Helper+Extension+CSS%2C+Javascript%2C+Picture" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://blog.dervalp.com/2009/05/29/aspnet-mvc-url-helper-extension-css-javascript-picture/&amp;title=ASP.NET+MVC+%3A+Url+Helper+Extension+CSS%2C+Javascript%2C+Picture" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+ASP.NET+MVC+%3A+Url+Helper+Extension+CSS%2C+Javascript%2C+Picture+@+http://blog.dervalp.com/2009/05/29/aspnet-mvc-url-helper-extension-css-javascript-picture/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://blog.dervalp.com/2009/05/29/aspnet-mvc-url-helper-extension-css-javascript-picture/&amp;t=ASP.NET+MVC+%3A+Url+Helper+Extension+CSS%2C+Javascript%2C+Picture" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d303').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d303').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://blog.dervalp.com/2009/05/29/aspnet-mvc-url-helper-extension-css-javascript-picture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kiwi MVC.NET : Why this, why that ? I explain my architecture choices Part 5 [source on codeplex]</title>
		<link>http://blog.dervalp.com/2009/05/29/kiwi-mvcnet-why-this-why-that-i-explain-my-architecture-choices-part-5/</link>
		<comments>http://blog.dervalp.com/2009/05/29/kiwi-mvcnet-why-this-why-that-i-explain-my-architecture-choices-part-5/#comments</comments>
		<pubDate>Fri, 29 May 2009 18:26:39 +0000</pubDate>
		<dc:creator>dervalp</dc:creator>
				<category><![CDATA[Kiwi MVC]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[MVC.NET]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://blog.dervalp.com/?p=283</guid>
		<description><![CDATA[So, I work hard these days to  finish my data access. I would like to explain you how I see application&#8217;s design.
As I told you before, I want to separate my application in 3 parts. I know that architecture could be discussed but I would make this point clear, it should be &#8220;re-factored&#8221;. Anyway, for [...]]]></description>
			<content:encoded><![CDATA[<p>So, I work hard these days to  finish my data access. I would like to explain you how I see application&#8217;s design.</p>
<p>As I told you before, I want to separate my application in 3 parts. I know that architecture could be discussed but I would make this point clear, it should be &#8220;re-factored&#8221;. Anyway, for the moment, I think it is enough flexible for what I want to do <span style="text-decoration: underline;">NOW</span>.</p>
<p>Here is a reminder of my layers:</p>
<ul>
<li>The Web application which will be the view of my application.</li>
</ul>
<ul>
<li>The controller with all my business logic embedded in a library Service.</li>
</ul>
<ul>
<li>The model library which will contain my models, my data access (repository) and all my filter static classes.</li>
</ul>
<h2><span id="more-283"></span></h2>
<p>To improve my explanations, I hand draw a little pseudo UML diagram :</p>
<p><img class="alignnone size-full wp-image-287" title="kiwi_mvc_pseudo_uml" src="http://blog.dervalp.com/wp-content/uploads/2009/05/kiwi_mvc_pseudo_uml.jpg" alt="kiwi_mvc_pseudo_uml" width="805" height="626" /></p>
<p>What I want it is to keep as much as I can the &#8220;Soc&#8221; (separation of concern). My service should make what a service should do and if I want to change my repository with a Oracle one, I could change it only by modifying the instantiation of my service (with DI for the future). I want to keep that &#8220;philosophy&#8221; all along the development but philosophy is not obligation.</p>
<p>In the same way, you&#8217;ve certainly noticed that I often return an IQueryable for my &#8220;get&#8221; method (see listing 1). I know this should be better to return a List type cause it is a more &#8220;standard&#8221; and you do not have to use the Linq library. Nevertheless I think I will keep it. I do not want to call to often the .IEnumerable function and also it will be easier to use my filter classes.</p>
<p>As the only developer for this application, I assume my choices. <img src='http://blog.dervalp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  If you have remarks about this, please leave a comment.</p>
<p>Listing 1 : Example of the getPages method who retreive all the page from my db</p>
<pre class="brush: c;">

public IQueryable&lt;Page&gt; getPages()
{

return from p in _db.Posts
where p.Type == &quot;Page&quot;
let lp = getLocalizedPages(p.PostID)
select new Page
{
PageID = p.PostID,
Author = p.Author,
Date = p.Date,
PageLozalized = new LazyList&lt;PageLocalized&gt;(lp),
ModifiedDate = p.ModifiedDate,
Password = p.Password ?? string.Empty,
Permalink = p.Permalink,
Status = p.PostStatusID,
Version = p.RevisionOf

};
}

private IQueryable&lt;PageLocalized&gt; getLocalizedPages(int postID)
{
return from lp in _db.PostCultureDetails
where lp.PostID == postID
select new PageLocalized()
{
Description = lp.Excerpt,
Text = lp.Text,
Title = lp.Title,
LanguageCode = (from culture in _db.Cultures
where culture.CultureID == lp.CultureID
select culture.LanguageCode).SingleOrDefault()

};

}
</pre>
<p><strong>Why I did not use Entity framework ?</strong> I hate when the framework decide for me which object I should use. Also, the time I would spend to make it work as I want is doubtless longer than the time I wrote my custom Linq to Sql Class. Entity framework could be great for simple application but for an application who will grow in the future (as I expect Kiwi will do) I do not think it&#8217;s a good choice.</p>
<p><strong>Why I did not use NHibernate ? </strong>I could have chosen NHibernate, but I absolutely wanted to play with Linq. Also, maybe in the future I could make the data access with it and compare what&#8217;s better for my application. Anyway, this is not the time to do this.</p>
<p>If you have other questions like this, please, do not hesitate.</p>
<p><strong>And now the service :<br />
</strong></p>
<p>As I mentioned, my data access is almost finished (for the moment). I am going to create the services I need for my application. Evidently, always in a TDD approach.</p>
<p><strong>Kiwi Part 4 was bullshit :</strong></p>
<p>Maybe it was but the aim of that post was to show you how to start with TDD. And I know that I was going in front of a wall. Indeed, I had an empty db and the post object was the most connected object. As you know in TDD, you write a test, you write <span style="text-decoration: underline;">some code</span>. I realized that I should have written a lot (before creating the &#8220;SaveFunction&#8221; for it). I needed the category object, the comment object,&#8230; Thus, I begin to create a save function for the category object (alway with a tdd style).</p>
<p>Create the test :</p>
<pre class="brush: text;">
//Spike Test !!!
[TestMethod]
public void SqlPostRepositoryTest_can_add_category()
{

Category category = new Category();
category.CreatedDate = DateTime.Now;
category.CategoryParentID = 0;
var categoryEn = new CategoryLocalized() {Description = &quot;This is a test&quot;, Value = &quot;Software Development&quot;, LangageCode = &quot;EN&quot;};
var categoryFR = new CategoryLocalized() { Description = &quot;Ceci est un test&quot;, Value = &quot;Développement Logiciel&quot;, LangageCode = &quot;FR&quot; };

var list = new LazyList&lt;CategoryLocalized&gt;();
list.Add(categoryEn);
list.Add(categoryFR);

category.LocalizedCategory = list;

_repository.Save(category);

Assert.IsNotNull(category);

}
</pre>
<p>And after the function I need :</p>
<pre class="brush: c;">

//save or add a category

public void Save (Category category)
{
var dbCategory = (from c in _db.Categories
where c.CategoryID == category.CategoryID
select c).SingleOrDefault();
if(dbCategory == null)
{
dbCategory = new SqlRepository.Category();
dbCategory.CreatedDate = DateTime.Now;
dbCategory.ParentID = category.CategoryParentID;
//commit the change to have the id and insert the culture
_db.Categories.InsertOnSubmit(dbCategory);
_db.SubmitChanges();

//foreach culture we have in the objec we add it in the table CategoryCultureDetail
foreach (CategoryLocalized item in category.LocalizedCategory)
{
var dbitem = new CategoryCultureDetail();
//some Object to DB
dbitem.CategoryID = dbCategory.CategoryID;
dbitem.Description = item.Description;
dbitem.Value = item.Value;
dbitem.CultureID =
(from culture in _db.Cultures
where culture.LanguageCode == item.LangageCode
select culture.CultureID).SingleOrDefault();
dbCategory.CategoryCultureDetails.Add(dbitem);
_db.SubmitChanges();
}

}
else
{

foreach (CategoryLocalized item in category.LocalizedCategory)
{
var thisCategoryLocalized = (from cn in _db.CategoryCultureDetails
where cn.CategoryID == category.CategoryID
where cn.CultureID ==   (from culture in _db.Cultures
where culture.LanguageCode == item.LangageCode
select culture.CultureID).SingleOrDefault()
select cn).SingleOrDefault();
thisCategoryLocalized.Description = item.Description;
thisCategoryLocalized.Value = item.Value;
_db.CategoryCultureDetails.InsertOnSubmit(thisCategoryLocalized);
_db.SubmitChanges();

}
}
}
</pre>
<p>Of course, you see the &#8220;final&#8221; result. To have that, I went by little piece of code. Test, write, build, test, write, build, test &#8230;</p>
<p>I also know the test you see above is not a unit test, it is more an integration test or a spike test and it will be deleted or commented in the future.</p>
<p>But the name is <span style="text-decoration: underline;">test driven </span>design and not &#8220;make pure unit test&#8221; design.</p>
<p>NOTE : I know I am saying that each time I post but I will try to add the source code in my codeplex project this afternoon.</p>
<p>UPDATE  : I put the source on code plex, if you would like to see it : http://dervalp.codeplex.com/</p>
<p>I have some troubles with codeplex, I will check this out tomorrow cause I am a bit tired today.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d283').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d283" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.dervalp.com/2009/05/29/kiwi-mvcnet-why-this-why-that-i-explain-my-architecture-choices-part-5/&amp;title=Kiwi+MVC.NET+%3A+Why+this%2C+why+that+%3F+I+explain+my+architecture+choices+Part+5+%5Bsource+on+codeplex%5D" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://blog.dervalp.com/2009/05/29/kiwi-mvcnet-why-this-why-that-i-explain-my-architecture-choices-part-5/&amp;title=Kiwi+MVC.NET+%3A+Why+this%2C+why+that+%3F+I+explain+my+architecture+choices+Part+5+%5Bsource+on+codeplex%5D" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://blog.dervalp.com/2009/05/29/kiwi-mvcnet-why-this-why-that-i-explain-my-architecture-choices-part-5/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://blog.dervalp.com/2009/05/29/kiwi-mvcnet-why-this-why-that-i-explain-my-architecture-choices-part-5/&amp;title=Kiwi+MVC.NET+%3A+Why+this%2C+why+that+%3F+I+explain+my+architecture+choices+Part+5+%5Bsource+on+codeplex%5D" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://blog.dervalp.com/2009/05/29/kiwi-mvcnet-why-this-why-that-i-explain-my-architecture-choices-part-5/&amp;title=Kiwi+MVC.NET+%3A+Why+this%2C+why+that+%3F+I+explain+my+architecture+choices+Part+5+%5Bsource+on+codeplex%5D" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://blog.dervalp.com/2009/05/29/kiwi-mvcnet-why-this-why-that-i-explain-my-architecture-choices-part-5/&amp;title=Kiwi+MVC.NET+%3A+Why+this%2C+why+that+%3F+I+explain+my+architecture+choices+Part+5+%5Bsource+on+codeplex%5D" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Kiwi+MVC.NET+%3A+Why+this%2C+why+that+%3F+I+explain+my+architecture+choices+Part+5+%5Bsource+on+codeplex%5D+@+http://blog.dervalp.com/2009/05/29/kiwi-mvcnet-why-this-why-that-i-explain-my-architecture-choices-part-5/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://blog.dervalp.com/2009/05/29/kiwi-mvcnet-why-this-why-that-i-explain-my-architecture-choices-part-5/&amp;t=Kiwi+MVC.NET+%3A+Why+this%2C+why+that+%3F+I+explain+my+architecture+choices+Part+5+%5Bsource+on+codeplex%5D" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d283').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d283').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://blog.dervalp.com/2009/05/29/kiwi-mvcnet-why-this-why-that-i-explain-my-architecture-choices-part-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kiwi MVC.NET : Let&#8217;s go to TDD ! Part 4</title>
		<link>http://blog.dervalp.com/2009/05/27/kiwi-mvc-lets-go-to-tdd-part-4/</link>
		<comments>http://blog.dervalp.com/2009/05/27/kiwi-mvc-lets-go-to-tdd-part-4/#comments</comments>
		<pubDate>Wed, 27 May 2009 20:24:28 +0000</pubDate>
		<dc:creator>dervalp</dc:creator>
				<category><![CDATA[Kiwi MVC]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[MVC.NET]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://blog.dervalp.com/?p=233</guid>
		<description><![CDATA[So, now that I have introduced TDD in my Agile Page. I will try to use it along all the development of Kiwi.

First, I add to my Test project, 3 folders.

ControllerTest : where I will put all my tests related with a controller.


TestRepositories : there I will create fake repositories, to know if my service [...]]]></description>
			<content:encoded><![CDATA[<p>So, now that I have introduced TDD in my Agile Page. I will try to use it along all the development of Kiwi.</p>
<h3><span id="more-233"></span></h3>
<p>First, I add to my Test project, 3 folders.</p>
<ul>
<li>ControllerTest : where I will put all my tests related with a controller.</li>
</ul>
<ul>
<li>TestRepositories : there I will create fake repositories, to know if my service will work with other repositories.</li>
</ul>
<ul>
<li>IntegrationTest : there I will put all my tests related with the repositories. It will contain some “Spike Test”.</li>
</ul>
<p><img class="alignnone size-full wp-image-258" title="tdd_projects" src="http://blog.dervalp.com/wp-content/uploads/2009/05/tdd_projects.jpg" alt="tdd_projects" width="347" height="269" /></p>
<p>Maybe, I will change this structure in the future.</p>
<p>For this example, you need to have the model Post. This model have some properties and one lazylist of PostLocalized.</p>
<pre class="brush: c;">

public class Post
{
public int PostID { get; set; }
public string Author { get; set; }
public string Status { get; set; }
public DateTime Date { get; set; }
public DateTime ModifiedDate { get; set; }
public string Version { get; set; }
public string Permalink { get; set; }
public string Password { get; set; }
public LazyList&lt;PostLocalized&gt; LocalizedPost { get; set; }
}
public class PostLocalized
{
public string Title { get; set; }
public string Text { get; set; }
public string Excerpt { get; set; }
public string LanguageCode { get; set; }
}
</pre>
<p>Back to the code, I want to create a test which return a list of post form the DB. I created a class SqlCMSRepositoryTest in my IntegrationTest folder.If I write the code in VS (like you can see in the picture here under) VS says me that the function GetAll() does not exsit. Without executing the test, I know that we have to create this function. Normally in a pure TDD way, you should try to rebuild and see if it succeed.  Of course, you will get an error. So, let&#8217;s correct it.</p>
<p><img class="alignnone size-full wp-image-261" title="kiwi_part4_0" src="http://blog.dervalp.com/wp-content/uploads/2009/05/kiwi_part4_0.jpg" alt="kiwi_part4_0" width="667" height="358" /></p>
<p>To correct it, I create a function GetPosts in the SqlCMSRepositories. Here is the code :</p>
<pre class="brush: c;">
using System.Collections.Generic;
using System.Linq;
using CMS.MVC.Data.SqlRepository;

namespace CMS.MVC.Data
{
public class SqlCMSRespository
{
//the name we changed in the properties of our Linq to Sql class
private DB _db;

//constructor
#region .ctor

//we instanciate the db when we instantciate the SqlCMSRespository
//default constructor
public SqlCMSRespository()
{
_db = new DB();
}

public SqlCMSRespository(DB dataContext)
{
//override the current context with the on passed in
//for TDD
_db = dataContext;
}

#endregion

#region Post

public IQueryable&lt;Post&gt; getPosts()
{
var res = new List&lt;Post&gt;();
return res.AsQueryable();
}

#endregion
}
}
</pre>
<p>When I try to build I receive error, indeed, I instantiated the SqlCMSRepositoryTest in place of the SqlCMSRepository. Also, I should add a reference to the data library and decorate the class with the attribute [TestClass]. Oh it is  a lot of mistakes, isn&#8217;t it ?</p>
<p>After correcting the code, I build the solution and I execute the test with this code :</p>
<pre class="brush: c;">

using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using CMS.MVC.Data;

namespace CMS.MVC.Web.Tests
{
[TestClass]
public class SqlCMSRepositoryTest
{
private SqlCMSRespository _repository;

/// &lt;summary&gt;
/// Loading the SqlCMSRepository each time we use the SqlCMSRespositoryTest
/// &lt;/summary&gt;
[TestInitialize]
public void Setup()
{
_repository = new SqlCMSRespository();
}

[TestMethod]
public void can_get_all_post()
{
List&lt;Post&gt; PostList = _repository.getPosts().ToList();
Assert.IsNotNull(PostList);
}

}
}
</pre>
<p>The test passes.</p>
<p><img class="alignnone size-full wp-image-262" title="kiwi_part4_2" src="http://blog.dervalp.com/wp-content/uploads/2009/05/kiwi_part4_2.jpg" alt="kiwi_part4_2" width="951" height="190" /></p>
<p>So, now I go beyond, I will create another test method. I would like to do the same test but count if there is 2 posts in the db post.</p>
<p>But my db is empty, so before, I write a test &#8220;can_create_post&#8221;.</p>
<pre class="brush: c;">
[TestMethod]
public void can_create_post()
{
Post thisPost = new Post();
thisPost.Author = &quot;dervalp&quot;;
thisPost.Date = DateTime.Now;
thisPost.ModifiedDate = DateTime.Now;
thisPost.Password = string.Empty;
thisPost.Permalink = string.Empty;
thisPost.Version = string.Empty;
thisPost.Status = &quot;Post&quot;;

PostLocalized PostContentEN = new PostLocalized();
PostContentEN.Excerpt = &quot;This is a resum&quot;;
PostContentEN.LanguageCode = &quot;EN&quot;;
PostContentEN.Title = &quot;Titre du post&quot;;
PostContentEN.Text = &quot;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot;;
var ListLocalizedPost = new LazyList&lt;PostLocalized&gt;();
ListLocalizedPost.Add(PostContentEN);
thisPost.LocalizedPost = ListLocalizedPost;

//create the post in the db
_repository.Add(thisPost);

//It the application throw an exception the test will fail
Assert.IsNotNull(thisPost);

}
</pre>
<p>&#8220;thisPost&#8221; is never null but if it will throw you an exception if your test fails. So, I rebuild and execute the test. It fails.</p>
<p>To succeed the test, I add the function, Add() in my SqlCMSRespository :</p>
<pre class="brush: c;">
public void Add(Post post)
{

}
</pre>
<p>So now, I execute the test and It succeeds. As I am stupid, I will create another test. I will make the have_post_one_item_in_db.</p>
<pre class="brush: c;">

[TestMethod]
public void have_post_one_item_in_db()
{
var res = _repository.getPosts();

Assert.AreEqual(1, res.Count());
}
</pre>
<p>Of course, it fails. So to make this test passes, I have to adapt my function add.</p>
<p>I think, you understand the idea now. I will update this post with a more complete SqlCMSRespository class.</p>
<p>Feedback is welcome.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d233').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d233" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.dervalp.com/2009/05/27/kiwi-mvc-lets-go-to-tdd-part-4/&amp;title=Kiwi+MVC.NET+%3A+Let%26%238217%3Bs+go+to+TDD+%21+Part+4" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://blog.dervalp.com/2009/05/27/kiwi-mvc-lets-go-to-tdd-part-4/&amp;title=Kiwi+MVC.NET+%3A+Let%26%238217%3Bs+go+to+TDD+%21+Part+4" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://blog.dervalp.com/2009/05/27/kiwi-mvc-lets-go-to-tdd-part-4/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://blog.dervalp.com/2009/05/27/kiwi-mvc-lets-go-to-tdd-part-4/&amp;title=Kiwi+MVC.NET+%3A+Let%26%238217%3Bs+go+to+TDD+%21+Part+4" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://blog.dervalp.com/2009/05/27/kiwi-mvc-lets-go-to-tdd-part-4/&amp;title=Kiwi+MVC.NET+%3A+Let%26%238217%3Bs+go+to+TDD+%21+Part+4" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://blog.dervalp.com/2009/05/27/kiwi-mvc-lets-go-to-tdd-part-4/&amp;title=Kiwi+MVC.NET+%3A+Let%26%238217%3Bs+go+to+TDD+%21+Part+4" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Kiwi+MVC.NET+%3A+Let%26%238217%3Bs+go+to+TDD+%21+Part+4+@+http://blog.dervalp.com/2009/05/27/kiwi-mvc-lets-go-to-tdd-part-4/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://blog.dervalp.com/2009/05/27/kiwi-mvc-lets-go-to-tdd-part-4/&amp;t=Kiwi+MVC.NET+%3A+Let%26%238217%3Bs+go+to+TDD+%21+Part+4" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d233').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d233').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://blog.dervalp.com/2009/05/27/kiwi-mvc-lets-go-to-tdd-part-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kiwi MVC.NET : Prepare your data access Part3</title>
		<link>http://blog.dervalp.com/2009/05/26/kiwi-mvc-prepare-your-data-access/</link>
		<comments>http://blog.dervalp.com/2009/05/26/kiwi-mvc-prepare-your-data-access/#comments</comments>
		<pubDate>Tue, 26 May 2009 20:03:45 +0000</pubDate>
		<dc:creator>dervalp</dc:creator>
				<category><![CDATA[Kiwi MVC]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[DB]]></category>
		<category><![CDATA[Localized]]></category>
		<category><![CDATA[MVC.NET]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://blog.dervalp.com/?p=196</guid>
		<description><![CDATA[So, I decide to rebuild a new solution. I will carry on the membership layer later cause I want a system who could use Sql, Active Directory or OpenID for the login and only use Sql for the membership role. I have an idea to do that but as I told you in a previous [...]]]></description>
			<content:encoded><![CDATA[<p>So, I decide to rebuild a new solution. I will carry on the membership layer later cause I want a system who could use Sql, Active Directory or OpenID for the login and only use Sql for the membership role. I have an idea to do that but as I told you in a previous post, a security layer is a kind of plugin. Therefore, we could add it later.</p>
<p>Today, I will show you how I am going to create the models and prepare my data access with the help of LinqToSql class.</p>
<p>I choose to make Kiwi multilingual.</p>
<h2><span id="more-196"></span></h2>
<h2>1) The DB</h2>
<p>I am not a dba, you are welcome with your feedback.</p>
<p>Here is the design I choose :</p>
<p><img class="alignnone size-full wp-image-206" title="kiwi_db" src="http://blog.dervalp.com/wp-content/uploads/2009/05/kiwi_db.jpg" alt="kiwi_db" width="833" height="780" /></p>
<h2>2) The models</h2>
<p>I decided to create five objects to begin the project. An object Post, Page, Comment, Tag and Category.</p>
<ul>
<li>The object Post : It is a content of a news (for the moment). A post must be in a category. There are status for this type. A post cannot have subposts. This object is localized</li>
</ul>
<ul>
<li>The object Page : It cannot be a part of a category, the page can have subpages. This object is localized and have the same status (puslihed, offline,&#8230;) than a post object.</li>
</ul>
<ul>
<li>The object Comment : A classic comment object, with the author name, the ip address,&#8230; A comment can have child (qutoes). This object is not localized (for the moment, we could think of an automatic translation but KISS).</li>
</ul>
<ul>
<li>The object Category :  This object contains the post. It is localized by the name.</li>
</ul>
<p>Example for Page:</p>
<p>I use the LazyList pattern (<a href="http://blog.wekeroad.com/blog/lazy-loading-with-the-lazylist/">more info here</a>). I will put the project on codeplex, like this, you will able to browse and download the code.</p>
<pre class="brush: c;">

namespace KIWI.MVC.Data
{
class Page
{
public int PageID { get; set; }
public string Author { get; set; }
public string Status { get; set; }
public DateTime Date { get; set; }
public DateTime ModifiedDate { get; set; }
public string Version { get; set; }
public string Permalink { get; set; }
public string Password { get; set; }
public LazyList&lt;Page&gt; PageChild{ get;set;}
public LazyList&lt;Page&gt; PageLozalized { get; set; }
}
public class PageLocalized
{
public string Title { get; set; }
public string Text { get; set; }
public string Excerpt { get; set; }
public string LanguageCode { get; set; }
}
}
</pre>
<h2>3) The SqlCMSRepository</h2>
<p>This repository will be the link between my object and my db. It will contain all the main method I need. I will always return an IQueryable type.  It will allow you to use the <a href="http://en.wikipedia.org/wiki/Pipes_and_filters">pipeline pattern</a> to create some filter functions.</p>
<ul>
<li>Create a LinqToSql class.</li>
</ul>
<p><img class="alignnone size-full wp-image-212" title="kiwi_linq_to_sql" src="http://blog.dervalp.com/wp-content/uploads/2009/05/kiwi_linq_to_sql.jpg" alt="kiwi_linq_to_sql" width="683" height="414" /></p>
<p>After creating the linq to sql class, drop the table you need from the server explorer of visual studio to the dml file.</p>
<p><img class="alignnone size-full wp-image-215" title="kiwi_class_cms" src="http://blog.dervalp.com/wp-content/uploads/2009/05/kiwi_class_cms.jpg" alt="kiwi_class_cms" width="253" height="323" /></p>
<p>You will have the representation of you db (like the first page of this post). After, change some properties of you LinqCMSRespository class. Double clik on the LinqCMDRespository.dbml and right click on the screen where your tables appear. Here change the Name to &#8220;DB&#8221;. It is only to use the same name for you future dbml and improve the visibilty of your code.</p>
<p><img class="alignnone size-full wp-image-216" title="kiwi_class_linq_properties" src="http://blog.dervalp.com/wp-content/uploads/2009/05/kiwi_class_linq_properties.jpg" alt="kiwi_class_linq_properties" width="311" height="253" /></p>
<p>Build you solution to see if everything goes well.</p>
<p>If you have built successfully, then create you SqlCMSRespository class.</p>
<p>Here is the code :</p>
<pre class="brush: c;">
using CMS.MVC.Data.SqlRepository;

namespace CMS.MVC.Data
{
class SqlCMSRespository
{
//the name we changed in the properties of our Linq to Sql class
private DB _db;

//constructor
#region .ctor

//we instanciate the db when we instantciate the SqlCMSRespository
//default constructor
public SqlCMSRespository()
{
_db = new DB();
}

public SqlCMSRespository(DB dataContext)
{
//override the current context with the on passed in
//for TDD
_db = dataContext;
}

#endregion

#region Post
//there we will put our main functions like GetPost(),...
//But before, let's go to TDD !!!!
//TEST DRIVEN DESIGN
#endregion
}
}
</pre>
<p>Now we are able to begin all our data access method but before writing some code in your repository, we&#8217;ll go with the TDD approach.<br />
And by creating our tests, we will see what we need in our application.</p>
<p>So this is the end for today, as usual, feedback and comments are very appreciated.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d196').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d196" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.dervalp.com/2009/05/26/kiwi-mvc-prepare-your-data-access/&amp;title=Kiwi+MVC.NET+%3A+Prepare+your+data+access+Part3" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://blog.dervalp.com/2009/05/26/kiwi-mvc-prepare-your-data-access/&amp;title=Kiwi+MVC.NET+%3A+Prepare+your+data+access+Part3" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://blog.dervalp.com/2009/05/26/kiwi-mvc-prepare-your-data-access/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://blog.dervalp.com/2009/05/26/kiwi-mvc-prepare-your-data-access/&amp;title=Kiwi+MVC.NET+%3A+Prepare+your+data+access+Part3" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://blog.dervalp.com/2009/05/26/kiwi-mvc-prepare-your-data-access/&amp;title=Kiwi+MVC.NET+%3A+Prepare+your+data+access+Part3" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://blog.dervalp.com/2009/05/26/kiwi-mvc-prepare-your-data-access/&amp;title=Kiwi+MVC.NET+%3A+Prepare+your+data+access+Part3" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Kiwi+MVC.NET+%3A+Prepare+your+data+access+Part3+@+http://blog.dervalp.com/2009/05/26/kiwi-mvc-prepare-your-data-access/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://blog.dervalp.com/2009/05/26/kiwi-mvc-prepare-your-data-access/&amp;t=Kiwi+MVC.NET+%3A+Prepare+your+data+access+Part3" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d196').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d196').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://blog.dervalp.com/2009/05/26/kiwi-mvc-prepare-your-data-access/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kiwi MVC.NET : Authentication Layer, introduction Part2</title>
		<link>http://blog.dervalp.com/2009/05/14/kiwi-mvc-authentication-layer-introduction-part2/</link>
		<comments>http://blog.dervalp.com/2009/05/14/kiwi-mvc-authentication-layer-introduction-part2/#comments</comments>
		<pubDate>Thu, 14 May 2009 12:47:20 +0000</pubDate>
		<dc:creator>dervalp</dc:creator>
				<category><![CDATA[Kiwi MVC]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Membership]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Provider]]></category>
		<category><![CDATA[Role]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://blog.dervalp.com/?p=100</guid>
		<description><![CDATA[I know it is a bit weird to begin a CMS application by implementing a Membership system but the simple raison why I start up with that is because I needed for my work (as you can see in my previous post ).
Too often, I saw developers rewriting their own membership system in place to [...]]]></description>
			<content:encoded><![CDATA[<p>I know it is a bit weird to begin a CMS application by implementing a Membership system but the simple raison why I start up with that is because I needed for my work (as you can see in <a href="http://blog.dervalp.com/2009/05/12/azam-adam-abracanabram-%C2%BB-is-harry-potter-a-dotnet-developer-part-1-membershipprovider/" target="_blank">my previous post</a> ).</p>
<p>Too often, I saw developers rewriting their own membership system in place to use what the framework (no matter which one) can offer.</p>
<h2><span id="more-100"></span></h2>
<p>It is the main raison why I choose to implement the ASP.NET Membership system in Kiwi.  It has a lot of interesting functionalities but on the other hand it is like riding a big monster.  Thus, I am going to use it as pluggableas as I can do.</p>
<h2>The User Object :</h2>
<p>Today, creating an object called User is being strange. If you want to choose the OOP way, a user is often too generic. If you developed an e-commerce, you will certainly choose customer in place of user. But a customer and an admin can login in your system, so are-you going to create two objects? One called “customer” and the other called “vip”? That sounds weird no?</p>
<p>Here is my point of view. A membership system is for me an additional layer you can implement (or not). It is not the hearth of your application; it is just a security layer. That why I am going to use it without any &#8220;User&#8221; object.  I saw 3 mains services that a Membership system could offer :</p>
<ul>
<li> authentication (who is this guy)</li>
<li>personalization (what the guy like)</li>
<li>authorization (what the guy can do)</li>
</ul>
<h2>Sql membership :</h2>
<p>We saw in one of <a href="http://blog.dervalp.com/2009/05/12/azam-adam-abracanabram-%C2%BB-is-harry-potter-a-dotnet-developer-part-1-membershipprovider/" target="_blank">my previous post</a> that ASP.NET has 2 differents way to manage the membership layer. There we saw the active directory membership provider. Today, we will use the SqlMembershipProvider.</p>
<p>First, to use Sql membership you need a sql server with a database up. Therefore, I went to the Microsoft website to download Sql Server 2008 express and I installed it.</p>
<p>I create an empty db called Kiwi.</p>
<p>Then in the folder &#8220;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727&#8243;, I execute the aspnet_regsql.exe and provide the right information to allow the connection to the database. Finish the setup and let’s take a look on the database called Kiwi:</p>
<p><img class="alignnone size-full wp-image-105" title="kiwi_part2_1" src="http://blog.dervalp.com/wp-content/uploads/2009/05/kiwi_part2_1.jpg" alt="kiwi_part2_1" width="413" height="488" /></p>
<p>Now, I configure the Webconfig to use the SqlMemberShipProvider with my application.<br />
Here is the connection string I added to my webconfig file:</p>
<p><img class="alignnone size-full wp-image-107" title="kiwi_part2_2" src="http://blog.dervalp.com/wp-content/uploads/2009/05/kiwi_part2_2.jpg" alt="kiwi_part2_2" width="604" height="100" /></p>
<p>To test if everything works well,</p>
<p>Change the name of the connection string under membership to make the connection with your db.</p>
<p><img class="alignnone size-full wp-image-108" title="kiwi_part2_3" src="http://blog.dervalp.com/wp-content/uploads/2009/05/kiwi_part2_3.jpg" alt="kiwi_part2_3" width="590" height="336" /></p>
<p>Now make a test, go to the ASP.NET configuration when you are on your MVC.WEB in your website.</p>
<p><img class="alignnone size-full wp-image-109" title="kiwi_part2_4" src="http://blog.dervalp.com/wp-content/uploads/2009/05/kiwi_part2_4.jpg" alt="kiwi_part2_4" width="243" height="445" /></p>
<p>You will enter in the Web Site Administation Tool :</p>
<p><img class="alignnone size-full wp-image-110" title="kiwi_part2_5" src="http://blog.dervalp.com/wp-content/uploads/2009/05/kiwi_part2_5.jpg" alt="kiwi_part2_5" width="628" height="381" /></p>
<p>If you click on Security you will access a page where you can manage the users, the roles and the access rules.<br />
For the test, click on the “Create User” link and create one :<br />
<img class="alignnone size-full wp-image-111" title="kiwi_part2_6" src="http://blog.dervalp.com/wp-content/uploads/2009/05/kiwi_part2_6.jpg" alt="kiwi_part2_6" width="570" height="308" /></p>
<p>Create the user and go to the server explorer on your Visual Studio. If you do not have a connection to your db yet in server explorer, add it.</p>
<p><img class="alignnone size-full wp-image-112" title="kiwi_part2_7" src="http://blog.dervalp.com/wp-content/uploads/2009/05/kiwi_part2_7.jpg" alt="kiwi_part2_7" width="347" height="508" /></p>
<p>On the table aspnet_Users, right-click on Show Table Data and you will see the user you created above.</p>
<p><img class="alignnone size-full wp-image-113" title="kiwi_part2_8" src="http://blog.dervalp.com/wp-content/uploads/2009/05/kiwi_part2_8.jpg" alt="kiwi_part2_8" width="628" height="62" /></p>
<p>Cool stuff isn’t it ?<br />
Now we have a db called Kiwi with some tables created by the .NET framwork.<br />
The web application can connect to the Kiwi database and you are now able to manage user with the ASP.NET administation tools.</p>
<p>In the next post : I will begin to code with the Test driven design approach. I will create the different layer we need in our repository to make the authentication working.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d100').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d100" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.dervalp.com/2009/05/14/kiwi-mvc-authentication-layer-introduction-part2/&amp;title=Kiwi+MVC.NET+%3A+Authentication+Layer%2C+introduction+Part2" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://blog.dervalp.com/2009/05/14/kiwi-mvc-authentication-layer-introduction-part2/&amp;title=Kiwi+MVC.NET+%3A+Authentication+Layer%2C+introduction+Part2" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://blog.dervalp.com/2009/05/14/kiwi-mvc-authentication-layer-introduction-part2/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://blog.dervalp.com/2009/05/14/kiwi-mvc-authentication-layer-introduction-part2/&amp;title=Kiwi+MVC.NET+%3A+Authentication+Layer%2C+introduction+Part2" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://blog.dervalp.com/2009/05/14/kiwi-mvc-authentication-layer-introduction-part2/&amp;title=Kiwi+MVC.NET+%3A+Authentication+Layer%2C+introduction+Part2" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://blog.dervalp.com/2009/05/14/kiwi-mvc-authentication-layer-introduction-part2/&amp;title=Kiwi+MVC.NET+%3A+Authentication+Layer%2C+introduction+Part2" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Kiwi+MVC.NET+%3A+Authentication+Layer%2C+introduction+Part2+@+http://blog.dervalp.com/2009/05/14/kiwi-mvc-authentication-layer-introduction-part2/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://blog.dervalp.com/2009/05/14/kiwi-mvc-authentication-layer-introduction-part2/&amp;t=Kiwi+MVC.NET+%3A+Authentication+Layer%2C+introduction+Part2" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d100').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d100').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://blog.dervalp.com/2009/05/14/kiwi-mvc-authentication-layer-introduction-part2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8220;AZAM, ADAM, Abracanabram&#8221; ! Is Harry Potter a dotnet developer?</title>
		<link>http://blog.dervalp.com/2009/05/12/azam-adam-abracanabram-%c2%bb-is-harry-potter-a-dotnet-developer-part-1-membershipprovider/</link>
		<comments>http://blog.dervalp.com/2009/05/12/azam-adam-abracanabram-%c2%bb-is-harry-potter-a-dotnet-developer-part-1-membershipprovider/#comments</comments>
		<pubDate>Tue, 12 May 2009 19:53:04 +0000</pubDate>
		<dc:creator>dervalp</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Active Directory MemberShip Provider]]></category>
		<category><![CDATA[ADAM]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[AZAM]]></category>
		<category><![CDATA[Membership Provider]]></category>

		<guid isPermaLink="false">http://blog.dervalp.com/?p=39</guid>
		<description><![CDATA[
Well, with all the acronyms which exist in the software development world, Harry Potter should have found a lot of words for his magic formulas. Today, I will explain you two of them, AZAM and ADAM.


The ASP.NET Membership Provider

 In my opinion, membership provider of ASP.NET provides a good abstraction for the authentication and the [...]]]></description>
			<content:encoded><![CDATA[<p><!--[endif]--></p>
<p class="MsoNormal"><span>Well, with all the acronyms which exist in the software development world, Harry Potter should have found a lot of words for his magic formulas. Today, I will explain you two of them, AZAM and ADAM.</span></p>
<h2 class="MsoNormal"><span><span id="more-39"></span><br />
</span></h2>
<h2 class="MsoNormal"><span>The ASP.NET Membership Provider<br />
</span></h2>
<p class="MsoNormal"><span> In my opinion</span><span>, <a href="http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx" target="_blank">membership provider of ASP.NET</a> provides a good abstraction for the authentication and the authorization. Moreover, I guess it is enough flexible that you can use it almost all the time. Thus, stop implementing your own custom authentication layer to make something that the framework does better than you and begin to learn it. </span></p>
<p class="MsoNormal"><span>Note : If you have cases where Membership provider cannot be use, please, share us your experience and leave a comment. </span></p>
<ul>
<li><span><a href="http://msdn.microsoft.com/en-us/library/system.web.security.sqlmembershipprovider.aspx" target="_blank">The SqlMembershipProvider</a> (absolutely needs a Sql Server database for working; Sql Express per default).</span></li>
<li><span><a href="http://msdn.microsoft.com/en-us/library/system.web.security.activedirectorymembershipprovider.aspx" target="_blank">The ActiveDirectoryMembershipProvider</a>.</span></li>
</ul>
<p><span>Today, we will focus on ActiveDirectory Membership Provider; I will show you how to setup the ActiveDirectoryMembershipProvider, use Authorization Manager (Azman) as role provider and give you an introduction of Active Directory Application Mode (ADAM). Of course, to use ActiveDirectoryMembershipProvider, you need a domain controller (2003 SP2). It is not my aim to show you how to configure a DC, so I assume you have it up.</span></p>
<p><span><br />
If you only need an active directory authentication with no role managment, here is a post of my friend Mike who explains how to use Active Directory for the authentication with the new framework MVC (<a href="http://helios.ca/2009/05/04/aspnet-mvc-forms-authentication-with-active-directory/" target="_blank">http://helios.ca/2009/05/04/aspnet-mvc-forms-authentication-with-active-directory/</a>).</span></p>
<h2><span>Setting up Active Directory Membership Provider:</span></h2>
<h3><span>1. Add a ldap connection string to you Active Directory:</span></h3>
<p><span>Note : I assume you have the read permissions to your Active Directory.</span></p>
<p><span>If like me, you are sometimes a bit loss with active directory and the ldap protocol, here is a good tip to ensure a valid connection string. <a href="http://support.microsoft.com/kb/892777" target="_blank">Download the Windows Server 2003 Support tools: Windows Server 2003 Service Pack 1 Support Tools</a> and run the ADSIEDIT.MSC (per default in C:/ProgramFile/Support Tools). This tool allows you to see the structure of your Active Directory and it helps to make valid ldap connection string.</span></p>
<p><span>By default, you should see: DC = test, DC=mydomain, DC=COM. This is the first part of the connection string. Here is the first part of the connection string &#8220;test.mydomain.com&#8221;.<br />
After that, you should see objects as OU (organization unit) or CN (common name). If you expend the node DC=test, DC=mydomain. DC=COM, you will see all the OUs and the CNs of your active directory.  Normally, you should see the CN=Users or the OU User Accounts. When you have located where all your users are, you can now gathering the objects to make a valid LDAP connection string. </span></p>
<p><span>And here is the result: “LDAP://test.mydomain.com/CN=Users,DC=test,DC=mydomain,DC=com”.</span></p>
<p><span>So in you webconfig, you have to add this code :</span></p>
<p><span><img class="alignnone size-full wp-image-67" title="azam_adam1" src="http://blog.dervalp.com/wp-content/uploads/2009/05/azam_adam1.jpg" alt="azam_adam1" width="658" height="90" /><br />
</span></p>
<h3><span>2. Configure the active directory membership provider :</span></h3>
<p><span>Now that you have a connection between your webserver and your domain controller, you will now be able to use AD for the authentication. To enable the active directory membership provider with you application, add some links to your webconfig file. </span></p>
<p><span>Find the &lt;membership&gt; element in your webconfig and add this:</span></p>
<p><span><img class="alignnone size-full wp-image-68" title="azam_adam2" src="http://blog.dervalp.com/wp-content/uploads/2009/05/azam_adam2.jpg" alt="azam_adam2" width="658" height="179" /><br />
</span></p>
<p><span>More info here:<a href=" http://msdn.microsoft.com/en-us/library/whae3t94.aspx" target="_blank"> http://msdn.microsoft.com/en-us/library/whae3t94.aspx</a></span></p>
<h3><span>3. Wire Forms authentication with MemberShipProvider and your connection string :</span></h3>
<p><span>Add this code under the &lt;system.web&gt;</span></p>
<p><span><img class="alignnone size-full wp-image-70" title="azam_adam3" src="http://blog.dervalp.com/wp-content/uploads/2009/05/azam_adam3.jpg" alt="azam_adam3" width="700" height="107" /><br />
</span></p>
<p><span>To use forms authentication, your IIS must use anonymous access enabled.</span></p>
<p><span>For IIS 6.0 :</span></p>
<ul>
<li><span>Command run : inetmgr</span></li>
<li>Right-click “properties” on your website</li>
<li><span>Directory Security</span><span>-Edit and you will receive this screen : Check that Anonymous access is enabled</span></li>
</ul>
<p><span><img class="alignnone size-full wp-image-72" title="azam_adam4" src="http://blog.dervalp.com/wp-content/uploads/2009/05/azam_adam4.jpg" alt="azam_adam4" width="375" height="429" /><br />
</span></p>
<p><span>For IIS 7.0: <a href=" http://technet.microsoft.com/en-us/library/cc770966.aspx)" target="_blank">Here is the link</a>. </span></p>
<p><span>Note : To avoid storing a username and a password in a connection string, you can use IIS to manage that.  I hope I will have some time to write a post about that in the future.</span></p>
<h3><span>4. Taste it!</span></h3>
<p><span>Create a new MVC project and follow all the steps above, you should be now able to log you in with your active directory account.</span></p>
<p><span>Note : Here is the end of the first part, we saw the different methods to use ASP.NET Membership Provider and how to enable ActiveDirectory Membership provider. In next step, we will see how to use Authorization Manager and Active directory application mode.</span></p>
<h3><span>5. Active Directory Role manager :</span></h3>
<p><span>Now, that you have your authentication, you would expect an active directory role manager who retrieves the current user’s group information. Unfortunately, it does not exist. I saw interesting posts on the net <a href="(http://oricode.wordpress.com/2008/02/14/active-directory-role-provider/" target="_blank">(http://oricode.wordpress.com/2008/02/14/active-directory-role-provider/</a> and <a href="http://www.codeproject.com/KB/aspnet/active_directory_roles.aspx" target="_blank">http://www.codeproject.com/KB/aspnet/active_directory_roles.aspx</a> ) but I did not have the time to test it. It seems to sounds pretty good but if you search on MSDN, you will find that the &#8220;best practices&#8221; for Microsoft is using Azman.</span></p>
<h3>6. Authorization Manager:</h3>
<p>Azman or Authorization Manager “enables you to define individual operations, which can be grouped together to form tasks. You can then authorize roles to perform specific tasks and/or individual operations. AzMan provides an administration tool as a Microsoft Management Console (MMC) snap-in to manage roles, tasks, operations, and users. You can configure an AzMan policy store in an XML file, Active Directory, or in an Active Directory Application Mode (ADAM) store.” More info : <a href="http://msdn.microsoft.com/en-us/library/ms998336.aspx" target="_blank">here</a>.<br />
Here is a good “how to” from Msdn:<a href="http://msdn.microsoft.com/en-us/library/ms998336.aspx" target="_blank"> http://msdn.microsoft.com/en-us/library/ms998336.aspx</a><br />
Azman is installed with Windows Server 2003 SP1 and later. To use it with Windows XP, you need to install the Windows Server 2003 Administration Tools Pack (<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=e487f885-f0c7-436a-a392-25793a25bad7&amp;DisplayLang=en" target="_blank">here</a>).<br />
Managing role membership with AzMan is quite easy; you can use the snap-in to add roles and tasks in your application. You can also easily map Windows accounts with the roles you have defined. It can be used with an XML file or ADAM.</p>
<h4 style="padding-left: 30px;">Install The AzMan Snapin, install it :</h4>
<p>First, Install the Windows Server 2003 Administration Tools Pack, which you can download <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=e487f885-f0c7-436a-a392-25793a25bad7&amp;DisplayLang=en" target="_blank">here</a>. <span>If you have some difficulties to have this screen, please follow the <a href="http://msdn.microsoft.com/en-us/library/ms998336.aspx" target="_blank">guideline </a>from MSDN. </span>In a run command type : &#8220;azman.msc&#8221;, you’ll receive this window :</p>
<p><img class="alignnone size-full wp-image-74" title="azam_adam5" src="http://blog.dervalp.com/wp-content/uploads/2009/05/azam_adam5.jpg" alt="azam_adam5" width="628" height="440" /></p>
<h3 style="padding-left: 30px;">Developer Mode</h3>
<p>Right-Click “Authorization Manager”, “options”, choose “Developer Mode”.</p>
<h3 style="padding-left: 30px;">Create an Authorization Store</h3>
<p>Right Click “New Authorization Store” on “Authorization Manager”. Choose the XML file.</p>
<p><img class="alignnone size-full wp-image-75" title="azam_adam6" src="http://blog.dervalp.com/wp-content/uploads/2009/05/azam_adam6.jpg" alt="azam_adam6" width="430" height="299" /></p>
<p>Browse the directory you want the Xml to be stored.  For example: &lt;PathOfYourApplicationFolder\App_Data\Roles.xml.<br />
As soon as you have created your “Role Manager”, you should now create an application.<br />
Right-Click on roles.xml, create New Application:</p>
<p><img class="alignnone size-full wp-image-76" title="azam_adam7" src="http://blog.dervalp.com/wp-content/uploads/2009/05/azam_adam7.jpg" alt="azam_adam7" width="388" height="291" /></p>
<p>You have now a tree like this</p>
<p><img class="alignnone size-full wp-image-77" title="azam_adam8" src="http://blog.dervalp.com/wp-content/uploads/2009/05/azam_adam8.jpg" alt="azam_adam8" width="180" height="163" /></p>
<p>-    Expand the Definitions folder and then right click on Role Definition&#8230;<br />
-    Provide a name for the role “Admin”<br />
-    Right Click on Role Assignments and select Assign Role Assignment, check the box against Admin and click OK. This role should now be listed under Role Assignments node.<br />
-    Right-click on the role Admin and you can assign Users form Windows or Active Directory.<br />
-    Choose assign to active directory and choose a user.</p>
<h3 style="padding-left: 30px;">Use your authorization store with your application :</h3>
<p>Open you web.config and add the connection string to your XML :</p>
<p><img class="alignnone size-full wp-image-78" title="azam_adam9" src="http://blog.dervalp.com/wp-content/uploads/2009/05/azam_adam9.jpg" alt="azam_adam9" width="544" height="72" /></p>
<p>Enable Role Manager and configure the role provider :</p>
<p><img class="alignnone size-full wp-image-79" title="azam_adam10" src="http://blog.dervalp.com/wp-content/uploads/2009/05/azam_adam10.jpg" alt="azam_adam10" width="566" height="111" /></p>
<h3 style="padding-left: 30px;">Configure Role with your web.config :</h3>
<p>Under &#8220;Secured&#8221;</p>
<p><img class="alignnone size-full wp-image-80" title="azam_adam11" src="http://blog.dervalp.com/wp-content/uploads/2009/05/azam_adam11.jpg" alt="azam_adam11" width="566" height="98" /></p>
<p>Test your website and it should works. Try to login with a user account which is not a member of the role you decided. You should not have access, try the opposite and you should have access.</p>
<p>Note: After you add a role in your application authorization store, you certainly have noticed that it needs some times to be effective. Indeed, you have to restart the application or wait for a recycle. I did not find any solution for the moment but there should be a way to force it. If you have a solution, please leave me a comment.</p>
<h2><strong>6. Active directory application mode (ADAM)</strong></h2>
<p>Instead of using an xml with AzMan, you could use ADAM. The main quality is that you can have one instance for all your web application in place of a XML file for each one.<br />
The “How to” in Msdn is so clear that I prefer to give you the link in place of explaining eveything step by step.</p>
<p>Here is the link: <a href="http://msdn.microsoft.com/en-us/library/ms998331.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/ms998331.aspx</a>. I tried it and I succeed to work with ADAM using AzMan policy.</p>
<p>Note:  ADAM is not supported on Windows Vista.<strong><br />
</strong></p>
<p><span>As always, if you have corrections or remarks, leave me a comment. Thank you.</span></p>
<p><span><br />
</span></p>
<p><span><br />
</span></p>
<p><span><br />
</span></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d39').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d39" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.dervalp.com/2009/05/12/azam-adam-abracanabram-%c2%bb-is-harry-potter-a-dotnet-developer-part-1-membershipprovider/&amp;title=%26%238220%3BAZAM%2C+ADAM%2C+Abracanabram%26%238221%3B+%21+Is+Harry+Potter+a+dotnet+developer%3F" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://blog.dervalp.com/2009/05/12/azam-adam-abracanabram-%c2%bb-is-harry-potter-a-dotnet-developer-part-1-membershipprovider/&amp;title=%26%238220%3BAZAM%2C+ADAM%2C+Abracanabram%26%238221%3B+%21+Is+Harry+Potter+a+dotnet+developer%3F" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://blog.dervalp.com/2009/05/12/azam-adam-abracanabram-%c2%bb-is-harry-potter-a-dotnet-developer-part-1-membershipprovider/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://blog.dervalp.com/2009/05/12/azam-adam-abracanabram-%c2%bb-is-harry-potter-a-dotnet-developer-part-1-membershipprovider/&amp;title=%26%238220%3BAZAM%2C+ADAM%2C+Abracanabram%26%238221%3B+%21+Is+Harry+Potter+a+dotnet+developer%3F" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://blog.dervalp.com/2009/05/12/azam-adam-abracanabram-%c2%bb-is-harry-potter-a-dotnet-developer-part-1-membershipprovider/&amp;title=%26%238220%3BAZAM%2C+ADAM%2C+Abracanabram%26%238221%3B+%21+Is+Harry+Potter+a+dotnet+developer%3F" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://blog.dervalp.com/2009/05/12/azam-adam-abracanabram-%c2%bb-is-harry-potter-a-dotnet-developer-part-1-membershipprovider/&amp;title=%26%238220%3BAZAM%2C+ADAM%2C+Abracanabram%26%238221%3B+%21+Is+Harry+Potter+a+dotnet+developer%3F" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+%26%238220%3BAZAM%2C+ADAM%2C+Abracanabram%26%238221%3B+%21+Is+Harry+Potter+a+dotnet+developer%3F+@+http://blog.dervalp.com/2009/05/12/azam-adam-abracanabram-%c2%bb-is-harry-potter-a-dotnet-developer-part-1-membershipprovider/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://blog.dervalp.com/2009/05/12/azam-adam-abracanabram-%c2%bb-is-harry-potter-a-dotnet-developer-part-1-membershipprovider/&amp;t=%26%238220%3BAZAM%2C+ADAM%2C+Abracanabram%26%238221%3B+%21+Is+Harry+Potter+a+dotnet+developer%3F" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d39').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d39').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://blog.dervalp.com/2009/05/12/azam-adam-abracanabram-%c2%bb-is-harry-potter-a-dotnet-developer-part-1-membershipprovider/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Kiwi MVC.NET : Building the application Part1</title>
		<link>http://blog.dervalp.com/2009/05/08/kiwi-mvc-building-the-application-part1/</link>
		<comments>http://blog.dervalp.com/2009/05/08/kiwi-mvc-building-the-application-part1/#comments</comments>
		<pubDate>Fri, 08 May 2009 14:57:39 +0000</pubDate>
		<dc:creator>dervalp</dc:creator>
				<category><![CDATA[Kiwi MVC]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[MVC.NET]]></category>
		<category><![CDATA[SoC]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://www.blog.dervalp.com/?p=7</guid>
		<description><![CDATA[In this part, I am going to explain you how to setup an MVC .Net application.
I will tell you often &#8220;I am not a senior .Net developer&#8221;, I assume that I can make some faults and have totally wrong. If you think I am, do not hesitate to contact me at pierre@dervalp.com or leave me [...]]]></description>
			<content:encoded><![CDATA[<p>In this part, I am going to explain you how to setup an MVC .Net application.</p>
<p>I will tell you often &#8220;I am not a senior .Net developer&#8221;, I assume that I can make some faults and have totally wrong. If you think I am, do not hesitate to contact me at <a href="mailto:pierre@dervalp.com">pierre@dervalp.com</a> or leave me a comment in this blog. I would enjoy discussing with you. I am open-mind and I know I am far to know everything in software development. This blog would pretend to help people like me to find their way to make a MVC application using TDD and implement some well-known patterns.</p>
<h2><span id="more-7"></span></h2>
<h2>1.       Configuration</h2>
<p>Before you can start building websites with ASP.NET MVC, you need to install the following free software:</p>
<ul>
<li><!--[if !supportLists]--><span>.NET Framework version 3.5 with Service Pack 1</span></li>
<li><span>Visual Web Developer 2008 Express with Service Pack 1 </span></li>
<li><span style="font-size: 11pt; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;">ASP.NET MVC 1.0</span></li>
</ul>
<p>You can also download the Microsoft Webforms installer 2.0 beta which is a nice tool.</p>
<h2>2.       What is MVC Framework</h2>
<p>Microsoft is certainly better than me to explain this, so here is what they say:</p>
<p>ASP.NET MVC is a free and fully supported Microsoft framework for building web applications that use a model-view-controller pattern. Like ASP.NET Web Forms, ASP.NET MVC is built on the ASP.NET framework.</p>
<p>ASP.NET MVC provides the following benefits:</p>
<ul class="unIndentedList">
<li> Clear separation of concerns</li>
<li> Testability &#8211; support for Test-Driven Development</li>
<li> Fine-grained control over HTML and JavaScript</li>
<li> Intuitive URLs</li>
</ul>
<p>If you would like to know more in the pattern model-view-controller, I invite you to read these links (if you have others interesting link, please contact me and I will edit this post):</p>
<p>-          <a href="http://en.wikipedia.org/wiki/Model-view-controller">http://en.wikipedia.org/wiki/Model-view-controller</a></p>
<p>-          <a href="http://msdn.microsoft.com/en-us/library/ms978748.aspx">http://msdn.microsoft.com/en-us/library/ms978748.aspx</a></p>
<p><img class="aligncenter size-full wp-image-19" title="kiwi1-1" src="http://www.blog.dervalp.com/wp-content/uploads/2009/05/kiwi1-1.jpg" alt="kiwi1-1" width="322" height="163" /></p>
<h2>3.       Hey oh let&#8217;s go!</h2>
<p>I know I will not work under source control, we will see that later if I needed.</p>
<p>First step, Start you visual studio 2008, File -&gt; new -&gt; Project</p>
<p>You receive this tab:</p>
<p>-          I decided to call my CMS Kiwi because it sounds sunny and funny.</p>
<p>Name: Kiwi.MVC.web. I would take a pseudo naming convention for this project. I do not know if it is the better but if it does not fit in the future, we&#8217;ll change it but I do not think it is the most important thing for the moment.</p>
<p>Location: Personally, I work with an external hard drive where I put my sources. As I do not work in source control, I take a back-up every day and I send it to my Gmail. I know it&#8217;s a bit dirty&#8230;</p>
<p><img class="aligncenter size-full wp-image-22" title="kiwi1-2" src="http://www.blog.dervalp.com/wp-content/uploads/2009/05/kiwi1-2.jpg" alt="kiwi1-2" width="628" height="452" /></p>
<p>So, I create the project and VS pops up a window about creating a Unit Test Project:</p>
<p>This project will receive all my unit tests during the development</p>
<p>I change the name to /*My project name*/.MVC.Tests and let&#8217;s go&#8230;</p>
<p><img class="aligncenter size-full wp-image-24" title="kiwi1-3" src="http://www.blog.dervalp.com/wp-content/uploads/2009/05/kiwi1-3.jpg" alt="kiwi1-3" width="475" height="321" /></p>
<h2>4.       The Service project and the data project</h2>
<p>I know what I am going to do is not the best way but I feel comfortable with that.</p>
<p>I add a new class library called Kiwi.MVC.Data to receive my model and another called Kiwi.MVC.Services who will receive my services.</p>
<p>I clean a bit and here is the result:</p>
<p><img class="aligncenter size-full wp-image-25" title="kiwi1-4" src="http://www.blog.dervalp.com/wp-content/uploads/2009/05/kiwi1-4.jpg" alt="kiwi1-4" width="237" height="163" /></p>
<p>Before saving the solution, I would like to set up the behavior of VS. I want that VS stratup the project I am currently working on and not Kiwi.MVC.Web as it is by default. To do that, right click on your solution, properties and you receive that screen:</p>
<p><img class="aligncenter size-full wp-image-26" title="kiwi1-5" src="http://www.blog.dervalp.com/wp-content/uploads/2009/05/kiwi1-5.jpg" alt="kiwi1-5" width="628" height="386" /></p>
<p>In the Startup Project, use Current selection in place of Single startup project.</p>
<p>I try to build the solution and if it builds successfully, I have now an empty project ready to go&#8230;</p>
<p>You can find the source of the empty project in Codeplex : here <a href="http://dervalp.codeplex.com/">http://dervalp.codeplex.com</a></p>
<p>I am waiting for your feedback&#8230;</p>
<h2>5.      My opinion about MVC:</h2>
<p><em>&#8220;I have never like the webforms style of ASP.NET and this MVC framework is like a breath of fresh air for me. I used MVC pattern with Cakephp and I am very exited to discover all the possibilities of the ASP.NET MVC framework. I guess Microsoft is taking the right way to build powerfull web application while complying best practises.&#8221;</em></p>
<p><em></p>
<p></em></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d7').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d7" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.dervalp.com/2009/05/08/kiwi-mvc-building-the-application-part1/&amp;title=Kiwi+MVC.NET+%3A+Building+the+application+Part1" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://blog.dervalp.com/2009/05/08/kiwi-mvc-building-the-application-part1/&amp;title=Kiwi+MVC.NET+%3A+Building+the+application+Part1" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://blog.dervalp.com/2009/05/08/kiwi-mvc-building-the-application-part1/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://blog.dervalp.com/2009/05/08/kiwi-mvc-building-the-application-part1/&amp;title=Kiwi+MVC.NET+%3A+Building+the+application+Part1" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://blog.dervalp.com/2009/05/08/kiwi-mvc-building-the-application-part1/&amp;title=Kiwi+MVC.NET+%3A+Building+the+application+Part1" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://blog.dervalp.com/2009/05/08/kiwi-mvc-building-the-application-part1/&amp;title=Kiwi+MVC.NET+%3A+Building+the+application+Part1" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Kiwi+MVC.NET+%3A+Building+the+application+Part1+@+http://blog.dervalp.com/2009/05/08/kiwi-mvc-building-the-application-part1/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://blog.dervalp.com/2009/05/08/kiwi-mvc-building-the-application-part1/&amp;t=Kiwi+MVC.NET+%3A+Building+the+application+Part1" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://blog.dervalp.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d7').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d7').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://blog.dervalp.com/2009/05/08/kiwi-mvc-building-the-application-part1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
