<?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>Software Engineering, the easier way</title>
	<atom:link href="http://blog.projectsoftware.ro/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.projectsoftware.ro</link>
	<description>Blogging for learning: More Questions than Answers</description>
	<lastBuildDate>Sun, 08 Jan 2012 10:52:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Azure cost tip: have consistent regions</title>
		<link>http://blog.projectsoftware.ro/2012/01/azure-cost-tip-have-consistent-regions/</link>
		<comments>http://blog.projectsoftware.ro/2012/01/azure-cost-tip-have-consistent-regions/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 08:31:16 +0000</pubDate>
		<dc:creator>emipasat</dc:creator>
				<category><![CDATA[Azure]]></category>

		<guid isPermaLink="false">http://blog.projectsoftware.ro/2012/01/azure-cost-tip-have-consistent-regions/</guid>
		<description><![CDATA[Quick tip: pay attention at your Country/Region settings when using a database or a hosted service.
We know that&#160; database transactions are free if database and the service are in the same Azure data center. 
However, having a database with Country/Region set to West Europe and a Worker Role (which uses this database) with its Country/Region [...]]]></description>
			<content:encoded><![CDATA[<p>Quick tip: pay attention at your Country/Region settings when using a database or a hosted service.</p>
<p>We know that&#160; database transactions are free if database and the service are in the same Azure data center. </p>
<p>However, having a database with Country/Region set to West Europe and a Worker Role (which uses this database) with its Country/Region set to Anywhere Europe which polls periodically the database still leads to access costs.</p>
<p><a href="http://blog.projectsoftware.ro/wp-content/uploads/2012/01/azure_database_west.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Azure Database with Location West Europe " border="0" alt="Azure Database with Location West Europe " src="http://blog.projectsoftware.ro/wp-content/uploads/2012/01/azure_database_west_thumb.png" width="604" height="472" /></a></p>
<p><a href="http://blog.projectsoftware.ro/wp-content/uploads/2012/01/azure_worker_role_anywhere.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Azure Role with Location Anywhere Europe " border="0" alt="Azure Role with Location Anywhere Europe " src="http://blog.projectsoftware.ro/wp-content/uploads/2012/01/azure_worker_role_anywhere_thumb.png" width="604" height="472" /></a></p>
<p>And if you add in the mix a storage account with Country/Region set to Anywhere Europe, don’t be surprised that you’ll have in the bill a lot of consumed units.</p>
<p><a href="http://blog.projectsoftware.ro/wp-content/uploads/2012/01/azure_storage_anywhere.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="azure_storage_anywhere" border="0" alt="azure_storage_anywhere" src="http://blog.projectsoftware.ro/wp-content/uploads/2012/01/azure_storage_anywhere_thumb.png" width="604" height="472" /></a></p>
<p>Conclusion: be consistent and specific when choosing Country/Region. Making all “Anywhere Europe” will be consistent but not specific and you’ll have additional costs. But if you make all “West Europe” or “North Europe” you’re safer.</p>
<p>Happy cloud saving!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.projectsoftware.ro/2012/01/azure-cost-tip-have-consistent-regions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Routing testing in ASP.NET MVC 2.0, a quick workaround</title>
		<link>http://blog.projectsoftware.ro/2009/11/routing-testing-in-asp-net-mvc-2-0-a-quick-workaround/</link>
		<comments>http://blog.projectsoftware.ro/2009/11/routing-testing-in-asp-net-mvc-2-0-a-quick-workaround/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 15:09:13 +0000</pubDate>
		<dc:creator>emipasat</dc:creator>
				<category><![CDATA[Development/Programming]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>

		<guid isPermaLink="false">http://blog.projectsoftware.ro/2009/11/routing-testing-in-asp-net-mvc-2-0-a-quick-workaround/</guid>
		<description><![CDATA[Areas in ASP.NET MVC is a long awaited feature (although there were some workarounds available for version 1.0). If you want to read a quick walkthrough in dividing your ASP.NET MVC project into areas, here is one from msdn.
But, after divided a project into areas, my route unit tests was failing with “System.Web.HttpException: The type [...]]]></description>
			<content:encoded><![CDATA[<p>Areas in ASP.NET MVC is a long awaited feature (although there were some workarounds available for version 1.0). If you want to read a quick walkthrough in dividing your ASP.NET MVC project into areas, here is one from <a href="http://msdn.microsoft.com/en-us/library/ee461420(VS.100).aspx" target="_blank">msdn</a>.</p>
<p>But, after divided a project into areas, my route unit tests was failing with “System.Web.HttpException: The type initializer for &#8216;System.Web.Compilation.CompilationLock&#8217; threw an exception”, in my test fixture constructor,&#160; where I call my global HttpApplication RegisterRoutes method like this:</p>
<blockquote><pre class="code"><span style="color: #2b91af">RouteCollection </span>routes = <span style="color: blue">new </span><span style="color: #2b91af">RouteCollection</span>();
<span style="color: #2b91af">Global</span>.RegisterRoutes(routes);</pre>
</blockquote>
<p>Assuming I have an AreaRegistration object named Routes in “Admin” area and I want its routes tested<a href="http://11011.net/software/vspaste">,</a> that simple workaround did it:</p>
<blockquote>
<pre class="code"><span style="color: green">//Global.RegisterRoutes(routes); 

</span>(<span style="color: blue">new </span><span style="color: #2b91af">Routes</span>()).RegisterArea(
    <span style="color: blue">new </span><span style="color: #2b91af">AreaRegistrationContext</span>(<span style="color: #a31515">&quot;Admin&quot;</span>, routes));</pre>
</blockquote>
<p>Now the route collection is filled with routes from Admin area, ready for tests.</p>
<p>Of course, there are some MVCContrib fluent tests options for routes, very good if you’re using NUnit (not the case here, with all tests using MS Test).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.projectsoftware.ro/2009/11/routing-testing-in-asp-net-mvc-2-0-a-quick-workaround/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MVVM Login demo application update, added Silverlight project</title>
		<link>http://blog.projectsoftware.ro/2009/10/mvvm-login-demo-application-update-added-silverlight-project/</link>
		<comments>http://blog.projectsoftware.ro/2009/10/mvvm-login-demo-application-update-added-silverlight-project/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 17:28:06 +0000</pubDate>
		<dc:creator>emipasat</dc:creator>
				<category><![CDATA[Development/Programming]]></category>
		<category><![CDATA[MVVM]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Wpf]]></category>

		<guid isPermaLink="false">http://blog.projectsoftware.ro/2009/10/mvvm-login-demo-application-update-added-silverlight-project/</guid>
		<description><![CDATA[This is the same MVVM login demo application, initially made for WPF and we want to add a Silverlight version, but reusing the business logic that we already have. Currently, I’m using Silverlight 2.

When you start working with Silverlight, you’ll miss a lot of WPF “goodies”. Understandable, since Silverlight is targeting the rich user experience [...]]]></description>
			<content:encoded><![CDATA[<p>This is the same MVVM login demo application, initially made for WPF and we want to add a Silverlight version, but reusing the business logic that we already have. Currently, I’m using Silverlight 2.<br />
<br />
Note: There is a file embedded within this post, please visit this post to download the file.</p>
<p>When you start working with Silverlight, you’ll miss a lot of WPF “goodies”. Understandable, since Silverlight is targeting the rich user experience and should stay small. There is no AdornedElementPlaceholder, no Label control, no Style triggers. So, how do we validate since we learned only the trick with binding the IDataErrorInfo to the user interface? Silverlight 3 have support for validation but with throwing exceptions, not with the help of the IDataErrorInfo.     </p>
<p><strong>Some Research</strong>    <br />There are already some validation libraries for Silverlight, for example:     <br /><a title="http://silverlightvalidator.codeplex.com/" href="http://silverlightvalidator.codeplex.com/">http://silverlightvalidator.codeplex.com/</a> (this is an approach similar with ASP.NET Webforms Validators).    <br />That’s mean that if we add a RequiredValidator for the username in the UI, we duplicate the logic of not having username empty from our model. Not good, we want no duplication.</p>
<p><strong>Reuse</strong>    <br />To reuse files in Silverlight, just add them as link. For example, we want the class User to be reused in a Silverlight project, too.</p>
<p>Add a new Silverlight class library project, name it LoginExampleDemoBLL.Silverlight. Add the User.cs from LoginExampleDemoBLL project as link.</p>
<p><a href="http://blog.projectsoftware.ro/wp-content/uploads/2009/10/LoginSilverlightAddAsLink.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="LoginSilverlightAddAsLink" border="0" alt="LoginSilverlightAddAsLink" src="http://blog.projectsoftware.ro/wp-content/uploads/2009/10/LoginSilverlightAddAsLink_thumb.png" width="450" height="292" /></a></p>
<p><strong>IDataErrorInfo workaround</strong>    <br />IDataErrorInfo is not part of the Silverlight. Luckily, some others had the <a href="http://msmvps.com/blogs/theproblemsolver/archive/2008/12/30/data-validation-silverlight-versus-wpf-part-2.aspx" target="_blank">same problems</a>. I adapt this solution a little to work with my types of view models, which expose the domain object as a property.</p>
<p><strong>Prism (CompositeWPF) help     <br /></strong>In order to bind commands to controls, we need the CompositeWPF binaries for Silverlight.     <br />Our XAML for buttons will looks like this:</p>
<p><span style="color: blue">&lt;</span><span style="color: #a31515">Button </span><span style="color: red">Content</span><span style="color: blue">=&quot;Login&quot; </span><span style="color: red">Margin</span><span style="color: blue">=&quot;5&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: red">cal</span><span style="color: blue">:</span><span style="color: red">Click.Command</span><span style="color: blue">=&quot;{</span><span style="color: #a31515">Binding </span><span style="color: red">Path</span><span style="color: blue">=LoginCommand}&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: red">cal</span><span style="color: blue">:</span><span style="color: red">Click.CommandParameter</span><span style="color: blue">=&quot;{</span><span style="color: #a31515">Binding </span><span style="color: red">Path</span><span style="color: blue">=User}&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: red">Grid.Column</span><span style="color: blue">=&quot;0&quot; </span><span style="color: red">Grid.Row</span><span style="color: blue">=&quot;3&quot; /&gt;</span></p>
<p>So, even if the validation is triggered when control is losing focus, even if we simplify a little our XAML code used in WPF project, is working, is reusable and is very simple as an example.   </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.projectsoftware.ro/2009/10/mvvm-login-demo-application-update-added-silverlight-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Real use of Microsoft Oslo?</title>
		<link>http://blog.projectsoftware.ro/2009/10/real-use-of-microsoft-oslo/</link>
		<comments>http://blog.projectsoftware.ro/2009/10/real-use-of-microsoft-oslo/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 17:40:33 +0000</pubDate>
		<dc:creator>emipasat</dc:creator>
				<category><![CDATA[Development/Programming]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[Oslo]]></category>

		<guid isPermaLink="false">http://blog.projectsoftware.ro/2009/10/real-use-of-microsoft-oslo/</guid>
		<description><![CDATA[How would you use Oslo in the real world? Well, this weekend I got a little Oslo “infection”. For the moment, only with Intellipad tool.
Working with MSpec and with BDD style tests, I always thought that a really good thing would be to generate test’s code or to run somehow tests specified in plain English, [...]]]></description>
			<content:encoded><![CDATA[<p>How would you use Oslo in the real world? Well, this weekend I got a little Oslo “infection”. For the moment, only with Intellipad tool.<br />
Working with MSpec and with BDD style tests, I always thought that a really good thing would be to generate test’s code or to run somehow tests specified in plain English, not only to see them nicely organized (although, that’s a very helpful thing).<br />
How about writing some BDD style plain English statements, obtain a MGraph from it with a help of an MGrammar, get some expression trees (there are some ways to get CLR objects from that MGraph, with help of Xaml or with some serialize/deserialize helpers or with some graph traversing techniques), compile and run? That could be a real use, allowing clients and business analysts to work directly on specifications. I wasn’t surprised to see that there are already some grammars which can parse that syntax (MisBehave, for example).<br />
Let’s think of an other example, starting from a simple scenario… I have an <a href="http://blog.projectsoftware.ro/2009/09/wpf-login-demo-with-mvvm-pattern-update/">WPF login demo</a> application. Its specifications/business rules are stored in code. How about get them out from code and being able to modify in plain English? Something like that:</p>
<div id="codeSnippetWrapper" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 99.73%; font-family: 'Courier New', courier, monospace; direction: ltr; height: 94px; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;">If MyLogin Attempts is greater than 3<br />
Then Message should be ‘Sorry, too many tries already’.<br />
<br/><br />
If MyLogin Attempts is equal with 2<br />
Then Message should be ‘One more try!’.
</div>
<p>Enter my very first MGrammar:</p>
<p><a href="http://blog.projectsoftware.ro/wp-content/uploads/2009/10/MyLogin_Oslo1.png"><img style="display: inline; border-width: 0px;" title="MyLogin Oslo" src="http://blog.projectsoftware.ro/wp-content/uploads/2009/10/MyLogin_Oslo1_thumb.png" border="0" alt="MyLogin Oslo" width="700" height="197" /></a></p>
<p>I successfully got then <span style="color: #ff0000;">LoginRule</span> objects with the help of Xaml (see <a href="http://msdn.microsoft.com/en-us/oslo/dd630614.aspx" target="_blank">Person example from msdn</a>) after I modified the projection to look like this:</p>
<div id="codeSnippetWrapper" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;">
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">syntax Rule = <span style="color: #006080">"If MyLogin Attempts"</span> o:Operator a:Attempts         <br/>     <span style="color: #006080">"Then Message should be "</span> m:Message <span style="color: #006080">"."</span>        <br/>        =&gt; <span style="color: #ff0000;">LoginRule</span> { Operator =&gt; o, Attempts =&gt; a, Message =&gt; m};</pre>
</div>
<p>And the LoginRule is my custom object which knows if it has to apply itself or not to my LoginViewModel and, if yes, it set the proper error message.</p>
<p>That’s of course a very limited example but shows (perhaps) some real uses of Oslo.</p>
<p>So, Oslo is not only about data. Since we can transform back and forth code into data, behaviors into data then we can store them in Oslo Repository, we (in fact, the clients) can edit them in a kind of English language and run them as code when needed.</p>
<p>For next releases I expect Microsoft to provide a clearer way to get objects from graphs (perhaps Spring.NET or Castle can help here, too but I didn’t wanted to dig further since I can work for the moment with Xaml way to get objects).</p>
<p>Am I just tired and talk nonsense?</p>
<p>Here is the test grammar used to parse these simple behaviors:</p>
<p> </p>
<pre class="csharpcode"><span class="rem">//Login Demo with Oslo</span>
module MyLogin {
    language LoginLogic {

        syntax Main = Rule*;
        syntax Rule = <span class="str">"If MyLogin Attempts"</span> o:Operator a:Attempts
            <span class="str">"Then Message should be "</span> m:Message <span class="str">"."</span>
                =&gt; LoginRule { Operator =&gt; o, Attempts =&gt; a, Message =&gt; m};

        token Attempts = <span class="str">"0"</span> .. <span class="str">"9"</span>;

        token Message = <span class="str">"'"</span> (<span class="str">"a"</span>..<span class="str">"z"</span> | <span class="str">"A"</span>..<span class="str">"Z"</span> | <span class="str">" "</span> | <span class="str">","</span> | <span class="str">"!"</span>)+ <span class="str">"'"</span>;
        token Operator = <span class="str">"is greater than"</span> | <span class="str">"is equal with"</span>;
        interleave  Whitespace = <span class="str">" "</span> | <span class="str">"\r"</span> | <span class="str">"\n"</span>;
    }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.projectsoftware.ro/2009/10/real-use-of-microsoft-oslo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WPF Login Demo with MVVM pattern &#8211; update</title>
		<link>http://blog.projectsoftware.ro/2009/09/wpf-login-demo-with-mvvm-pattern-update/</link>
		<comments>http://blog.projectsoftware.ro/2009/09/wpf-login-demo-with-mvvm-pattern-update/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 19:20:02 +0000</pubDate>
		<dc:creator>emipasat</dc:creator>
				<category><![CDATA[Development/Programming]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[MVVM]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Wpf]]></category>

		<guid isPermaLink="false">http://blog.projectsoftware.ro/2009/09/wpf-login-demo-with-mvvm-pattern-update/</guid>
		<description><![CDATA[After the first example posted, here are some improvements:
1. Moved business layer into separate project for testing
2. Added a quick test project (with some BDD flavors)
3. Tests are targeting only the ViewModel.
4. Refactored the intentional first naive ICommand implementations (towards Prism via DelegateCommand, although RelayCommand or SimpleCommand can be used also).
5. Still DIDN’T added yet [...]]]></description>
			<content:encoded><![CDATA[<p>After the <a title="WPF Login Demo" href="http://blog.projectsoftware.ro/2009/09/simple-wpf-login-demo-but-with-mvvm-kind-of/">first example</a> posted, here are some improvements:</p>
<p>1. Moved business layer into separate project for testing<br />
2. Added a quick test project (with some BDD flavors)<br />
3. Tests are targeting only the ViewModel.<br />
4. Refactored the intentional first naive ICommand implementations (towards Prism via DelegateCommand, although RelayCommand or SimpleCommand can be used also).<br />
5. Still DIDN’T added yet the AttachedProperty to the PasswordBox for simulate a more realistic login. Password is still a TextBox just for clarity.</p>
<p>Small exercise: how to not duplicate the validation logic in CanLoginExecute?</p>
<p>In a future update I intend to add also a Silverlight login demo, based on that example.</p>
<p>Grab the code from here: Note: There is a file embedded within this post, please visit this post to download the file.<br />
And that’s how the tests are looking (clearer, right?):<br />
<img class="alignnone size-full wp-image-42" title="BDD Testing with MSTest" src="http://blog.projectsoftware.ro/wp-content/uploads/2009/09/login_bdd.png" alt="BDD Testing with MSTest" width="700" height="130" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.projectsoftware.ro/2009/09/wpf-login-demo-with-mvvm-pattern-update/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Database Projects error: &#8220;An error occurred trying to load the project properties window. Close the window and try again.&#8221;</title>
		<link>http://blog.projectsoftware.ro/2009/09/database-projects-error-an-error-occurred-trying-to-load-the-project-properties-window-close-the-window-and-try-again/</link>
		<comments>http://blog.projectsoftware.ro/2009/09/database-projects-error-an-error-occurred-trying-to-load-the-project-properties-window-close-the-window-and-try-again/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 08:15:57 +0000</pubDate>
		<dc:creator>emipasat</dc:creator>
				<category><![CDATA[Development/Programming]]></category>
		<category><![CDATA[Database project]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.projectsoftware.ro/2009/09/database-projects-error-an-error-occurred-trying-to-load-the-project-properties-window-close-the-window-and-try-again/</guid>
		<description><![CDATA[&#160;
I’m using Visual Studio 2008 SP1, Team Foundation Server 2008 and Database Edition GDR.
Suddenly, my desktop builds doesn’t work anymore. The issue was related to my database project (an Sql Server 2008 Database project). Trying to get database project properties window leads to that error:
An error occurred trying to load the project properties window.&#160; Close [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>I’m using Visual Studio 2008 SP1, Team Foundation Server 2008 and <a href="http://blogs.msdn.com/gertd/archive/2008/11/25/visual-studio-team-system-2008-database-edition-gdr-rtm.aspx" target="_blank">Database Edition GDR</a>.</p>
<p>Suddenly, my desktop builds doesn’t work anymore. The issue was related to my database project (an Sql Server 2008 Database project). Trying to get database project properties window leads to that error:</p>
<p align="left"><em><strong>An error occurred trying to load the project properties window.&#160; Close the window and try again.        <br />Cannot evaluate the item metadata &quot;%(FullPath)&quot;. The item meta-data &quot;%(FullPath)&quot; cannot be applied to the path &quot;obj\Debug|Any CPU\MyDatabase.dbschema&quot;. Illegal characters in path.&#160; C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets</strong></em></p>
<p>If you’re trying to adjust your build configurations in Configuration Manager or to revert your solution to some older version, stop now. Your database project template is corrupted.</p>
<p>Reset your Visual Studio by opening a Visual Studio 2008 Command Prompt and running these commands:</p>
<p><strong>devenv /setup      <br />devenv /resetuserdata</strong></p>
<p>Yes, you’ll loose all your preferences and settings. But it will fix it and you can work again on your project.</p>
<p>The credit for this fix should go to that msdn <a href="http://social.msdn.microsoft.com/Forums/en-US/vstsdb/thread/14eecc38-87fe-4234-b5fa-c2fa7cab9ae9" target="_blank">post</a> (same error but occurring when trying to create a database project).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.projectsoftware.ro/2009/09/database-projects-error-an-error-occurred-trying-to-load-the-project-properties-window-close-the-window-and-try-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple WPF Login demo, with MVVM pattern</title>
		<link>http://blog.projectsoftware.ro/2009/09/simple-wpf-login-demo-but-with-mvvm-kind-of/</link>
		<comments>http://blog.projectsoftware.ro/2009/09/simple-wpf-login-demo-but-with-mvvm-kind-of/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 13:22:54 +0000</pubDate>
		<dc:creator>emipasat</dc:creator>
				<category><![CDATA[Development/Programming]]></category>
		<category><![CDATA[Wpf]]></category>

		<guid isPermaLink="false">http://blog.projectsoftware.ro/?p=31</guid>
		<description><![CDATA[There is a newer version here.
I was offering myself to prepare a quick WPF Login demo (having a minimum set of best practices) for a colegue, so here it is. (I&#8217;ll update it with more details and, perhaps, new versions):
It uses the MVVM pattern, no code behind (except the lines in which the DataContext is set), [...]]]></description>
			<content:encoded><![CDATA[<p>There is a newer version <a title="WPF Login Demo" href="http://blog.projectsoftware.ro/2009/09/wpf-login-demo-with-mvvm-pattern-update/">here</a>.</p>
<p>I was offering myself to prepare a quick WPF Login demo (having a minimum set of best practices) for a colegue, so here it is. (I&#8217;ll update it with more details and, perhaps, new versions):</p>
Note: There is a file embedded within this post, please visit this post to download the file.
<p>It uses the MVVM pattern, no code behind (except the lines in which the DataContext is set), binded commands, IDataErrorInfo for business entities, INotifyPropertyChanged.</p>
<p>The goal was to provide a testable WPF application, by using the .NET Framework already builtin capabilities (like it or not) and taking advantage of data binding. Some tricks (like showing error at Tooltip) are very common practices.</p>
<p>I used the password as a simple TextBox just to show binding.  Normally, a PasswordBox should be used, with attached property for binding (next version).</p>
<p>Also for next version I&#8217;ll separate the business code into a separate project (now is in a simple folder, just for demo) , perhaps add a quick authentication service, a test project and more.</p>
<p>For more advanced scenarios you should consider using of Prism (Composite WPF from Microsoft Patterns and Practices).</p>
<p>Comments are welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.projectsoftware.ro/2009/09/simple-wpf-login-demo-but-with-mvvm-kind-of/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Highlight selected row in ASP.NET MVC: it&#8217;s about requirements</title>
		<link>http://blog.projectsoftware.ro/2009/09/highlight-selected-row-in-asp-net-mvc-its-about-requirements/</link>
		<comments>http://blog.projectsoftware.ro/2009/09/highlight-selected-row-in-asp-net-mvc-its-about-requirements/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 16:32:50 +0000</pubDate>
		<dc:creator>emipasat</dc:creator>
				<category><![CDATA[Development/Programming]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Project management]]></category>

		<guid isPermaLink="false">http://blog.projectsoftware.ro/2009/09/highlight-selected-row-in-asp-net-mvc-its-about-requirements/</guid>
		<description><![CDATA[This is more a view from a different angle than a technically post: suppose you have an ASP.NET MVC application with a simple table with products (let’s name the view Products). Clicking on any product “Details” link, you should see the same table but with the product clicked previously highlighted and the product details.
How would [...]]]></description>
			<content:encoded><![CDATA[<p>This is more a view from a different angle than a technically post: suppose you have an ASP.NET MVC application with a simple table with products (let’s name the view Products). Clicking on any product “Details” link, you should see the same table but with the product clicked previously highlighted and the product details.</p>
<p>How would you implement such a simple requirement? Highlight a row.</p>
<p>Well, my answer is “depends”. Depends how it is asked.<br />
    1. <strong>Clear requirement:</strong> If the highlight stuff is part of an iteration, is a clear requirement (perhaps your Team Foundation Server check in policy will not allow to check in that fix without specify the test which cover it) then I would do it like this:</p>
<pre class="csharpcode"><span class="kwrd">public</span> <span class="kwrd">partial</span> <span class="kwrd">class</span> Product
{        <span class="kwrd">public</span> <span class="kwrd">bool</span> Selected
         {
              get;
              set;
         }
}</pre>
<p><!--<br />
.csharpcode, .csharpcode pre<br />
{<br />
font-size: small;<br />
color: black;<br />
font-family: consolas, "Courier New", courier, monospace;<br />
background-color: #ffffff;<br />
/*white-space: pre;*/<br />
}<br />
.csharpcode pre { margin: 0em; }<br />
.csharpcode .rem { color: #008000; }<br />
.csharpcode .kwrd { color: #0000ff; }<br />
.csharpcode .str { color: #006080; }<br />
.csharpcode .op { color: #0000c0; }<br />
.csharpcode .preproc { color: #cc6633; }<br />
.csharpcode .asp { background-color: #ffff00; }<br />
.csharpcode .html { color: #800000; }<br />
.csharpcode .attr { color: #ff0000; }<br />
.csharpcode .alt<br />
{<br />
background-color: #f4f4f4;<br />
width: 100%;<br />
margin: 0em;<br />
}<br />
.csharpcode .lnum { color: #606060; } --></p>
<p>Add the Selected property in the partial class definition (Product is a Linq2Sql or a Entity Framework entity). You can use also a ViewModel if your page is more complex (and same thing applies, add a new property to the ViewModel).</p>
<p>Then your controller can look like this (just a guideline, don’t use it exactly like this!):</p>
<pre class="csharpcode"><span class="kwrd">public</span> ActionResult MyProductList(<span class="kwrd">int</span>? productID)
{
    List&lt;Product&gt; products = m_service.FindProducts();
    products.Find(p =&gt; p.ProductID == productID).FirstOrDefault().Selected = <span class="kwrd">true</span>;
    <span class="kwrd">return</span> View(products);
}</pre>
<p><!--<br />
.csharpcode, .csharpcode pre<br />
{<br />
font-size: small;<br />
color: black;<br />
font-family: consolas, "Courier New", courier, monospace;<br />
background-color: #ffffff;<br />
/*white-space: pre;*/<br />
}<br />
.csharpcode pre { margin: 0em; }<br />
.csharpcode .rem { color: #008000; }<br />
.csharpcode .kwrd { color: #0000ff; }<br />
.csharpcode .str { color: #006080; }<br />
.csharpcode .op { color: #0000c0; }<br />
.csharpcode .preproc { color: #cc6633; }<br />
.csharpcode .asp { background-color: #ffff00; }<br />
.csharpcode .html { color: #800000; }<br />
.csharpcode .attr { color: #ff0000; }<br />
.csharpcode .alt<br />
{<br />
background-color: #f4f4f4;<br />
width: 100%;<br />
margin: 0em;<br />
}<br />
.csharpcode .lnum { color: #606060; } --></p>
<p>That is easy testable and you can mark your work item as done and associating with a simple test.</p>
<p>    2. <strong>UI Layout or other sources (like an angry email from the project manager):</strong> You just have the UI layout from a web designer and there the selected row is highlighted. That simple “spaghetti” code is more than enough:</p>
<pre class="csharpcode">&lt;% RouteValueDictionary  tRVD = <span class="kwrd">new</span> RouteValueDictionary(ViewContext.RouteData.Values); %&gt;
      &lt;table width=<span class="str">"100%"</span>&gt;
        &lt;% <span class="kwrd">foreach</span> (var product <span class="kwrd">in</span> Model) { %&gt;
            &lt;tr &lt;% <span class="kwrd">if</span> (product.ProductID.ToString() == tRVD[<span class="str">"productID"</span>]) { %&gt;
                <span class="kwrd">class</span>=<span class="str">"selected"</span> &lt;% } %&gt;&gt;
                     &lt;td width=<span class="str">"80%"</span>&gt;
                        &lt;%= Html.ActionLink(product.Name,
                         <span class="str">"Edit"</span>, <span class="kwrd">new</span> { id = product.ProductID })%&gt;
                &lt;/td&gt;
...</pre>
<p><!--<br />
.csharpcode, .csharpcode pre<br />
{<br />
font-size: small;<br />
color: black;<br />
font-family: consolas, "Courier New", courier, monospace;<br />
background-color: #ffffff;<br />
/*white-space: pre;*/<br />
}<br />
.csharpcode pre { margin: 0em; }<br />
.csharpcode .rem { color: #008000; }<br />
.csharpcode .kwrd { color: #0000ff; }<br />
.csharpcode .str { color: #006080; }<br />
.csharpcode .op { color: #0000c0; }<br />
.csharpcode .preproc { color: #cc6633; }<br />
.csharpcode .asp { background-color: #ffff00; }<br />
.csharpcode .html { color: #800000; }<br />
.csharpcode .attr { color: #ff0000; }<br />
.csharpcode .alt<br />
{<br />
background-color: #f4f4f4;<br />
width: 100%;<br />
margin: 0em;<br />
}<br />
.csharpcode .lnum { color: #606060; } --></p>
<p>How would you handle case 1 in the proper way?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.projectsoftware.ro/2009/09/highlight-selected-row-in-asp-net-mvc-its-about-requirements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Object expected&#8221; jquery error: last place to look (or why you should look carefully at the META tags)</title>
		<link>http://blog.projectsoftware.ro/2009/09/object-expected-jquery-error-last-place-to-look-or-why-you-should-look-carefully-at-the-meta-tags/</link>
		<comments>http://blog.projectsoftware.ro/2009/09/object-expected-jquery-error-last-place-to-look-or-why-you-should-look-carefully-at-the-meta-tags/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 06:48:55 +0000</pubDate>
		<dc:creator>emipasat</dc:creator>
				<category><![CDATA[Development/Programming]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[tags]]></category>

		<guid isPermaLink="false">http://blog.projectsoftware.ro/2009/09/object-expected-jquery-error-last-place-to-look-or-why-you-should-look-carefully-at-the-meta-tags/</guid>
		<description><![CDATA[That’s will help others for sure: ever happen to work on localhost on a legacy application (no matter if on Apache or IIS) and to have some missing images, css files or js files? Even if you are sure that there are in right place, accessible by the web server?
Here is my Error Console from [...]]]></description>
			<content:encoded><![CDATA[<p>That’s will help others for sure: ever happen to work on localhost on a legacy application (no matter if on Apache or IIS) and to have some missing images, css files or js files? Even if you are sure that there are in right place, accessible by the web server?</p>
<p>Here is my Error Console from Firefox:</p>
<p><a href="http://blog.projectsoftware.ro/wp-content/uploads/2009/09/errorConsole2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Firefox Error Console" src="http://blog.projectsoftware.ro/wp-content/uploads/2009/09/errorConsole2_thumb.png" border="0" alt="Firefox Error Console" width="405" height="248" /></a></p>
<p align="left">Here are two Firebug print screens:</p>
<p>On first one, first css file looks ok.<br />
<a href="http://blog.projectsoftware.ro/wp-content/uploads/2009/09/fireBug1.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Fire Bug 1" src="http://blog.projectsoftware.ro/wp-content/uploads/2009/09/fireBug1_thumb.png" border="0" alt="Fire Bug 1" width="415" height="278" /></a></p>
<p align="left">On second one, the css file shows a 404 Not found error, same my jquery script reference.<a href="http://blog.projectsoftware.ro/wp-content/uploads/2009/09/fireBug2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Fire Bug 2" src="http://blog.projectsoftware.ro/wp-content/uploads/2009/09/fireBug2_thumb.png" border="0" alt="Fire Bug 2" width="418" height="304" /></a></p>
<p>The problem here is the base meta tag!</p>
<p>It appends the live domain to the requested references. That’s why first css reference is found (it is found at the live server, actually) but not the jquery and second css, added locally by me.<br />
First warning in Error Console shows that the request is not made locally.</p>
<p>Hope that will save some time to the others, too!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.projectsoftware.ro/2009/09/object-expected-jquery-error-last-place-to-look-or-why-you-should-look-carefully-at-the-meta-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET MVC routing for IIS 6, why ending extension is bad?</title>
		<link>http://blog.projectsoftware.ro/2009/09/asp-net-mvc-routing-for-iis-6-why-ending-extension-is-bad/</link>
		<comments>http://blog.projectsoftware.ro/2009/09/asp-net-mvc-routing-for-iis-6-why-ending-extension-is-bad/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 13:59:29 +0000</pubDate>
		<dc:creator>emipasat</dc:creator>
				<category><![CDATA[Development/Programming]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[routing]]></category>
		<category><![CDATA[url rewriting]]></category>

		<guid isPermaLink="false">http://blog.projectsoftware.ro/index.php/2009/09/asp-net-mvc-routing-for-iis-6-why-ending-extension-is-bad/</guid>
		<description><![CDATA[Deploying an ASP.NET MVC application to production (on IIS 6) makes the nice looking URL to not work as expected.
Without going into too much details, the issue is ASP.NET needs the .aspx to be present into the URL, in order to be triggered.
So, an URL like
http://www.mycompany.com/Romania/English/Services will lead to a 404 error. Recommended solutions are [...]]]></description>
			<content:encoded><![CDATA[<p>Deploying an ASP.NET MVC application to production (on IIS 6) makes the nice looking URL to not work as expected.</p>
<p>Without going into too much details, the issue is ASP.NET needs the .aspx to be present into the URL, in order to be triggered.</p>
<p>So, an URL like<br />
<a href="http://www.mycompany.com/Romania/English/Services">http://www.mycompany.com/Romania/English/Services</a> will lead to a 404 error. Recommended solutions are to adapt the route to <a href="http://www.mycompany.com/Romania.aspx/English/Services">http://www.mycompany.com/Romania.aspx/English/Services</a> or to <a href="http://www.mycompany.com/Romania.mvc/English/Services">http://www.mycompany.com/Romania.mvc/English/Services</a>, which are not so pretty (second one requires also the mapping of .mvc extension in IIS).</p>
<p align="left">Why not having URLs like:<br />
<a href="http://www.mycompany.com/Romania/English/Services.aspx">http://www.mycompany.com/Romania/English/Services.aspx</a> ??</p>
<p align="left">I tested and there is no hidden catch (yes, I thought it might be a technical reason why is not recommended!), but is working as expected.<br />
If you rewrite an application with Web Forms to ASP.NET MVC, step by step, that’s a normal way to do it.</p>
<div id="codeSnippetWrapper" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;">
<div id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; height: 304px; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span id="lnum1" style="color: #606060">   1:</span> routes.MapRoute(</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span id="lnum2" style="color: #606060">   2:</span>                 <span style="color: #006080">"My Company Homepage"</span>,            <span style="color: #008000">   </span></pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span id="lnum3" style="color: #606060">   3:</span>                 <span style="color: #006080">"{country}/{language}/Products.aspx"</span>,</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span id="lnum4" style="color: #606060">   4:</span>                 <span style="color: #0000ff">new</span></pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span id="lnum5" style="color: #606060">   5:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span id="lnum6" style="color: #606060">   6:</span>                     controller = <span style="color: #006080">"Product"</span>,</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span id="lnum7" style="color: #606060">   7:</span>                     action = <span style="color: #006080">"List"</span>,</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span id="lnum8" style="color: #606060">   8:</span>                     country = <span style="color: #006080">"Romania"</span>,</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span id="lnum9" style="color: #606060">   9:</span>                     language = <span style="color: #006080">"English"</span></pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span id="lnum10" style="color: #606060">  10:</span>                 });</pre>
<p><!--CRLF--></div>
</div>
<p><span style="text-decoration: line-through;">Funny, even the permalink of this post has the filename before parameters, just to trigger the PHP (that blog is hosting on an IIS web server). But still, why not putting the .php extension at the end?</span></p>
<p>UPDATE: I fixed meanwhile the URL Rewriting of this blog with an .htaccess file</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.projectsoftware.ro/2009/09/asp-net-mvc-routing-for-iis-6-why-ending-extension-is-bad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

