<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Aqua Bird Consulting</title>
	
	<link>http://blog.aquabirdconsulting.com</link>
	<description>The Bird Is The Word</description>
	<lastBuildDate>Fri, 30 Jul 2010 13:10:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AquaBirdConsulting" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="aquabirdconsulting" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Asp.Net MVC ViewModel with AutoMapper</title>
		<link>http://blog.aquabirdconsulting.com/?p=317</link>
		<comments>http://blog.aquabirdconsulting.com/?p=317#comments</comments>
		<pubDate>Fri, 30 Jul 2010 13:10:57 +0000</pubDate>
		<dc:creator>Khalid</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.aquabirdconsulting.com/?p=317</guid>
		<description><![CDATA[Hello readers. It’s been a while because Aqua Bird Consulting has been doing some awesome work recently and I am finding it hard to sit down and write. But today I found some time, so you will get an experimental post about Asp.Net MVC and Automapper. This post is targeted toward those developers who use [...]]]></description>
			<content:encoded><![CDATA[<p>Hello readers. It’s been a while because Aqua Bird Consulting has been doing some awesome work recently and I am finding it hard to sit down and write. But today I found some time, so you will get an experimental post about Asp.Net MVC and Automapper.</p>
<p>This post is targeted toward those developers who use a ViewModel to as the foundation to their views. When using the ViewModel pattern there is always the pain of mapping. Mapping is central to any ViewModel pattern. You have your domain model that maps to your ViewModel, which is representative of your view. <strong>Before you continue reading I am assuming you are familiar with the basics of Asp.Net MVC.</strong></p>
<p>As of right now, Asp.Net MVC has no mapping library built in. This means you have two options: Map the objects yourself manually inside the controller action, or delegate it to a third party library like AutoMapper. I usually choose the later due to it’s ease and readability in code. </p>
<p>Let’s looks at the final product and I’ll explain what is happening from a high level. Below you will see two methods, one for a GET and one for a POST to show that I can map out to the view and in from a request.</p>
<pre code="csharp">    public class HomeController : MappingController
    {
        public ActionResult Index()
        {
            var person = new Person
                            {
                                Name = &quot;Khalid Abuhakmeh&quot;,
                                Address = new Address {City = &quot;Camp Hill&quot;, Street = &quot;111 November Dr&quot;}
                            };

            return ViewModel&lt;indexviewmodel&gt;(person);
        }

        [HttpPost]
        public ActionResult Index( [IndexViewModelMap] Person person)
        {
            return ViewModel&lt;indexviewmodel&gt;(person);
        }
    }</pre>
<p>You will notice two subtle differences about the code above. First of all, at the end of each action you notice that I call ViewModel&lt;IndexViewModel&gt;(person) instead of View(person). Secondly, in the second action I have an attribute of IndexViewModelMap. </p>
<p>The ViewModel method takes your domain model and maps it to the ViewModel you specify. All you have to do is specify AutoMapper map somewhere else in your code. What is the advantage of doing this? Well for one, your controllers have reduced noise, no more mapping things right in your controller action. Secondly, you still get to work with your domain objects and not have to worry about the ViewModels except for view purposes.</p>
<p>The IndexViewModelMap just tells Asp.Net MVC to use a ModelBinder designed to use AutoMapper. It takes the incoming IndexViewModel and maps it to the Person model. Now you can deal with your person object directly without knowing of your ViewModel.</p>
<h3></h3>
<blockquote>
<h3>What if my ViewModel has more than one domain model mapped to it?</h3>
</blockquote>
<p>Well I’ve thought of that. Rarely does a ViewModel simply map to one object. If I couldn’t handle that then there would be no point to this post. Check this out.</p>
<pre>   public ActionResult Complex()
        {
            var person = new Person
            {
                Name = &quot;Khalid Abuhakmeh&quot;,
                Address = new Address { City = &quot;Camp Hill&quot;, Street = &quot;111 November Dr&quot; }
            };

            var car = new Car()
                          {
                              Color = &quot;Black&quot;,
                              Make = &quot;Audi&quot;,
                              Model = &quot;A4&quot;
                          };

            return ViewModel<complexviewmodel>(person,car);
        }</pre>
<p>Now I am mapping two to infinity objects to your ViewModel. That is where the money is at, if I do say so myself. To get this working all you need is to define your AutoMapper Maps and you are ready to go. Let me show you what a Mapping class looks like.</p>
<pre>        public static void Person_To_ComplexViewModel()
        {
            AutoMapper.Mapper.CreateMap
<person , ComplexViewModel>()
                .ForMember(target =&gt; target.Name, opt =&gt; opt.MapFrom(source =&gt; source.Name))
                .ForMember(target =&gt; target.City, opt =&gt; opt.MapFrom(source =&gt; source.Address.City))
                .ForMember(target =&gt; target.Street, opt =&gt; opt.MapFrom(source =&gt; source.Address.Street));
        }</pre>
<p>That is easy right! </p>
<p>To see all of this code check it out at GitHub <a href="http://github.com/khalidabuhakmeh/AutoMapperExperiment">http://github.com/khalidabuhakmeh/AutoMapperExperiment</a>.</p>
<p>Let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aquabirdconsulting.com/?feed=rss2&amp;p=317</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Views for Easier Ajax (with JQuery)</title>
		<link>http://blog.aquabirdconsulting.com/?p=305</link>
		<comments>http://blog.aquabirdconsulting.com/?p=305#comments</comments>
		<pubDate>Sat, 15 May 2010 15:07:02 +0000</pubDate>
		<dc:creator>Khalid</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Routing]]></category>

		<guid isPermaLink="false">http://blog.aquabirdconsulting.com/?p=305</guid>
		<description><![CDATA[I tweeted Phil Haack a while ago asking for a new feature in Asp.Net MVC 3. That feature was JavaScript views. What the heck is a JavaScript View? Well first, let’s define what the problem is and then you will see how JavaScript views can be very helpful. Let&#8217;s look at how we make an [...]]]></description>
			<content:encoded><![CDATA[<p>I tweeted Phil Haack a while ago asking for a new feature in Asp.Net MVC 3. That feature was JavaScript views. What the heck is a JavaScript View? Well first, let’s define what the problem is and then you will see how JavaScript views can be very helpful. Let&#8217;s look at how we make an ajax request in JQuery</p>
<pre class="brush: jscript;">

$.ajax({
  url: &quot;test.html&quot;,
  cache: false,
  success: function(html){
    $(&quot;#results&quot;).append(html);
  }
});
</pre>
<p>Do you see a problem? You might not, because this is a valid statement. The problem is with the url property. It is hard coded to be &#8220;test.html&#8221; which might be ok for simple applications, but this can be problematic as your application gets larger.</p>
<h3>Asp.Net 4 (or 3.5) to the Rescue</h3>
<p>If you&#8217;ve been keeping up with Asp.Net then you know there is something new called routing. It allows you to define friendly urls. It is integral to Asp.Net MVC. From this point on, I will assume you know about Asp.Net MVC and routing. I have a complex site that has actions, several of which are purely for Ajax. The issue is that my routing scheme is still very experimental and I am still deciding on how to get the prettiest urls I can. What is very solid is the functionality each of these actions perform. So what is the challenge.</p>
<blockquote><p><strong>How do I dynamically inject urls into JavaScript by utilizing the Routes I have already defined?</strong></p></blockquote>
<p>Luckily the solution is very straightforward and easy to implement. Let&#8217;s look at how your JavaScript file might look like.</p>
<pre class="brush: jscript;">
&lt;%@ Page Language=&quot;C#&quot; Inherits=&quot;System.Web.Mvc.ViewPage&quot; %&gt;

$(document).ready(function() {
  $(&quot;.button&quot;).click(function() {
        $.ajax({
            type: &quot;POST&quot;,
            url: &quot;&lt;%= Url.Action(&quot;Ajax&quot;,&quot;Home&quot;) %&gt;&quot;,
            success: function(response){
            $(&quot;.result&quot;).html(response.message);
            }
        });
  });
});
</pre>
<p>Sweet right! Well it isn&#8217;t that easy. You have to set somethings up in your MVC project before this works.</p>
<h3>Step 1 &#8211; Create a Controller</h3>
<p>Create a controller specifically for handling dynamic JavaScript views.</p>
<pre class="brush: csharp;">

public class JsController : Controller    {

public ViewResult Index(string file)        {

return View(file);

}

}
</pre>
<p>Step 1 is complete. We need a controller so that a RequestContext is passed to our JavaScriptView, without this our views will bomb. Let&#8217;s move on to Step 2.</p>
<h3>Step 2 &#8211; Specify the Route</h3>
<pre class="brush: csharp;">

routes.MapRoute(

&quot;JavascriptViews&quot;,

&quot;js/{file}.js&quot;,

new { controller = &quot;Js&quot;, action = &quot;Index&quot;, file = UrlParameter.Optional });
</pre>
<p>We need this route, so that MVC handles requests and points them to our controller.</p>
<h3>Step 3 &#8211; Create Your JavaScript View and Link it</h3>
<p><img class="alignnone size-full wp-image-306" title="File Directory" src="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/05/5-15-2010-11-21-55-AM.png" alt="" width="192" height="127" /></p>
<p>Add a new view under a &#8220;Js&#8221; folder under the &#8220;Views&#8221; folder. That&#8217;s it! All you need now. You can start utilizing the tools inside of Asp.Net MVC to start generating routes. Technically, you could do a lot more than just generate routes, but I wouldn&#8217;t go crazy with using C# to generate your JavaScript files.</p>
<pre class="brush: xml;">

&lt;script src=&quot;js/master.js&quot; type=&quot;text/javascript&quot;&gt; &lt;/script&gt;
</pre>
<h3>Conclusion</h3>
<p>This is a great way to manage the Urls in your JavaScript files without the concern of worrying about modifying all your JavaScript files just because you want a different route. Download my sample and see if you like it or you think I&#8217;ve gone completely insane.</p>
<p><a class="download" href="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/05/JavascriptViewExample.zip">JavascriptViewExample</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aquabirdconsulting.com/?feed=rss2&amp;p=305</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the 960 Grid System for Layout</title>
		<link>http://blog.aquabirdconsulting.com/?p=302</link>
		<comments>http://blog.aquabirdconsulting.com/?p=302#comments</comments>
		<pubDate>Wed, 05 May 2010 16:25:07 +0000</pubDate>
		<dc:creator>Khalid</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[960.gs]]></category>
		<category><![CDATA[Aqua Bird Consulting]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Layout]]></category>

		<guid isPermaLink="false">http://blog.aquabirdconsulting.com/?p=302</guid>
		<description><![CDATA[So I’ve been using the 960 grid system for over 6 months now and I have learned a thing or two that could be helpful to those looking at using it as well. If you don’t already know, 960.gs is a css framework to help you quickly enable layouts and help ease the pain of [...]]]></description>
			<content:encoded><![CDATA[<p>So I’ve been using the 960 grid system for over 6 months now and I have learned a thing or two that could be helpful to those looking at using it as well. If you don’t already know, 960.gs is a css framework to help you quickly enable layouts and help ease the pain of cross browser compatibility. I will start by laying out the pros and the cons of the 960 and then show you how to overcome possible gotchas.</p>
<h4>The Pros</h4>
<p>This is what you want to hear right, how is 960.gs going to make your layout easier to manage and create. Well let’s start then.</p>
<ul>
<li>Complex layouts relatively fast.</li>
<li>Consistent layout (IE, Firefox, Chrome, …)</li>
<li>Reusable and Flexible</li>
<li>Easy to learn</li>
</ul>
<h4>The Cons</h4>
<p>Ok so some of the down sides of using 960.gs, cause there are some obvious ones.</p>
<ul>
<li>More stylesheets ( 960.gs, reset.css, text.css and then yours)</li>
<li>Respect it or it will bite back</li>
<li>Divitus (lots of div tags based on your layout)</li>
<li>Everything you need to do isn’t a grid</li>
<li>not semantic (grid_12 is not expressive)</li>
<li>multiple css classes on one element</li>
</ul>
<h4>Overview</h4>
<p>by default the 960.gs is split into either a 12 column grid or a 16 column grid. I will focus on the 12 column grid. Each column in a 12 column grid is 60px wide with a margin of 10px on each side. You can see that below the max content area you can have is 940px, while the container expands to 960px due to the 10px margin on each side. You can also see that the margin between two columns is 20px, because each column has a 10px when two columns margins combine they make 20px. And finally, a div tag can span multiple columns and it’s length is made up of all the columns it spans and 10px of margin on each side.</p>
<p>ex. a column that spans 11 columns is 880px. column: 60px + 10px + 10px.  11 x 80px = 880px total : 880px with outside margins and 860px without outside margin (content area).</p>
<p>Ok that was a lot of math, but you only need to know how to count up to 12 or 16 to use this system. No need to do this math because it is done for you automatically. The point of the math is to show you that the box model is important to understand. Margin is outside of your div tag, while everything else is inside.</p>
<p><a href="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/05/image.png"><img style="display: inline; border: 0px;" title="image" src="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/05/image_thumb.png" border="0" alt="image" width="640" height="128" /></a></p>
<h4>Example – The Basics</h4>
<p>So you are curious about the above example, how what does the HTML look like? It looks like this.</p>
<pre class="brush: xml;">
&lt;div class=&quot;container_12&quot;&gt;
	&lt;h2&gt;
		12 Column Grid
	&lt;/h2&gt;
	&lt;div class=&quot;grid_12&quot;&gt;
		&lt;p&gt;
			940
		&lt;/p&gt;
	&lt;/div&gt;
	&lt;!-- end .grid_12 --&gt;
	&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
	&lt;div class=&quot;grid_1&quot;&gt;
		&lt;p&gt;
			60
		&lt;/p&gt;
	&lt;/div&gt;
	&lt;!-- end .grid_1 --&gt;
	&lt;div class=&quot;grid_11&quot;&gt;
		&lt;p&gt;
			860
		&lt;/p&gt;
	&lt;/div&gt;
	&lt;!-- end .grid_11 --&gt;
&lt;/div&gt;
</pre>
<p>Simple right, you see that we use a div with a class of container_12. This is used to help center your page and give a place to start laying out your page. The next thing you will see is grid_12. That is telling that div to span the whole way across, and it is then followed by grid_1, and grid_11. You can guess that we are specifying that the first div is a size of one column, while the next is 11 columns. The div with a class of clear forces the grids to the next line, but I have found if your rows always add up to 12 you can forgo the clearing, since floating will force elements to the next line anyways, that is up to you.</p>
<h4>Gotchas</h4>
<p>The first and major gotcha that people run into is they attempt to overly style their div tag that already has a grid class. This is a mistake and can lead to huge headaches. Let’s look at why you shouldn’t. I will show you what css rules are ok to use and which aren’t.</p>
<h5>Border</h5>
<p>The first no-no is <strong>border</strong>. You shouldn’t use border on your grid divs because it adds size to your layout.</p>
<p>ex. You have a grid div that spans 5 columns. 5 x 80px = 400px. So you want to add a border of 1px solid black (always bet on black). What does that do?</p>
<p>That changes the math 5 x 80px + 2px (border-left and border-right) = 402px. now 2px might not seem like a lot, but it can force whole divs to the next line, throwing off your layout completely.</p>
<p>To fix this problem you should put another div inside the grid div and then style that. What you end up with is a container –&gt; content relationship.</p>
<h5>Margin and Padding</h5>
<p>So you want to move a grid just a little bit over huh? DON’T. The same problem happens that occurs with Border. You force the columns to stretch pass what they were designed to do. Think of yourself trying to wear pants that are two sizes too small, it just isn’t pretty.</p>
<p>The solution again is to use a container-&gt; content relationship. Where you have another div inside that handles margin and padding.</p>
<h5>Width</h5>
<p>You might be seeing a theme here, width is the enemy of the grid system, especially explicit widths. If you have an element that is 200px in a column that is only 60px, then you’ll have problems.</p>
<p>The solution is to be mindful of your parent div. If you want to use width, look at using percentage. ex. width: 100% on the content div.</p>
<h5>Things that are OK to Style:</h5>
<p>background-color, color, background-image, position (absolute and relative).</p>
<h4>Conclusion</h4>
<p>The 960.gs is very powerful, but some CSS purist might not like it’s lack of semanticness (not sure if that’s a word). I see their point, but the up side is so great that I can overlook my HTML/CSS purism. Keep in mind the gotchas and you should be able to create consistent layouts in all major browsers.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aquabirdconsulting.com/?feed=rss2&amp;p=302</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Get a VS2010 Ultimate Experience for Less</title>
		<link>http://blog.aquabirdconsulting.com/?p=296</link>
		<comments>http://blog.aquabirdconsulting.com/?p=296#comments</comments>
		<pubDate>Mon, 12 Apr 2010 13:32:43 +0000</pubDate>
		<dc:creator>Khalid</dc:creator>
				<category><![CDATA[Business Ideas]]></category>
		<category><![CDATA[Just Talking]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[Aqua Bird Consulting]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.aquabirdconsulting.com/?p=296</guid>
		<description><![CDATA[As of writing this blog post, there are thousands of developers converging in Las Vegas for the official release of Visual Studio 2010. I’ve been using Visual Studio 2010 for the a while now and it has been a generally positive experience. While as was exploring the VS2010 site I saw this question posed. “What [...]]]></description>
			<content:encoded><![CDATA[<p>As of writing this blog post, there are thousands of developers converging in Las Vegas for the <a href="http://www.microsoft.com/visualstudio/en-us/watch-it-live" target="_blank">official release of Visual Studio 2010</a>. I’ve been using Visual Studio 2010 for the a while now and it has been a generally positive experience. While as was exploring the VS2010 site I saw this question posed. “What Edition is Right for Me?” That prompted me to look through the editions. Microsoft has planned to sell for commercial versions: Professional, Premium, Ultimate, and Test Professional. A much smaller selection that the VS2008 editions, but that is a good thing. What shocked me was the outrageous price jump from Professional to Ultimate, from $799 to $11,899; that is over $11,000 difference for one copy of Visual Studio. So this blog post is to show you how to get an Ultimate experience for less, so that you can utilize that extra money for pizza and beers for you development staff.</p>
<h3>1.) Visual Studio Professional ($799)</h3>
<p>you are going to need this right? So what is missing from Professional that is in Ultimate?</p>
<ul>
<li>Intellitrace (Historical Debugger)</li>
<li>Static Code Analysis</li>
<li>Code Metrics</li>
<li>Profiling</li>
</ul>
<p><a href="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/04/image.png"><img style="display: inline; border: 0px;" title="image" src="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/04/image_thumb.png" border="0" alt="image" width="145" height="168" /></a></p>
<h4><span style="font-weight: normal;">a.) Intellitrace ( $0 no alternative )</span></h4>
<p>sadly I couldn’t find something that replaced this feature. It is very cool. Look at it this way though, the fact that Microsoft moved it up to the premium edition makes me think that they feel the common developer probably doesn’t need it. I also rarely used this feature in my own development.</p>
<h4><span style="font-weight: normal;">b.)Static Code Analysis &amp; Code Metrics ($410)</span></h4>
<p>so what is static code analysis? Wikipedia defines it as the <a href="http://en.wikipedia.org/wiki/Program_analysis_(computer_science)">analysis of computer software</a> that is performed without actually executing programs built from that software. Hmm… this sounds familiar, I think I’ve done that before. Oh wait I have! <a href="http://www.ndepend.com/" target="_blank">NDepend</a> is a great static analysis tool that has been around for a while now.</p>
<h4><span style="font-weight: normal;">c.) Profiling ( $0 &#8211; $500 )</span></h4>
<p>There are a ton of profilers for the .Net framework, and some of them are <strong>FREE! </strong>In this post I chose the two that a company might buy <a href="http://www.red-gate.com/purchase/index.htm" target="_blank">ANTS Memory Profiler</a> and <a href="http://www.jetbrains.com/profiler/buy/index.jsp" target="_blank">JetBrains ReSharper</a>.</p>
<h3>2.) Testing</h3>
<p>So you are a testing kind of developer, that’s great but you want all the extras that ultimate offers.</p>
<ul>
<li>Code Coverage</li>
<li>Test Impact Analysis</li>
<li>Coded UI Test</li>
<li>Web Performance Testing</li>
<li>Load Testing</li>
<li>etc…</li>
</ul>
<h4><span style="font-weight: normal;">a.) Code Coverage ($479)</span></h4>
<p><a href="http://www.ncover.com/" target="_blank">NCover</a> is a mature and great tool for code coverage.</p>
<h4><span style="font-weight: normal;">b.) Web Performance Testing and Load Testing($0)</span></h4>
<p>The web has been around long before VS2010, so this problem has been solved a million times. Realizing that there are a ton of tools out there to do this and I won’t list each of them. Just Google and prepare to be overwhelmed by the possibilities.</p>
<h4><span style="font-weight: normal;">c.) Coded UI Test ($0)</span></h4>
<p><a href="http://watin.sourceforge.net/" target="_blank">Watin</a> allows you to code tests for UI interaction of web applications, which is probably the hardest interaction to test for.</p>
<h4><span style="font-weight: normal;">d.) </span><a href="http://www.jetbrains.com/resharper/" target="_blank"><span style="font-weight: normal;">Resharper</span></a><span style="font-weight: normal;"> ($349)</span></h4>
<p>I have to mention this tool just because it is so good and it improves the unit testing experience inside of visual studio, regardless of your framework.</p>
<h3>3.)Database Development</h3>
<p>the dreaded database…. how do we handle this stuff?</p>
<ul>
<li>Database Deployment</li>
<li>Database Change Management</li>
<li>Database Unit Testing</li>
<li>Data Generation</li>
</ul>
<h4><span style="font-weight: normal;">a.) Database Deployment ($0 – not needed)</span></h4>
<p>In theory this sounds great, but the majority of companies have a company structure that forbids any developer from making database pushes; the job of pushes are usually left to a Database Administrator. They will probably want to execute SQL that they have crafted and labored over.</p>
<h4><span style="font-weight: normal;">b.) Database Change Management ($0 – code option)</span></h4>
<p>again this is probably left up to your DBA with a combination of your source control (SVN, Hg, Git, TFS). I recommend looking into a migration framework if you really want to control the versioning of a database.</p>
<h4><span style="font-weight: normal;">c.)Database Unit Testing (Whaaaaat? $0)</span></h4>
<p>this troubles me on two fronts. First off you probably shouldn’t be unit testing enough of your database to have a whole project dedicated to it. Secondly, this is what developers refer to as integration tests and you don’t need any other tools other than your  favorite unit testing package to do this. Granted, VS2010 probably has some nice UI tools to make this more pleasurable, but in my opinion tests are about results and not how pretty the UI is.</p>
<h4><span style="font-weight: normal;">d.) Data Generation ($0)</span></h4>
<p>This is a problem that isn’t that complicated to solve, and again has been solved. Check out <a href="http://autopoco.codeplex.com/" target="_blank">AutoPoco</a> which allows you to generate a ton of data easily through a fluent interface. After generation, just go ahead and pump this data into your database with your favorite ORM or DAL.</p>
<h3>4.)Architecture and Modeling ($100)</h3>
<p>Buy a whiteboard for modeling and get your team involved. There is nothing worse than an Ivory tower architect that pushes his architectural will on the team without discussion.</p>
<h3>5.)Source Control ($300)</h3>
<p><a href="http://www.unfuddle.com" target="_blank">Unfuddle</a> is a great online source control provider and in my opinion gives you a lot of things your business will use from Team Foundation Server. When I quote the $300, I am talking about for your whole company and not per developer. This is a huge cost savings. There are also a ton of other online source control providers that are similar to Unfuddle.</p>
<p>Tools I have to mention: TortoiseSVN, MsysGit, TortoiseHg, AnkhSVN (all free)</p>
<h3>Conclusion and Total Price: $2637 ($2832 less than Premium and $9262 less than Ultimate)</h3>
<p>That savings per developer is nothing to joke about. You could save over $9000 dollars but just looking around more. So what is the downside? Well you will have a hodgepodge of tools to use and many of these options might lack UI tools and possibly Visual Studio integration. Do your homework and see if the benefits of buying these tools outweigh your desire to have a all in one tool like VS2010. <strong>If you have a team of five developers, I just saved you over $45k</strong>. Your welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aquabirdconsulting.com/?feed=rss2&amp;p=296</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aqua Bird Consulting’s Competitive Edge Review</title>
		<link>http://blog.aquabirdconsulting.com/?p=293</link>
		<comments>http://blog.aquabirdconsulting.com/?p=293#comments</comments>
		<pubDate>Wed, 07 Apr 2010 14:51:44 +0000</pubDate>
		<dc:creator>Khalid</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.aquabirdconsulting.com/?p=293</guid>
		<description><![CDATA[I am happy to announce, after popular demand, that we have started offering a new service: Competitive Edge Review. This service is for any business looking to have a review of their business processes, staff, or other aspects of their business. So how does it work and what do our clients get? Our experts visit [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/04/CERBanner.png"><img style="border-bottom: 0px; border-left: 0px; margin: 10px 0px 10px 10px; display: inline; border-top: 0px; border-right: 0px" title="CERBanner" border="0" alt="CERBanner" align="right" src="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/04/CERBanner_thumb.png" width="620" height="240" /></a> I am happy to announce, after popular demand, that we have started offering a new service: Competitive Edge Review. This service is for any business looking to have a review of their business processes, staff, or other aspects of their business. So how does it work and what do our clients get?</p>
<p>Our experts visit your location or remotely communicate with key business people and engage in a intensive but exciting session. These sessions include personal interviews, questionnaires, process walkthroughs, and brainstorming. The idea is to get our clients talking about their business. We make sure to get clients talking about what they like about their business and what could use improvement. All information gathered&#160; is kept confidential; that includes the names of all people who take our questionnaires. The questionnaires are meant to extract truthful information, and we want all participants to feel that they can be honest. Once all this data is compiled we take the information and write a detailed report.</p>
<p>Our clients receive a document that details their current business process and where improvements can be made.<strong> This includes hard actionable data that can save some clients thousands of dollars. </strong>Other data can help reduce time spent on activities. For some clients we’ve been able to eliminate crucial activities completely by automating the task.</p>
<p>This is an amazing service for a business of any size because it let’s you know about what is possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aquabirdconsulting.com/?feed=rss2&amp;p=293</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FluentSitemap: Build Sitemaps for Asp.Net MVC</title>
		<link>http://blog.aquabirdconsulting.com/?p=287</link>
		<comments>http://blog.aquabirdconsulting.com/?p=287#comments</comments>
		<pubDate>Wed, 24 Mar 2010 14:45:45 +0000</pubDate>
		<dc:creator>Khalid</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Aqua Bird Consulting]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[FluentSitemap]]></category>
		<category><![CDATA[GitHub]]></category>

		<guid isPermaLink="false">http://blog.aquabirdconsulting.com/?p=287</guid>
		<description><![CDATA[Building your site is only half the battle. Getting people to know it exists is the other half. If you are creating a public facing site, or even an intranet that utilizes an in-house search server then I have created a library just for you. The library is FluentSitemap. This library is designed to help [...]]]></description>
			<content:encoded><![CDATA[<p>Building your site is only half the battle. Getting people to know it exists is the other half. If you are creating a public facing site, or even an intranet that utilizes an in-house search server then I have created a library just for you. The library is FluentSitemap. This library is designed to help you easily build sitemaps to be utilized by major search engines. The great thing about this library is that utilizes all your existing routes and controllers to build a sitemap even for the most complex Asp.Net MVC sites.</p>
<p><a href="http://github.com/khalidabuhakmeh/FluentSitemap" target="_blank">The FluentSitemap library can be found at GitHub Here.</a></p>
<h3>How to use you, Let me count the ways</h3>
<p>There are several ways you can utilize this library. The first is to specify each node manually. Let’s look at how that looks.</p>
<pre class="brush: csharp;">           // You can pass in a HttpContext from anywhere
            // in you application
            ISitemapConfigurator configurator = new SitemapConfigurator(HttpContext);

            // create sitemap node and set
            ISitemap sitemap = configurator.Create()
                .WithLocation(&quot;http://localhost.com/&quot;)
                .WithPriority(0.3)
                .WithChangeFrequency(ChangeFrequencyType.Never)
                .Set().Export();</pre>
<p>The second is to use a controller/action pair.</p>
<pre class="brush: csharp;">        // You can pass in a HttpContext from anywhere
            // in you application
            ISitemapConfigurator configurator = new SitemapConfigurator(HttpContext);

            // Add From a controller and action
            ISitemap sitemap = configurator.Add(&quot;Home&quot;, &quot;Index&quot;)
                .Add(&quot;Home&quot;, &quot;About&quot;).Export();</pre>
<p>The third is to use a route</p>
<pre class="brush: csharp;">       // You can pass in a HttpContext from anywhere
            // in you application
            ISitemapConfigurator configurator = new SitemapConfigurator(HttpContext);

            // Add From a controller and action
            ISitemap sitemap = configurator
                // Add From a Route
                .AddFromRoute(&quot;Default&quot;, new {id = &quot;2&quot;}).Export();</pre>
<p>The last is to use the ISitemetadata. This is specifically there for IoC.</p>
<pre class="brush: csharp;">public class HomeControllerSitemapMetadata : ISitemapMetadata
    {
        private const string Home = &quot;Home&quot;;

        #region ISitemapMetadata Members

        public void Create(ISitemapConfigurator sitemap)
        {
            sitemap.Add(Home, &quot;Index&quot;)
                .Add(Home, &quot;Scanner&quot;)
                .Add(c =&amp;gt; c.Metadata());
        }

        #endregion
    }

    public class OtherControllerSitemapMetadata : ISitemapMetadata
    {
        private const string Other = &quot;Other&quot;;

        #region ISitemapMetadata Members

        public void Create(ISitemapConfigurator sitemap)
        {
            sitemap.Add(Other, &quot;Index&quot;)
                .Add(c =&amp;gt; c.Test(1, &quot;dude&quot;));
        }

        #endregion
    }</pre>
<pre class="brush: csharp;">            // An example, you'll probably use your favorite
            // IoC container to resolve all the metadata classes
            var metadata = new List
                               {new HomeControllerSitemapMetadata(), new OtherControllerSitemapMetadata()};

            ISitemap sitemap = new SitemapConfigurator(HttpContext).FromMetaData(metadata).Export();</pre>
<p>There is more API sugar, so go download it and give it a try.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aquabirdconsulting.com/?feed=rss2&amp;p=287</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MVC Turbine – A Great Platform</title>
		<link>http://blog.aquabirdconsulting.com/?p=285</link>
		<comments>http://blog.aquabirdconsulting.com/?p=285#comments</comments>
		<pubDate>Mon, 22 Mar 2010 15:35:33 +0000</pubDate>
		<dc:creator>Khalid</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Aqua Bird Consulting]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[IoC]]></category>

		<guid isPermaLink="false">http://blog.aquabirdconsulting.com/?p=285</guid>
		<description><![CDATA[I love Asp.Net MVC, that isn’t a secret. Although the framework isn’t perfect, it is a great leap in the right direction. When I start an Asp.Net MVC project there are things I always have to do just to jump into the meat of the new site. These things include replacing the ControllerFactory with a [...]]]></description>
			<content:encoded><![CDATA[<p>I love Asp.Net MVC, that isn’t a secret. Although the framework isn’t perfect, it is a great leap in the right direction. When I start an Asp.Net MVC project there are things I always have to do just to jump into the meat of the new site. These things include replacing the ControllerFactory with a IoC enabled ControllerFactory, changing routing, and other boiler plate actions. This is where <a href="http://mvcturbine.codeplex.com/" target="_blank">MVC Turbine</a> comes in, and I am liking it more and more the deeper I dive into it. Javier Lozano, the creator, defines <a href="http://mvcturbine.codeplex.com/" target="_blank">MVC Turbine</a> as</p>
<blockquote><p>MVC Turbine is a plugin for <a href="http://www.asp.net/mvc">ASP.NET MVC</a> that has IoC baked in and auto-wires controllers, binders, view engines, http modules, etc. that reside within your application. Thus you worry more about what your application <strong>should</strong> do, rather than <strong>how</strong> it should do it.</p></blockquote>
<p><a href="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/03/image2.png"><img style="display: inline; border: 0px;" title="image" src="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/03/image_thumb2.png" border="0" alt="image" width="385" height="216" /></a></p>
<p>If you consider ASP.NET MVC as a stock Nissan 370z, then MVC Turbine is the Nissan 370z with the Nismo package. Ultimately the same car, but the tweaks make the ride so much more fun to drive. Everyday I find something cool in this framework, but these are my favorite features so far.</p>
<h3>Services Registration and IoC</h3>
<p>I love IoC, because it makes testing your applications easier and shrinks your code base over the long run. What I hate is having to wire it up every time I start a new project. With MVC Turbine, it is already handled for you. Just create classes that implement the IServiceRegistration interface. You will be passed your favorite IoC and you can do what you need to do to register your services.</p>
<h3>Inferred Actions</h3>
<p>If your controller actions just return a view, then you are going to love this. You can create a controller class with no actions, and MVC Turbine will look in your views folder and display that view. <a href="http://lozanotek.com/blog/archive/2009/10/05/Multiple_View_Engines_with_MVC_Turbine.aspx" target="_blank">Check it out here</a>.</p>
<h3>Route Registration</h3>
<p>When you have a large Asp.Net MVC application, then you’ll probably have a lot of routes. MVC Turbine allows a great facility for registering routes, while keeping you project clean.</p>
<p>I can definitely get behind MVC Turbine and I recommend you check it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aquabirdconsulting.com/?feed=rss2&amp;p=285</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET MVC 2 RTM, Content Management System, &amp; ValidateInput</title>
		<link>http://blog.aquabirdconsulting.com/?p=280</link>
		<comments>http://blog.aquabirdconsulting.com/?p=280#comments</comments>
		<pubDate>Mon, 15 Mar 2010 17:14:27 +0000</pubDate>
		<dc:creator>Khalid</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Aqua Bird Consulting]]></category>
		<category><![CDATA[CMS]]></category>

		<guid isPermaLink="false">http://blog.aquabirdconsulting.com/?p=280</guid>
		<description><![CDATA[I have a lot of clients asking whether I can enable them to edit their own content. Most of the time I ask questions that make them realize that they don’t really need it, but sometimes they really do want it. I’ve been developing ASP.NET MVC web applications in VS2008, but as VS2010 comes closer [...]]]></description>
			<content:encoded><![CDATA[<p>I have a lot of clients asking whether I can enable them to edit their own content. Most of the time I ask questions that make them realize that they don’t really need it, but sometimes they really do want it. I’ve been developing ASP.NET MVC web applications in VS2008, but as VS2010 comes closer to being released and with ASP.NET MVC 2 hitting release, I am starting to focus my efforts on using both technologies. So I sat down today and looked at CKEditor, a WYSIWYG editor that is embeddable into your site.</p>
<p>The issue that I found is that ASP.NET 4.0 is really concerned about Security, so much so that it ignores my ValidateInputAttribute on my controllers. When I submit my HTML content from the client, the MVC application throws a red screen of death. By default, ASP.NET will validate all incoming requests to make sure there are no malicious things coming in.&#160; The ValidateInputAttribute was designed to tell ASP.NET that this request is meant to contain things that might be dangerous.</p>
<p>There is a really simple fix to this, and it is one line long.</p>
<p>Solution:</p>
<ol>
<li>Open up your web.config</li>
<li>Under System.Web add a httpRuntime node.</li>
<li>Add requestValidationMode attribute and set it to “2.0”</li>
</ol>
<p><a href="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/03/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/03/image_thumb1.png" width="442" height="136" /></a> </p>
<p>The solution defaults back to ASP.NET 2.0’s request validation, which will respect your ValidateInputAttribute on your controller actions.</p>
<p>Hope this helps.</p>
<p>-Khalid Abuhakmeh</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aquabirdconsulting.com/?feed=rss2&amp;p=280</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C4MVC Presentation on Database Migrations</title>
		<link>http://blog.aquabirdconsulting.com/?p=276</link>
		<comments>http://blog.aquabirdconsulting.com/?p=276#comments</comments>
		<pubDate>Mon, 15 Mar 2010 13:07:04 +0000</pubDate>
		<dc:creator>Khalid</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Business Ideas]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://blog.aquabirdconsulting.com/?p=276</guid>
		<description><![CDATA[Hello everybody. It has been about a week since I gave my C4MVC presentation on database migrations. The video is below, and the code is also downloadable below. Migrations Example (VS2010)]]></description>
			<content:encoded><![CDATA[<p>Hello everybody. It has been about a week since I gave my C4MVC presentation on database migrations. The video is below, and the code is also downloadable below.</p>
<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370" id="viddler_6b3539c"><param name="movie" value="http://www.viddler.com/player/6b3539c/" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><embed src="http://www.viddler.com/player/6b3539c/" width="437" height="370" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" name="viddler_6b3539c"></embed></object></p>
<p><a href="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/03/MigrationsExample.zip" class="download">Migrations Example (VS2010)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aquabirdconsulting.com/?feed=rss2&amp;p=276</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asp.Net MVC 2 Quick and Simple Site – v1</title>
		<link>http://blog.aquabirdconsulting.com/?p=272</link>
		<comments>http://blog.aquabirdconsulting.com/?p=272#comments</comments>
		<pubDate>Tue, 09 Mar 2010 16:41:10 +0000</pubDate>
		<dc:creator>Khalid</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Business Ideas]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[Aqua Bird Consulting]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://blog.aquabirdconsulting.com/?p=272</guid>
		<description><![CDATA[*Note: Asp.Net MVC 2 project in Visual Studio 2010 I sat down last night and was thinking about how I could get a simple starter site up and running for a client, until I could design something more tailored to their needs. There is nothing worse than having a “under construction” page or a “coming [...]]]></description>
			<content:encoded><![CDATA[<p><strong>*Note: Asp.Net MVC 2 project in Visual Studio 2010</strong></p>
<p>I sat down last night and was thinking about how I could get a simple starter site up and running for a client, until I could design something more tailored to their needs. There is nothing worse than having a “under construction” page or a “coming soon” page. It doesn’t really say much about what is happening or what might be coming. So I sat down and came up with the basics of what a client might want right from the start, here were my requirements.</p>
<ul>
<li>Set a Logo, Name, and Subtitle</li>
<li>Be able to quickly edit a small about section (Content)</li>
<li>Quickly add some of the more important social networks (Twitter, YouTube, FeedBurner, Delicious, MySpace, and Facebook).</li>
<li>Be able to add Google Analytics (Optional)</li>
<li>A dynamic image gallery (drop images in a directory and everything is done for you).</li>
<li>Basic contact information. Email, Phone, and Website.</li>
<li>No external libraries to install (this hurts but is helpful).</li>
</ul>
<p>So I sat down and started writing. I wanted someone to be able to push this site without editing a lot of files or having to setup a database. I opted to put a lot of the client’s settings in configuration. Yes configuration sections are not <a href="http://blog.wekeroad.com/2010/03/04/using-mongo-with-linq" target="_blank">the new hotness</a> but they can still serve a powerful purpose.</p>
<p>My first iteration had me using controller actions for each part of the site, but I slowly realized it was overkill. I opted to have one controller action from my index, and then break sections up into partial views that would be all rendered at the same time. Then those sections would be hidden and made visible using JQuery. After a little design, I ended up with this.</p>
<p><a href="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/03/image.png" target="_blank"><img style="display: inline; border: 0px;" title="image" src="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/03/image_thumb.png" border="0" alt="image" width="516" height="340" /></a></p>
<p>Let’s look at how to set this up.</p>
<h3>Step 1 – Setup the Configuration</h3>
<p>There are some pretty simple configuration sections in the web.config included with this project. You will see two App settings: WorkImagesDirectory and GoogleAnalyticsCode. The WorkImagesDirectory is used to find all the images in your gallery. Thumbnails for all your images will be automatically created if they are missing. The GoogleAnalyticsCode setting should be set to your Google Analytics code UA-XX-XXXX (or something like that). If you leave out the Google Analytics code then the script won’t be output to the page.</p>
<p>Next you will see a ContactInformation section. In this section you can set the name, site subtitle, email, phone, and website.</p>
<p>Finally, you will see a SocialNetworks section. Only the social network usernames you set will show up on the page. You can set Twitter, Facebook, YouTube, Delicious, MySpace, and FeedBurner(a blog maybe).</p>
<h3>Step 2 – Setup Content</h3>
<p>Once the configuration is done, then you probably want to change some of the content to reflect some good information.</p>
<p>All tabs are separated into partial views: About, Contact, Work, Social. Just replace the HTML content in here with what you want, leaving the nested RenderPartials.</p>
<h3>Step 3 – Modify Colors and Images</h3>
<p>All the images and style sheets you need to modify are under the Content directory. If you like the color and just want to modify the avatar at the top, just overwrite the avatar.png under Content/img.</p>
<h3>Step 4 – Deploy It</h3>
<p>Just publish what is there to your hosting provider and you are ready to go.</p>
<h3>Conclusion</h3>
<p>This is a good little site to get up and running for your clients, but it isn’t anything ground breaking. The code is straight forward, so even a novice can get in there and change things. The point here was not to over complicate the solution with third party libraries. It is to get a site up with in minutes, while still giving some great functionality to the people that need it.</p>
<p><a class="download" href="http://blog.aquabirdconsulting.com/wp-content/uploads/2010/03/AquaBird.StarterSite.zip">AquaBird.StarterSite</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aquabirdconsulting.com/?feed=rss2&amp;p=272</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
