<?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>ORTHOcoders &#187; SOLID</title>
	<atom:link href="http://orthocoders.com/tag/solid/feed/" rel="self" type="application/rss+xml" />
	<link>http://orthocoders.com</link>
	<description>U can code it, we can help</description>
	<lastBuildDate>Fri, 13 Jan 2012 07:16:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Prairie Development Conference</title>
		<link>http://orthocoders.com/2010/05/03/prairie-development-conference/</link>
		<comments>http://orthocoders.com/2010/05/03/prairie-development-conference/#comments</comments>
		<pubDate>Tue, 04 May 2010 03:14:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[BDD]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Patterns]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[Unit Testing]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Mocking]]></category>
		<category><![CDATA[SOLID]]></category>

		<guid isPermaLink="false">http://orthocoders.com/2010/05/03/prairie-development-conference/</guid>
		<description><![CDATA[On Jun 2nd and 3rd I’ll be speaking at the PrairieDevCon 2010 in Regina!!! You can read about it at http://www.prairiedevcon.com/. It would be two complete days of sessions with four tracks and many cool speakers!!!! I will do two presentations: Real World Behaviour Driven Development Behaviour Driven Development drives you process towards keeping the [...]]]></description>
			<content:encoded><![CDATA[<p>On Jun 2nd and 3rd I’ll be speaking at the <strong>PrairieDevCon</strong> 2010 in Regina!!!</p>
<p><a href="http://orthocoders.com/wp-content/uploads/2010/05/Prairie_Dev_Con_Presenter.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Prairie_Dev_Con_Presenter" src="http://orthocoders.com/wp-content/uploads/2010/05/Prairie_Dev_Con_Presenter_thumb.gif" border="0" alt="Prairie_Dev_Con_Presenter" width="225" height="123" /></a></p>
<p>You can read about it at <a href="http://www.prairiedevcon.com/">http://www.prairiedevcon.com/</a>. It would be two complete days of sessions with four tracks and many cool speakers!!!!</p>
<p>I will do two presentations:</p>
<p><strong> </strong></p>
<h5>Real World Behaviour Driven Development</h5>
<p>Behaviour Driven Development drives you process towards keeping the focus on the stakeholder’s goals while discovering new features to achieve those goals.<br />
But&#8230; what does it mean in a .NET project to use BDD? What do I have to change? What tools are available? Can I use it for project with actual deadlines? How the quality will be improved?<br />
We are going to see a real world example from start to finish using BDD and TDD while answering all those questions. After the session you will have the foundation to apply BDD with confidence on any .NET project.<br />
<strong>Track:</strong> Developer Foundation<br />
<strong>Style:</strong> Dojo (Bring your laptop and code with me!)</p>
<h5>Test Driven Development Patterns for .NET Developers</h5>
<p>Test Driven Development is a methodology that will help us to discover our model while improving the quality of our software.<br />
We are going to see different patterns to help us deal with day to day problems like constructor initialization, exception testing, combinatorial tests, database testing, and many others.<br />
<strong>Track:</strong> Developer Foundation<br />
<strong>Style:</strong> Lecture</p>
<p>Hope to see you there!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://orthocoders.com/2010/05/03/prairie-development-conference/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Snapping Strategy Part II</title>
		<link>http://orthocoders.com/2010/04/13/snapping-strategy-part-2/</link>
		<comments>http://orthocoders.com/2010/04/13/snapping-strategy-part-2/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 04:26:07 +0000</pubDate>
		<dc:creator>Amir Barylko</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[SOLID]]></category>

		<guid isPermaLink="false">http://orthocoders.com/?p=115</guid>
		<description><![CDATA[After my first post about implementing a snapping strategy, I got feedback, and a new implementation was suggested: Use Chain-of-Responsibility instead of Composite.]]></description>
			<content:encoded><![CDATA[<h3>New inspiration</h3>
<p>One of many great things about blogging is that you get feedback from other developers. My good friend Sebastian (@paraseba) suggested to use a <em>Chain-of-Responsibility</em> instead of a <em>Composite</em> to find the an active snapping strategy. If u have no idea what I&#8217;m talking about, please read the previous post about &#8220;<a href="http://orthocoders.com/2010/04/13/snapping-strategy/" target="_blank">Implementing a Snapping Strategy</a>&#8220;.</p>
<h3>CoR Pattern</h3>
<p>In the Design Patterns book, the authors describe the Chain of Responsibility pattern like this:</p>
<blockquote><p>Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.</p></blockquote>
<p>In our case this means that we should give the opportunity to each strategy to do the snapping and if no snapping is available should call the “chained” strategy to see if the point should be snapped.</p>
<p>The solution it&#8217;s working, good time to refactor (Red, Green, Refactor) to add more flexibility to our strategies.</p>
<p>Let’s explore what changes do we need to do in order to be able to chain the strategies.</p>
<h3>Chained Strategies</h3>
<p>I don’t think we should modify the interface, no one needs to know which pattern are we implemented, so I am going to create a new abstract class called <em>ChainedSnappingStrategy</em>.</p>
<p>This class will be the base implementation for all the other strategies with two responsibilities:</p>
<ul>
<li>Call the next strategy in the chain if no snapping was applied</li>
<li>If it’s the end of the chain, return the same point.</li>
</ul>
<p>Our hierarchy updated will look something like this:</p>
<p><a href="http://orthocoders.com/wp-content/uploads/2010/04/image4.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://orthocoders.com/wp-content/uploads/2010/04/image_thumb4.png" border="0" alt="image" width="580" height="306" /></a></p>
<p>I added a new abstract method called <em>SnapImpl</em> to implement in each concrete class the snapping (same as we have now).</p>
<p>The <em>Snap</em> method should call the implementation first and then check if the point was snapped or not, if not should go to the next strategy. Here is the code:</p>
<div id="codeSnippetWrapper">
<div id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; 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> <span style="color: #0000ff">public</span> <span style="color: #0000ff">abstract</span> <span style="color: #0000ff">class</span> ChainedSnappingStrategy : ISnappingStrategy</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> {</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: #0000ff">public</span> ISnappingStrategy Next { get; set; }</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></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>     <span style="color: #0000ff">public</span> Point Snap(Point point, IDrawingContext context)</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>     {</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>         var result = <span style="color: #0000ff">this</span>.SnapImpl(point, context);</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></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>         <span style="color: #0000ff">if</span> (<span style="color: #0000ff">this</span>.Next != <span style="color: #0000ff">null</span> &amp;&amp; result == point)</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--></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="lnum11" style="color: #606060">  11:</span>             result = <span style="color: #0000ff">this</span>.Next.Snap(point, context);</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="lnum12" style="color: #606060">  12:</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="lnum13" style="color: #606060">  13:</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="lnum14" style="color: #606060">  14:</span>         <span style="color: #0000ff">return</span> result;</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="lnum15" style="color: #606060">  15:</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="lnum16" style="color: #606060">  16:</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="lnum17" style="color: #606060">  17:</span>     <span style="color: #0000ff">protected</span> <span style="color: #0000ff">abstract</span> Point SnapImpl(Point point, IDrawingContext context);</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="lnum18" style="color: #606060">  18:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>And voila, our strategies are chained!</p>
]]></content:encoded>
			<wfw:commentRss>http://orthocoders.com/2010/04/13/snapping-strategy-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Snapping Strategy</title>
		<link>http://orthocoders.com/2010/04/13/snapping-strategy/</link>
		<comments>http://orthocoders.com/2010/04/13/snapping-strategy/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 15:16:04 +0000</pubDate>
		<dc:creator>Amir Barylko</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Patterns]]></category>
		<category><![CDATA[SOLID]]></category>

		<guid isPermaLink="false">http://orthocoders.com/?p=92</guid>
		<description><![CDATA[Strategies are an excellent way of abstracting algorithms to achieve particular tasks. The snapping strategy helped me to apply different snapping to the DrawingTool in my application]]></description>
			<content:encoded><![CDATA[<h3>The application</h3>
<p>For the past eight months I’ve been working on a WPF  desktop application that has a tool to draw. Very similar to most drawing application, you select the Drawing tool in the ribbon/toolbox and then you are able to draw on the canvas until you close the shape or cancel the tool.</p>
<h3>The new requirement</h3>
<p>Now, we need to draw using snapping. Snapping means that when you are drawing close to a particular point (considering a distance) the mouse will move but the drawing line not, will stay snapped to the point.</p>
<p>In this case we need to consider three cases:</p>
<ol>
<li>Snapping on the X axis (horizontal axis)</li>
<li>Snapping on the Y axis (vertical axis)</li>
<li>Snapping when the line has an 90 degree angle with the previous line</li>
</ol>
<h3>The solution</h3>
<h4>Where should I add the snapping?</h4>
<p>So I started by writing a test  (Yes, full TDD) that checks when I’m close to the X axis (3 pixels or less) then the drawing tool should snap. My test failed gloriously and I was ready to start my implementation in order to make the test pass… now… the question is… who is responsible for snapping?</p>
<h4>The Drawing Tool</h4>
<p>Let’s review the drawing tool interaction to understand how it works using MVVM.</p>
<ul>
<li>The <em>Canvas </em>receives a mouse move event and passes that information to the <em>DrawingTool</em></li>
<li>The <em>DrawingTool</em> raises a <em>LineMoved</em> event</li>
<li>The view model receives the event and notifies the view</li>
<li>The view shows the line ending on the new point</li>
</ul>
<p>A sequence diagram should look something like this:</p>
<p><a href="http://orthocoders.com/wp-content/uploads/2010/04/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://orthocoders.com/wp-content/uploads/2010/04/image_thumb.png" border="0" alt="image" width="568" height="213" /></a></p>
<h4>Who is responsible for snapping?</h4>
<p>The <em>DrawingTool</em> does not know about snapping, but it should, because is raising the event… However considering the SRP (single responsibility principle) makes more sense to delegate this decision to another class, behold the <em>ISnappingStrategy</em>.</p>
<p>I decided to inject the strategy into the <em>DrawingTool</em> constructor (via IoC) and the <em>DrawingTool</em> will query the strategy for each point before raising the event, thus the event will contain the point decided by the strategy.</p>
<p>Let’s look at the new sequence diagram with the strategy added to the interaction:</p>
<h4>Why a strategy? Is that the GOF pattern?</h4>
<p>Indeed it is, why? Because I wanted to encapsulate the algorithm I’m going to use to snap, snapping to X axis has different rules than snapping to the previous line when having a 90 degree angle. Please refer to the GOF book “Design Patterns” or Google for more examples and diagrams.</p>
<h4>Snapping Strategy Hierarchy</h4>
<p>I have so far one interface <em>ISnappingStrategy</em> and three concrete strategies that implement the interface:</p>
<p><span style="font-size: 13.3333px;"> </span></p>
<ol><span style="font-size: 13.3333px;"><a href="http://orthocoders.com/wp-content/uploads/2010/04/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" src="http://orthocoders.com/wp-content/uploads/2010/04/image_thumb1.png" border="0" alt="image" width="569" height="256" /></a></span></ol>
<p>Each strategy when called will return the snapped point or, if no snapping is required the same point.</p>
<p>So far, so good…. now I have implemented them, and each one passes the unit tests. However I don’t want to use just one of the them, I want to use all of them combined. I’d like to use first <em>SnapToX</em> and if does not snap, then <em>SnapToY, etc, etc</em>.</p>
<h4>Enters the Composite Strategy</h4>
<p>The Composite pattern is another GOF pattern and the goal is to treat a group of objects like they where a single instance. In this case, I want to use multiple snapping strategies like they were just one strategy.</p>
<p>Here is the idea, let’s create the Composite with a collection of strategies, and when called the Composite will iterate thru them until it finds a new snapping point or, if no snapping should happen, return the same point.</p>
<p>So, with the Composite, the new hierarchy looks like:</p>
<p><a href="http://orthocoders.com/wp-content/uploads/2010/04/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://orthocoders.com/wp-content/uploads/2010/04/image_thumb2.png" border="0" alt="image" width="755" height="202" /></a></p>
<p>And the code for the composite snapping would be:</p>
<div id="codeSnippetWrapper">
<div id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; 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> <span style="color: #0000ff">public</span> Point Snap(Point point, IDrawingContext context)</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> {</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>     var found = <span style="color: #0000ff">this</span>._strategies.Find(s =&gt; s.Snap(point, context) != point);</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></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>     <span style="color: #0000ff">return</span> found == <span style="color: #0000ff">null</span> ? point : found.Snap(point, context);</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> }</pre>
<p><!--CRLF--></div>
</div>
<h3>The cherry on top</h3>
<p>Now we need to configure all this, luckily we can use Binsor to configure our Windsor container and it will look something like this:</p>
<div id="codeSnippetWrapper">
<div id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; 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> component <span style="color: #006080">"SnapToX"</span>, ISnappingStrategy, VectorSnappingStrategy:</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>   x = 1</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>   y = 0</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></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> component <span style="color: #006080">"SnapToY"</span>, ISnappingStrategy, VectorSnappingStrategy:</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>   x = 0</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>   y = 1</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></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> component <span style="color: #006080">"SnapToPrevious"</span>, ISnappingStrategy, PreviousLineSnappingStrategy</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--></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="lnum11" style="color: #606060">  11:</span> component <span style="color: #006080">"SnappingStrategy"</span>, ISnappingStrategy, CompositeSnappingStrategy:</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="lnum12" style="color: #606060">  12:</span>   strategies = [@SnapToX, @SnapToY, @SnapToPrevious]</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="lnum13" style="color: #606060">  13:</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="lnum14" style="color: #606060">  14:</span> component <span style="color: #006080">"DrawTool"</span>, IDrawTool, DrawTool:</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="lnum15" style="color: #606060">  15:</span>   snapping = @SnappingStrategy</pre>
<p><!--CRLF--></div>
</div>
<p>Neat eh?</p>
]]></content:encoded>
			<wfw:commentRss>http://orthocoders.com/2010/04/13/snapping-strategy/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Microsoft TechDays Canada</title>
		<link>http://orthocoders.com/2009/09/16/microsoft-techdays-canada/</link>
		<comments>http://orthocoders.com/2009/09/16/microsoft-techdays-canada/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 04:30:27 +0000</pubDate>
		<dc:creator>Amir Barylko</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[SOLID]]></category>

		<guid isPermaLink="false">http://orthocoders.com/?p=51</guid>
		<description><![CDATA[I&#8221;ll be presenting this year at Microsoft TechDays Canada. I&#8217;m super excited! Here is a brief description of my presentation: SOLIDify Your Microsoft ASP.NET MVC Applications Object-oriented programming makes it easier to manage complexity, but only if you do it right. The five SOLID principles of class design (one for each letter) help ensure that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8221;ll be presenting this year at <span lang="EN-CA"><a href="http://techdays.ca/" target="_blank">Microsoft TechDays Canada</a>.</span> I&#8217;m super excited!</p>
<p>Here is a brief description of my presentation:</p>
<p style="margin-left: 0.5in;"><strong><span lang="EN-CA">SOLIDify Your Microsoft <a href="http://asp.net/" target="_blank">ASP.NET</a> MVC Applications</span></strong></p>
<p style="margin-left: 0.5in;"><span lang="EN-CA">Object-oriented programming makes it easier to manage complexity, but only if you do it right. The five SOLID principles of class design (one for each letter) help ensure that you’re writing applications that are flexible, comprehensible and maintainable, and we’ll explain and explore them in this session. We’ll start with a brittle <a href="http://asp.net/" target="_blank">ASP.NET</a> MVC application that’s badly in need of refactoring and fix it by applying the SOLID principles. This session is a good follow-up for Introducing <a href="http://asp.net/" target="_blank">ASP.NET</a> MVC, but it’s also good for developers of <a href="http://asp.net/" target="_blank">ASP.NET</a> MVC looking to improve their code – or even if you’re not planning to use <a href="http://asp.net/" target="_blank">ASP.NET</a> MVC. The SOLID principles apply to programming in any object-oriented language or framework.</span></p>
<p style="margin-left: 0.5in;"><em><span lang="EN-CA">December 15-16 at the Winnipeg Convention Centre</span></em></p>
<p>Hope u can make it!</p>
]]></content:encoded>
			<wfw:commentRss>http://orthocoders.com/2009/09/16/microsoft-techdays-canada/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

