<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-34822706</id><updated>2011-12-28T15:42:10.194+02:00</updated><category term='wcf'/><category term='Network'/><category term='LINQ'/><category term='WebSocket'/><category term='data structure'/><category term='jenkins'/><category term='development'/><category term='mstest'/><category term='Control'/><category term='DebuggerTypeProxy Debugger C#'/><category term='event'/><category term='Windows'/><category term='first'/><category term='msbuild'/><category term='DnA'/><category term='general'/><category term='C#'/><category term='Timeline'/><category term='git'/><category term='clr'/><category term='Database'/><category term='wpf'/><category term='Conversation'/><category term='ORM'/><category term='book review'/><category term='ci'/><category term='NHibernate'/><category term='.net'/><category term='architecture'/><category term='svn'/><category term='Object'/><category term='gantt'/><title type='text'>dot.NET - Advanced .NET Knowledge</title><subtitle type='html'>I'm happy to share with you my experience of life and programming.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34822706.post-9212654571141772160</id><published>2011-11-13T23:21:00.001+02:00</published><updated>2011-11-16T23:48:18.321+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ci'/><category scheme='http://www.blogger.com/atom/ns#' term='jenkins'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='mstest'/><category scheme='http://www.blogger.com/atom/ns#' term='msbuild'/><title type='text'>Building .NET Application with Jenkins using MSBuild and MSTest</title><content type='html'>&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: large;"&gt;Objective&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Quick feedback to the developers and transparent information about the health of the projects. This post will focus on .NET application.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: large;"&gt;Environment&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Small team of 3 developers. Two projects: .NET WPF client application and J2EE RESTful web service.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: large;"&gt;Why Jenkins&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://jenkins-ci.org/sites/default/files/images/headshot.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://jenkins-ci.org/sites/default/files/images/headshot.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;I've decide to use Jenkins as Continuous Integration server. I've use CrouseControl.NET in the past but was not so happy about it. TeamCity was another very good option and I've decide on Jenkins after all because of the strong community&amp;nbsp;involvement&amp;nbsp;and quick development around it, and also the fact that it is free and stay free was important factor.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: large;"&gt;Notice&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Those instructions are given as-is without warranty. Use them at your own risk. You should ensure you have the proper license to run each tool on your machines.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: large;"&gt;Step-by-step&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol style="background-color: white;"&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Download &lt;a href="http://mirrors.jenkins-ci.org/windows-stable/latest" target="_blank"&gt;Jenkins&lt;/a&gt;&amp;nbsp;for Windows.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Run Jenkins setup. Install it in C:\CI\Jenkins (no spaces in name)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Stop Jenkins service, open Jenkins.xml and change http port to 6080. Restart the service.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Open&amp;nbsp;&lt;a href="http://localhost:8080/" target="_blank"&gt;http://localhost:6080&lt;/a&gt;&amp;nbsp;to confirm Jenkins installation&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Install &lt;a href="http://code.google.com/p/gitextensions/downloads/list" target="_blank"&gt;GitExtensions&lt;/a&gt; to C:\CI\GitExtensions.&amp;nbsp;Install msysgit co C:\CI\git&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Go into Jenkins configuration -&amp;gt; Plugins -&amp;gt; Available and install git plugin. Go into Jenkins -&amp;gt; Configuration and change Path to git execution to C:\CI\git\cmd\git.cmd (not git.exe)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Change Jenkins windows service to run with specific Windows user by open the Services mmc, open the Properties dialog for Jenkins service and change the login user to a user in your machine.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Login with the user and run command to create ssh public/private key: open git bash goto ~/.ssh and run&amp;nbsp;&lt;i&gt;ssh-keygen.exe -t rsa -C "your-name@your-domain.com"&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Use the command&amp;nbsp;&lt;i&gt;cat id_rsa.pub&lt;/i&gt;&amp;nbsp;in git bash to get the public key (remove new lines)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Paste the public key in the remote git site (assembla, github).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Create new build task. Choose git as SCM and enter your remote repository address.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Run the build task, which will hang, stop it after few seconds and copy the command Jenkins execute. Paste that command into command line window and run it. You will get a message ask to approve the remote service fingure print, approve it.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Run the task again and everything should work as planed.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Go into Jenkins configuration -&amp;gt; Plugins -&amp;gt; Available and install MSBuild plugin&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Go into Jenkins configuration and under MSBuild click Add MSBuild in the name enter &lt;b&gt;.NET 4&lt;/b&gt; and in Path to MSBuild enter&amp;nbsp;&lt;b&gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Download&amp;nbsp;&lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=35aeda01-421d-4ba5-b44b-543dc8c33a20&amp;amp;displaylang=en" target="_blank"&gt;Windows SDK for .NET 4&lt;/a&gt;&amp;nbsp;- select GRMSDK_EN_DVD.iso. Install only ".NET Development" component&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Using&amp;nbsp;&lt;a href="http://mindinthewater.blogspot.com/2011/02/executing-visual-studio-2010-unit-tests.html" target="_blank"&gt;this script&lt;/a&gt;&amp;nbsp;copy MSTest related files from your development machine into CI server at &lt;b&gt;C:\CI\MSTest&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Use gacutil from Windows SDK to register ".Resource.dll" and ".UnitTestFramework.dll" - it is important the files will have version 10.0.0.0 (not 10.&lt;b&gt;1&lt;/b&gt;.0.0)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Run mstest registry file [MSTest Registry Export]&amp;nbsp;to add test types and other values request by MSTest to the CI server registry&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Go the the job configuration and add build step of type&amp;nbsp;&lt;b&gt;Execute windows batch command&lt;/b&gt;&amp;nbsp;with the following command&amp;nbsp;&lt;i&gt;Test Batch Command&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Go into Jenkins configuration -&amp;gt; Manage Plugins -&amp;gt; Available -&amp;gt; and select&amp;nbsp;&amp;nbsp;&lt;b&gt;JENKINS MSTest plugin&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Go into the build configuration. In the Post Build Actions check&amp;nbsp;&lt;b&gt;Publish MSTest test result report&lt;/b&gt;&amp;nbsp;and write&amp;nbsp;&lt;i&gt;TestResult.trx&lt;/i&gt;&amp;nbsp;in&amp;nbsp;&lt;b&gt;Test report TRX file&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;div style="background-color: white; font-size: 13px;"&gt;&lt;div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;[MSTest Registry Export]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;You will need to export values from your registry in order to run MSTest on Jenknis machine.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;For 32bit machines export&amp;nbsp;HKLM\SOFTWARE\Microsoft\VisualStudio\10.0\EnterpriseTools\QualityTools&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;For 64bit machines export HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\EnterpriseTools\QualityTools&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;If you have 64 bit developer machine and 32 bit Jenkins server just do search and replace of&amp;nbsp;&lt;b&gt;Wow6432Node\&lt;/b&gt;&amp;nbsp;to nothing to remove the 64 bit registry path part.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="background-color: white; font-size: 13px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;[Test Batch Command]&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="background-color: white; font-size: 13px;"&gt;del /f /q TestResult.trx&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol style="background-color: white; font-size: 13px;"&gt;&lt;/ol&gt;&lt;span style="background-color: white; font-size: 13px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;C:\ci\mstest\mstest.exe /noisolation /resultsfile:TestResult.trx /testcontainer:Project\Project.Test.dll&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; font-size: 13px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: large;"&gt;Sources&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;I've use the following posts and articles to build my Jenkins server.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Jenkins&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: hidden; overflow-y: hidden;"&gt;&lt;span style="background-color: white;"&gt;&lt;a href="http://zeljkofilipin.com/jenkins-windows-and-git/" style="font-family: arial, sans-serif; font-size: 83%;"&gt;http://zeljkofilipin.com/jenkins-windows-and-git/&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: arial, sans-serif; font-size: 83%;"&gt;&lt;span style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="background-color: white;"&gt;&lt;div style="font-family: arial, sans-serif; font-size: 83%;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 83%;"&gt;unit test without VS&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 83%;"&gt;&lt;a href="http://mindinthewater.blogspot.com/2008/11/executing-visual-studio-unit-tests.html"&gt;http://mindinthewater.blogspot.com/2008/11/executing-visual-studio-unit-tests.html&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 83%;"&gt;&lt;a href="http://www.shunra.com/shunrablog/index.php/2009/04/23/running-mstest-without-visual-studio/"&gt;http://www.shunra.com/shunrablog/index.php/2009/04/23/running-mstest-without-visual-studio/&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 83%;"&gt;&lt;a href="http://blog.bobcravens.com/2010/02/use-mstest-to-run-your-tests-via-command-line/"&gt;http://blog.bobcravens.com/2010/02/use-mstest-to-run-your-tests-via-command-line/&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 83%;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: arial, sans-serif; font-size: large;"&gt;Conclusion&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;I've only start using Jenkins now but it already helping to improve our project. It took about 4 late nights to play with it and set it up but I think it worth the trouble.&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;Next I'm going to add deployment package creation automation, after this will be solid I hope to get to continuos deployment by pushing the packages to our web site.&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;Also add build task for our J2EE web service and finally put a wall-screen to present the state in our development room.&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-9212654571141772160?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/9212654571141772160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=9212654571141772160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/9212654571141772160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/9212654571141772160'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2011/11/building-net-application-with-jenkins.html' title='Building .NET Application with Jenkins using MSBuild and MSTest'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-1110064722327151563</id><published>2011-09-04T20:05:00.002+03:00</published><updated>2011-09-04T20:13:26.579+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><title type='text'>WPF Binding Mode OneTime</title><content type='html'>I've been using WPF for the past 5 year and never found a reason to use &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.data.binding.aspx"&gt;Binding&lt;/a&gt; &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.data.binding.mode.aspx"&gt;Mode&lt;/a&gt; of &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.data.bindingmode.aspx"&gt;OneTime&lt;/a&gt;.&lt;br /&gt;As everyone I've read the documentation that state:&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: 'Segoe UI', Verdana, Arial; font-size: 14px; line-height: 19px;"&gt;Updates the binding target when the application starts or when the data context changes...&lt;/span&gt;&lt;/blockquote&gt;but I never found a real use for it.&lt;br /&gt;&lt;br /&gt;Until today!&lt;br /&gt;The use case was an editor control for selecting activity from a process. The data is really simple: we have a list of processes and each process has list of activities. The actual value I was interested in is the activity but it's not so user friendly to show the user lists of thousands of items so I break it into a first combo box of process and then combo box of activities in the selected process.&lt;br /&gt;&lt;br /&gt;The first XAML look like this:&lt;br /&gt;&lt;br /&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;ComboBox&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="s2"&gt; x&lt;/span&gt;&lt;span class="s1"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;Name&lt;/span&gt;&lt;span class="s1"&gt;="ProcessBox"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p3"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="s3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt; SelectedValue&lt;span class="s1"&gt;="{&lt;/span&gt;&lt;span class="s4"&gt;Binding&lt;/span&gt; Path&lt;span class="s1"&gt;=Value.Process}"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p3"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="s3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt; DisplayMemberPath&lt;span class="s1"&gt;="Name"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="s2"&gt; IsEditable&lt;/span&gt;&lt;span class="s1"&gt;="True" /&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;ComboBox&lt;/span&gt;&lt;/div&gt;&lt;div class="p3"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="s3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt; SelectedValue&lt;span class="s1"&gt;="{&lt;/span&gt;&lt;span class="s4"&gt;Binding&lt;/span&gt; Value&lt;span class="s1"&gt;}"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p5"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="s3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class="s2"&gt; ItemsSource&lt;/span&gt;="{&lt;span class="s4"&gt;Binding&lt;/span&gt;&lt;span class="s2"&gt; Mode&lt;/span&gt;=OneWay,&lt;span class="s2"&gt; ElementName&lt;/span&gt;=ProcessBox,&lt;span class="s2"&gt; Path&lt;/span&gt;=SelectedValue.Activities}"&lt;/span&gt;&lt;/div&gt;&lt;div class="p3"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="s3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt; DisplayMemberPath&lt;span class="s1"&gt;="DisplayName"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="s2"&gt; IsEditable&lt;/span&gt;&lt;span class="s1"&gt;="True" /&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p4"&gt;As you can see the first combo box (ProcessBox) is bound to the actual value's (the activity) process. This is important when we present this editor to an already selected activity and we want to show the user the process the activity belong to.&lt;/div&gt;&lt;div class="p4"&gt;The second combo take it's ItemsSource from the first combo box and it's SelectedValue is bound to the actual value in the ViewModel.&lt;/div&gt;&lt;div class="p4"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p4"&gt;This works pretty good, except when the user try to find the activity in the second combo box they often use the auto complete feature of the combo box and it often result in the bound Value property turn into null when the user enter name that does not exists in the list.&lt;/div&gt;&lt;div class="p4"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p4"&gt;This is the moment the binding works&amp;nbsp;against&amp;nbsp;us and it's manifest in the ProcessBox combo turn empty. This is really&amp;nbsp;frustrating&amp;nbsp;to the user and really bad UX.&lt;/div&gt;&lt;div class="p4"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p4"&gt;After working hard on trying to solve it I finally realize it's should be easy, as easy as adding two words: Mode=OneWay&lt;/div&gt;&lt;div class="p4"&gt;The final XAML looks like this:&lt;/div&gt;&lt;div class="p4"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p4"&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ComboBox&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="s2"&gt; x&lt;/span&gt;&lt;span class="s1"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;Name&lt;/span&gt;&lt;span class="s1"&gt;="ProcessBox"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p3"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="s3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class="s2"&gt; SelectedValue&lt;/span&gt;="{&lt;span class="s4"&gt;Binding&lt;/span&gt;&lt;span class="s2"&gt; &lt;b&gt;Mode&lt;/b&gt;&lt;/span&gt;&lt;b&gt;=OneTime&lt;/b&gt;,&lt;span class="s2"&gt; Path&lt;/span&gt;=Value.Process}"&lt;/span&gt;&lt;/div&gt;&lt;div class="p4"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="s3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt; DisplayMemberPath&lt;span class="s1"&gt;="Name"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="s2"&gt; IsEditable&lt;/span&gt;&lt;span class="s1"&gt;="True" /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;ComboBox&lt;/span&gt;&lt;/div&gt;&lt;div class="p4"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="s3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt; SelectedValue&lt;span class="s1"&gt;="{&lt;/span&gt;&lt;span class="s4"&gt;Binding&lt;/span&gt; Value&lt;span class="s1"&gt;}"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p3"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="s3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class="s2"&gt; ItemsSource&lt;/span&gt;="{&lt;span class="s4"&gt;Binding&lt;/span&gt;&lt;span class="s2"&gt; Mode&lt;/span&gt;=OneWay,&lt;span class="s2"&gt; ElementName&lt;/span&gt;=ProcessBox,&lt;span class="s2"&gt; Path&lt;/span&gt;=SelectedValue.Activities}"&lt;/span&gt;&lt;/div&gt;&lt;div class="p4"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="s3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt; DisplayMemberPath&lt;span class="s1"&gt;="DisplayName"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="s2"&gt; IsEditable&lt;/span&gt;&lt;span class="s1"&gt;="True" /&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p5"&gt;This way when this editor is presented for an already selected activity &lt;b&gt;only the first time it is display&lt;/b&gt;&amp;nbsp;the ProcessBox is bound to the process of the selected activity, from that moment on no binding is done from the selected activity (Value) to the process combo box.&lt;/div&gt;&lt;div class="p5"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p5"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;In conclusion&lt;/span&gt;&lt;/div&gt;&lt;div class="p5"&gt;When you have a cascading editor you can use Binding Mode of OneTime to bind the cascade controls that do not represent the final value and have a great, easy, working cascade control without code.&lt;/div&gt;&lt;div class="p5"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p5"&gt;Thank you OneTime Binding Mode.&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-1110064722327151563?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/1110064722327151563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=1110064722327151563' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/1110064722327151563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/1110064722327151563'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2011/09/wpf-binding-mode-onetime.html' title='WPF Binding Mode OneTime'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-334123999829724937</id><published>2011-06-16T23:00:00.000+03:00</published><updated>2011-06-16T23:00:44.864+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='data structure'/><title type='text'>Interval Tree C# implementation</title><content type='html'>Today I'm happy to publish my &lt;a href="http://intervaltree.codeplex.com/"&gt;Interval Tree C# implementation&lt;/a&gt; in CodePlex community code site.&lt;br /&gt;I need to store lots of temporal data in a project I'm working on and to retrieve the data very very fast. After some search on the web I've found &lt;a href="http://en.wikipedia.org/wiki/Interval_tree"&gt;article in Wikipedia about Interval Tree&lt;/a&gt;&amp;nbsp;which explain the data structure but did not direct me to any implementation of it.&lt;br /&gt;I've also found a C# implementation of&amp;nbsp;&lt;a href="http://www.emilstefanov.net/Projects/RangeSearchTree.aspx"&gt;Multi-Dimensional Range Search Tree&lt;/a&gt;&amp;nbsp;which is very useful for selecting points on two dimensions but did not solve the problem I need.&lt;br /&gt;&lt;br /&gt;Finally I've found a &lt;a href="http://www.thekevindolan.com/2010/02/interval-tree/index.html"&gt;Java implementation of Interval Tree&lt;/a&gt; which is just the thing I needed. Convert the Java code into C# was no brainer.&lt;br /&gt;&lt;br /&gt;I've add some abilities to the implementation like using generics for both temporal value and user data type so you can create interval tree that use int, float, DateTime or even Vector as measure unit. Any struct that implementation IComparable will work just fine.&lt;br /&gt;&lt;br /&gt;Also I've add the ability to stub the interval tree in different modes like all interval that contains the point, or contains or exactly at the start. This was important to me to be able to get information out of the interval tree for the actual project.&lt;br /&gt;&lt;br /&gt;Like the guy who publish the Java implementation said I need that data structure and I'm publish it to help anyone else need of it.&lt;br /&gt;&lt;br /&gt;Hope it will be useful to you as it is to me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-334123999829724937?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://intervaltree.codeplex.com/' title='Interval Tree C# implementation'/><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/334123999829724937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=334123999829724937' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/334123999829724937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/334123999829724937'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2011/06/interval-tree-c-implementation.html' title='Interval Tree C# implementation'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-4889951976342132805</id><published>2011-04-29T00:29:00.000+03:00</published><updated>2011-04-29T00:29:14.489+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Per Developer App.Config</title><content type='html'>We are working on C# project which use app.config to configure the way our application works.&lt;br /&gt;Since we are using shared source control system we notice we each step on each others those when it comes to changes of the app.config. Each developer change things like the address of some service, which modules to load, etc.&lt;br /&gt;One possible way is to make sure you are not checking-in your modified app.config, but that tedious.&lt;br /&gt;&lt;br /&gt;We wanted to have the normal app.config with some reasonable default settings and have per developer app.config file like app_ido.config which will be used if present.&lt;br /&gt;&lt;br /&gt;After reading Microsoft.Common.targets for a while I've found target called &lt;i&gt;PrepareForBuild&lt;/i&gt;. I've notice that Microsoft were kind enough to use property called &lt;i&gt;AppConfig&lt;/i&gt; if you define it. If you do not define it they try to find file called app.config which has build action of either None or Content (in that order).&lt;br /&gt;&lt;br /&gt;So, I've create a new Console application, add to it app.config file and put some appSettings in it just to be able to tell which app.config I am using. I've then open the csproj file for edit and add new element inside the first PropertyGroup element called AppConfig and set it to 123. When I've compile it I've got an error that Application Configuration file "123" is invalid and could not be found. That was the way, the rest was easy.&lt;br /&gt;&lt;br /&gt;I've change that property element to this:&lt;br /&gt;&lt;pre style="background: #ffffff; color: black;"&gt;&lt;span style="color: #a65700;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #5f5035;"&gt;AppConfig&lt;/span&gt; &lt;span style="color: #274796;"&gt;Condition&lt;/span&gt;&lt;span style="color: #808030;"&gt;=&lt;/span&gt;&lt;span style="color: #0000e6;"&gt;"&lt;/span&gt;&lt;span style="color: #0000e6;"&gt;Exists('App_$(USERNAME).config')&lt;/span&gt;&lt;span style="color: #0000e6;"&gt;"&lt;/span&gt;&lt;span style="color: #a65700;"&gt;&amp;gt;&lt;/span&gt;App_$(USERNAME).config&lt;span style="color: #a65700;"&gt;&lt;span style="color: #5f5035;"&gt;AppConfig&lt;/span&gt;&lt;span style="color: #a65700;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span class="Apple-style-span" style="color: #a65700;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This did exactly what we needed. We chose to use the current Windows username as our variable to identify each developer. If file with the name of the developer is found - we use it, otherwise we fallback to normal app.config.&lt;br /&gt;&lt;br /&gt;There was only one question open which is should we keep the developers app.config files in the source control system or not?&lt;br /&gt;&lt;br /&gt;After some thinking we decide not to check them into the source control because those files are dispensable and can only cause harm like merge conflicts.&lt;br /&gt;&lt;br /&gt;I hope this will help other developers looking for this behaviour.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://docs.google.com/uc?id=0B4R0X8AewRGXZThlNGQyNTgtN2I0NS00ZjRjLWEwMWItYWE1YWYwNGI3ZjBm&amp;amp;export=download&amp;amp;authkey=CL_xkOcI&amp;amp;hl=en"&gt;You can download sample application&lt;/a&gt;, just change the file called app_Ido.config from Ido to your name and your good to go. Remember to rebuild the project after you the file name to see the effect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-4889951976342132805?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/4889951976342132805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=4889951976342132805' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/4889951976342132805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/4889951976342132805'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2011/04/per-developer-appconfig.html' title='Per Developer App.Config'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-4799605307527357584</id><published>2011-04-25T17:24:00.005+03:00</published><updated>2011-04-25T23:00:41.374+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Control'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><title type='text'>Filter Combo Box</title><content type='html'>After long time of search for good WPF filter combo box control I've decided to create one.&lt;br /&gt;I've based my code on &lt;a target="_blank" href="http://weblogs.asp.net/okloeten/archive/2007/11/12/5088649.aspx"&gt;Omer van Kloeten's .NET Zen - Automatically Filtering a ComboBox in WPF&lt;/a&gt; post and add mostly keyboard support.&lt;br /&gt;&lt;br /&gt;Because &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.windows.controls.combobox.aspx"&gt;WPF ComboBox&lt;/a&gt; was not built with "filter as you type" in mind we need to be careful not to step on ComboBox implementation details and keep the normal behavior intact.&lt;br /&gt;&lt;br /&gt;Take a look at the &lt;a href="http://filtercombobox.codeplex.com/"&gt;project at CodePlex&lt;/a&gt; which include a sample application which allow you to play with the combo box.&lt;br /&gt;To integrate it to your application I suggest adding the AutoFilterComboBox class into your project and replace the built-in ComboBox control with the new derived AutoFilterComboBox control.&lt;br /&gt;&lt;br /&gt;Hope it will help you the way it help me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-4799605307527357584?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/4799605307527357584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=4799605307527357584' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/4799605307527357584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/4799605307527357584'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2011/04/filter-combo-box.html' title='Filter Combo Box'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-8161210981348108631</id><published>2010-07-25T07:40:00.003+03:00</published><updated>2010-07-25T07:42:47.881+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><title type='text'>My changes to Microsoft's DynamicExpression</title><content type='html'>Hi,&lt;br /&gt;I've presented Microsoft work with dynamic expression parsing on &lt;a href="http://dotdotnet.blogspot.com/2010/06/dynamic-parsing-of-string-into.html"&gt;previous post&lt;/a&gt;.&lt;br /&gt;Now I'll like to present my upgrades to it: I've add both Select and SelectMany enumerable operations as well as some more Enumerable "simple" methods like First, Last and Distinct.&lt;br /&gt;&lt;br /&gt;The Select and SelectMany are more tricky because they have dynamic nature - they do not have static parameter types and return value type so they need to be handle little different.&lt;br /&gt;My addition are to the dynamic string parsing language - the library already had strong type Select method but did not support putting Select inside a string for parsing.&lt;br /&gt;&lt;br /&gt;The code is inside a gist at &lt;a target="_blank" href="http://gist.github.com/489298"&gt;http://gist.github.com/489298&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-8161210981348108631?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/8161210981348108631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=8161210981348108631' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/8161210981348108631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/8161210981348108631'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2010/07/my-changes-to-microsofts.html' title='My changes to Microsoft&apos;s DynamicExpression'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-3293276037468807660</id><published>2010-06-30T12:04:00.002+03:00</published><updated>2010-06-30T12:12:09.506+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><title type='text'>Dynamic Parsing of String into ExpressionTree</title><content type='html'>For some reason Microsoft hide the work done by Microsoft itself and other people to get LINQ more dynamic - that is parsing string into Expression object.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The code can be downloaded from Microsoft &lt;a href="http://msdn.microsoft.com/en-us/vcsharp/bb894665.aspx"&gt;here&lt;/a&gt; (you can find the code inside LinqSamples\DynamicQuery\DynamicQuery\Dynamic.cs)&lt;/div&gt;&lt;div&gt;Explanation about this code can be found at &lt;a href="http://www.cnblogs.com/flysnow-z/archive/2009/06/16/1504338.html"&gt;Ryan's House blog&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: verdana,  Arial; font-size: 23px; color: rgb(51, 51, 51); line-height: 24px; "&gt;&lt;a id="Header1_HeaderTitle" class="headermaintitle" href="http://www.cnblogs.com/flysnow-z/" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(255, 255, 255); "&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are already couple of things to fix but it is great piece of code that can be very useful to allow user extend an application without programmer needed.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-3293276037468807660?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/3293276037468807660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=3293276037468807660' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/3293276037468807660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/3293276037468807660'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2010/06/dynamic-parsing-of-string-into.html' title='Dynamic Parsing of String into ExpressionTree'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-135761724140126018</id><published>2010-06-28T12:31:00.008+03:00</published><updated>2010-06-28T13:39:15.205+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WebSocket'/><title type='text'>Glassfish/Grizzly WebSocket</title><content type='html'>Hi,&lt;div&gt;I'm trying to get a WebSocket server application working using Glassfish 3.1.&lt;/div&gt;&lt;div&gt;There is very little information about how to do it since both Glassfish 3.1 and WebSocket are not finished yet. The best source I've found so far is &lt;a href="http://www.antwerkz.com/glassfish-web-sockets-sample/"&gt;Antwerkz, Inc.&lt;/a&gt; which like this post got out-of-date pretty quickly.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'll try to publish here the things I did manage to get working hope it will help other in the way.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'm currently using Glassfish 3.1 nightly build (glassfish-3.1-b07-06_27_2010) and NetBeans 6.8 development release (201006130001). I'm working on Windows XP Pro machine.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I've copy the following files from glassfish\modules into my project\lib:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;grizzly-websockets.jar&lt;/li&gt;&lt;li&gt;grizzly-utils.jar&lt;/li&gt;&lt;li&gt;grizzly-http.jar&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Those files needed because I use classes from them in my project code.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Another important thing (and easy to forget) is to turn on web socket support in grizzly by running this command:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="  color: rgb(85, 85, 85); line-height: 20px; font-family:Verdana, Geneva, sans-serif;font-size:12px;"&gt;&lt;div class="wp_codebox"  style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(17, 0, 0); width: 578px; background-color: rgb(249, 249, 249); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: silver; border-right-color: silver; border-bottom-color: silver; border-left- overflow-x: auto; overflow-y: auto; color:silver;"&gt;&lt;table  style="border-collapse: collapse; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border- width: 898px; color:initial;"&gt;&lt;tbody&gt;&lt;tr id="p45284"&gt;&lt;td class="code" id="p4528code4" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 2px; padding-right: 4px; padding-bottom: 2px; padding-left: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(170, 170, 170); border-right-color: rgb(170, 170, 170); border-bottom-color: rgb(170, 170, 170); border-left-color: rgb(170, 170, 170); text-align: left; vertical-align: top; "&gt;&lt;pre class="bash"    style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; word-wrap: break-word; overflow-x: visible; overflow-y: visible; font-style: italic; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border- width: auto; float: none; clear: none;  line-height: 1.333; text-align: left;  background-position: initial initial; background-repeat: initial initial; font-family:monospace;font-size:12px;color:initial;"&gt;asadmin &lt;span style="color: rgb(0, 0, 0); font-weight: bold; "&gt;set&lt;/span&gt; configs.config.server-config.network-config.protocols.protocol.http-listener-&lt;span style="color: rgb(0, 0, 0); "&gt;1&lt;/span&gt;.http.websockets-support-enabled=&lt;span style="color: rgb(194, 12, 185); font-weight: bold; "&gt;true&lt;/span&gt;&lt;/pre&gt;&lt;div&gt;&lt;span style="color: rgb(194, 12, 185); font-weight: bold; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;I've used a servlet to register my WebSocket application.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is the code for the servlet:&lt;/div&gt;&lt;div style="text-align: auto;"&gt;&lt;span class="Apple-style-span"   style="  color: rgb(17, 0, 0); line-height: 20px; font-family:Verdana, Geneva, sans-serif;font-size:-webkit-xxx-large;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="border-collapse: collapse; line-height: normal; font-size:medium;"&gt;&lt;pre face="Andale Mono, Lucida Console, Monaco, fixed, monospace" size="12px" color="#eee" style=" color: #000000; background-border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;public class WebSocketServlet extends HttpServlet {&lt;br /&gt;&lt;br /&gt;private static final Logger logger = Logger.getLogger("WebSocketServlet");&lt;br /&gt;&lt;br /&gt;@Override&lt;br /&gt;public void init(ServletConfig config) throws ServletException {&lt;br /&gt;ChatApplication app = new ChatApplication();&lt;br /&gt;String appUri = config.getServletContext().getContextPath() + "/chat";&lt;br /&gt;WebSocketEngine.getEngine().register(appUri, app);&lt;br /&gt;//WebSocketEngine.getEngine().register(config.getServletContext().getContextPath() + "/chat", app);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@Override&lt;br /&gt;public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;super.service(req, res);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: auto;"&gt;&lt;span class="Apple-style-span"   style="  color: rgb(17, 0, 0); line-height: 20px; font-family:Verdana, Geneva, sans-serif;font-size:-webkit-xxx-large;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="border-collapse: collapse; line-height: normal; font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;In order for this servlet will actually get initialized we have to change web.xml file in WEB-INF:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;span class="Apple-style-span"   style="font-family:monospace;font-size:100%;"&gt;&lt;span class="Apple-style-span"  style=" line-height: normal; white-space: normal;font-size:13px;"&gt;&lt;span class="Apple-style-span"  style="font-size:100%;"&gt;&lt;span class="Apple-style-span"  style=" line-height: 14px; white-space: pre;font-size:12px;"&gt;&lt;span class="Apple-style-span"  style="line-height: normal; white-space: normal;  font-size:13px;"&gt;&lt;div&gt;&amp;lt;servlet&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;servlet-name&amp;gt;WebSocketServlet&amp;lt;/servlet-name&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;servlet-class&amp;gt;websocketchat.WebSocketServlet&amp;lt;/servlet-class&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;load-on-startup&amp;gt;1&amp;lt;/load-on-startup&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/servlet&amp;gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;code&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/code&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now we left with implement &lt;b&gt;ChatApplication&lt;/b&gt; and &lt;b&gt;ChatWebSocket &lt;/b&gt;which I will cover once I'll actually get them to work.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;The things I can't understand yet:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;How is responsible to set isConnected on the socket? is it me or the framework?&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;How to broadcast message to several (all or part) sockets without suffer from delay due to closed or unresponsive sockets?&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hope it helps,&lt;/div&gt;&lt;div&gt;Ido&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-135761724140126018?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/135761724140126018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=135761724140126018' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/135761724140126018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/135761724140126018'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2010/06/glassfishgrizzly-websocket.html' title='Glassfish/Grizzly WebSocket'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-1616377529315527565</id><published>2010-04-25T16:24:00.006+03:00</published><updated>2010-06-30T15:00:56.126+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DebuggerTypeProxy Debugger C#'/><title type='text'>Lazy Load Eager Debugging</title><content type='html'>In the project I'm currently working on we have entity model which use &lt;a href="http://en.wikipedia.org/wiki/Lazy_loading"&gt;Lazy Loading&lt;/a&gt; fetch of properties. Wether it is a property referring to another entity or collection of entities we load it lazy. The same thing can be configured if you use &lt;a href="http://nhforge.org/wikis/howtonh/lazy-loading-eager-loading.aspx"&gt;NHibernate&lt;/a&gt; for your entity model.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Another thing is that debugger and specifically &lt;a href="http://msdn.microsoft.com/en-us/library/aa290869(VS.71).aspx"&gt;Visual Studio Watch window&lt;/a&gt; is not so friendly to lazy loading because the Watch window try to evaluate the value of each property which cause all the lazy loading properties to be loaded.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To overcome this problem Visual Studio offer several options: DebuggerDisplay and DebuggerTypeProxy both from System.Diagnostics namespace.&lt;/div&gt;&lt;div&gt;The former simply use a string to override the string display for the entity instance itself. It is not very helpful and does not work well with inheritance.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The later, DebuggerTypeProxy, is very useful in this case. It allow us to tell the Watch window to use a proxy class when watching on the properties of the real class and by doing so prevent any lazy loading properties from been evaluated just because we watch them.&lt;/div&gt;&lt;div&gt;DebuggerTypeProxy also works great with inheritance since you can inherit your proxy class from another proxy class and by doing so create hierarchy of proxies, each of which display information about it own level in the hierarchy.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Off couse the Watch window still allow the developer to watch on the raw instance itself, but remember that doing so will cause any lazy property to be evaluated.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is a sample code:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;div class="csharpcode"&gt;&lt;br /&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;[DebuggerTypeProxy(&lt;span class="kwrd"&gt;typeof&lt;/span&gt;(ClientDebuggerProxy))] &lt;span class="kwrd"&gt;class&lt;/span&gt; Client {&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; name;&lt;/pre&gt;&lt;br /&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; Client wife;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; Client Wife&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;{&lt;/pre&gt;&lt;br /&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;get {&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; (wife == &lt;span class="kwrd"&gt;null&lt;/span&gt;) wife = LazyLoadWife();&lt;/pre&gt;&lt;br /&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;&lt;span class="kwrd"&gt;return&lt;/span&gt; wife;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;&lt;span class="kwrd"&gt;internal&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ClientDebuggerProxy&lt;/pre&gt;&lt;br /&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;{&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; Client client;&lt;/pre&gt;&lt;br /&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt; &lt;span class="rem"&gt;// The constructor for the type proxy class must have a&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt; &lt;span class="rem"&gt;// constructor that takes the target type as a parameter.&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; ClientDebuggerProxy(Client client)&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt; {&lt;/pre&gt;&lt;br /&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;  &lt;span class="kwrd"&gt;this&lt;/span&gt;.client = client;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt; }&lt;/pre&gt;&lt;br /&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; Client Wife&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;{&lt;/pre&gt;&lt;br /&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;&lt;span class="rem"&gt;// Notice we return lower case wife, which is a field.&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;get { &lt;span class="kwrd"&gt;return&lt;/span&gt; client.wife; }&lt;/pre&gt;&lt;br /&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;As you can see from this simple sample, we have a Client class which has lazy property Wife. On the debugger proxy class we return the wife field instead of lazy loading it so we can use the Watch window to see the real state of the instance without changing it.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-1616377529315527565?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://msdn.microsoft.com/en-us/library/ms228992.aspx' title='Lazy Load Eager Debugging'/><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/1616377529315527565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=1616377529315527565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/1616377529315527565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/1616377529315527565'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2010/04/lazy-load-eager-debugging.html' title='Lazy Load Eager Debugging'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-8363863249671894654</id><published>2010-02-22T22:54:00.004+02:00</published><updated>2010-02-23T02:30:13.104+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>My Shot at Migrating svn to git</title><content type='html'>Hi there,&lt;div&gt;I've decide to migrate my source code repository from svn to git (both are still hosted at &lt;a href="http://www.assembla.com"&gt;assembla&lt;/a&gt;).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After playing with git for some time in my Mac and experimenting it little less in Windows in both NetBeans 6.8 using &lt;a href="http://nbgit.org/"&gt;NBGit&lt;/a&gt; and Visual Studio 2008 using &lt;a href="http://code.google.com/p/gitextensions/"&gt;GitExtensions&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'm storing both J2EE application and C# WPF application under a single directory because they are tied together so I want a single git repository and work in both NetBeans and Visual Studio at the same time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The NBGit is very young and does not have much features although it does the trick of commit changed files and show history.&lt;/div&gt;&lt;div&gt;GitExtensions on the other hand if full of commands, visual history of the repository, diff and more. The only thing it still lack is tighter integration with Visual Studio like display the status of files in the solution explorer and Pending Checkin (or Status) window which is part of Visual Studio. But it's more than enough to work and have fun with.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I've decide not to import my svn repository into git although it is possible. I though that it's time to clean the place and start fresh.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;git has the promise of easy and fast branch and marge - without the need for internet connection.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Only time will tell if it was a wise decision.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-8363863249671894654?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/8363863249671894654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=8363863249671894654' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/8363863249671894654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/8363863249671894654'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2010/02/my-shot-at-migrating-svn-to-git.html' title='My Shot at Migrating svn to git'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-2849714918674937932</id><published>2010-01-11T21:00:00.005+02:00</published><updated>2010-01-11T21:08:45.484+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Control'/><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='Timeline'/><title type='text'>TimelineControl</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=timelinecontrol&amp;amp;DownloadId=100431"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 286px; height: 109px;" src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=timelinecontrol&amp;amp;DownloadId=100431" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;Finally I took the time to arrange and upload my &lt;a href="http://timelinecontrol.codeplex.com"&gt;TimelineControl&lt;/a&gt; to &lt;a href="http://codeplex.com"&gt;CodePlex&lt;/a&gt;.&lt;div&gt;The TimelineControl is 100% C# managed code WPF control for visualization of data on a timeline.&lt;/div&gt;&lt;div&gt;It separate behavior from visual aspect, like any other WPF control using Attached Properties to connect your data model properties to properties require by TimelineControl and it inner working classes.&lt;/div&gt;&lt;div&gt;It has support for different arrangement of items, currently there is Gantt items panel and Compact items panel.&lt;/div&gt;&lt;div&gt;It also support connection between data items you visualize so for example you can display dependencies between tasks.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Any suggestions or comments are very welcome.&lt;/div&gt;&lt;div&gt;I hope it will be useful for others.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-2849714918674937932?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/2849714918674937932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=2849714918674937932' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/2849714918674937932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/2849714918674937932'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2010/01/timelinecontrol.html' title='TimelineControl'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-5414319063539340586</id><published>2008-11-29T08:57:00.009+02:00</published><updated>2008-12-02T10:23:32.636+02:00</updated><title type='text'>Refresh CellTemplate in ListView When Content Changes</title><content type='html'>There is one thing (at least) in WPF which lack update mechanism and that is DataTemplateSelector.&lt;br /&gt;&lt;div&gt;Imagine you implement a property grid inside a ListView control. You will have three columns: Name, Type, Value.&lt;/div&gt;&lt;div&gt;Name is easy, it is just a TextBox, Type is also easy, is it a combo box from which you select predefine types (string, integer, date, color).&lt;/div&gt;&lt;div&gt;The hard one is Value since its template has to be changed when the Type is change.&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;The Problem:&lt;/span&gt; DataTemplateSelector does not have a way of signaling that the template needs to be re-evaluated. Once WPF select a template it will stay with it&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;The Solution:&lt;/span&gt; The solution for re-evaluating data template selector for ListView is to refresh the DataTemplateSelector bound to the column's CellTemplateSelector property.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;The Explanation: &lt;/span&gt;I'm a fan of M-V-VM paradigm, so I usually have my UserControl or Window's DataContext property set to an instance of my ViewModel class.&lt;/div&gt;&lt;div&gt;In my XAML, I bind my GridColumn's CellTemplateSelector property to my TemplateSelector property of my ViewModel.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Code:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;internal class EditActionPropertiesViewModel&lt;br /&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;private DataTemplateSelector m_ValueDataTemplateSelector = null;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;public DataTemplateSelector ValueDataTemplateSelector&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;get { return m_ValueDataTemplateSelector; }&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;private set&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;m_ValueDataTemplateSelector = value;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;OnPropertyChanged("ValueDataTemplateSelector");&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;internal void RefreshValueTemplateSelector()&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;ValueDataTemplateSelector = new ValueEditorCellTemplateSelector();&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;XAML:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;UserControl&amp;gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&amp;lt;ListView&amp;gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;&amp;lt;ListView.View&amp;gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;&amp;lt;GridView&amp;gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;    &lt;/span&gt;&amp;lt;GridView.Columns&amp;gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;     &lt;/span&gt;&amp;lt;GridViewColumn Header="Type" CellTemplate="{StaticResource TypeCellTemplate}"&amp;gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;     &lt;/span&gt;&amp;lt;GridViewColumn Header="Value" CellTemplateSelector="{Binding ValueDataTemplateSelector}"&amp;gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;    &lt;/span&gt;&amp;lt;/GridView.Columns&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;&amp;lt;/GridView&amp;gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;&amp;lt;/ListView.View&amp;gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&amp;lt;/ListView&amp;gt;&lt;/pre&gt;&lt;pre&gt;&amp;lt;/UserControl&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;Remember that the DataContext of the grid column is the ViewModel, not each ListViewItem's DataItem.&lt;/div&gt;&lt;div&gt;So, any time any of the properties' Type changes, we need to signal that the TemplateSelector property has change and WPF will re-evaluate the data templates.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-5414319063539340586?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/5414319063539340586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=5414319063539340586' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/5414319063539340586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/5414319063539340586'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2008/11/refresh-celltemplate-in-listview-when.html' title='Refresh CellTemplate in ListView When Content Changes'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-5386857787230392642</id><published>2008-11-08T02:13:00.005+02:00</published><updated>2008-11-08T02:37:13.624+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Conversation'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='NHibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='ORM'/><title type='text'>Long Running Conversation with NHibernate</title><content type='html'>I am implementing a Windows Application which use WPF for presentation layer and &lt;a href="http://www.nhibernate.org/"&gt;NHibernate&lt;/a&gt; for O/R mapping. Off course I'm diving the application for &lt;a href="http://en.wikipedia.org/wiki/Model-view-controller"&gt;MVC&lt;/a&gt; or more accurately &lt;a href="http://blogs.msdn.com/johngossman/archive/2005/10/08/478683.aspx"&gt;Model/View/ViewModel&lt;/a&gt; due to the use of WPF.&lt;div&gt;I have been reding the book "&lt;a href="http://dotnet.org.za/kuate/archive/2007/01/28/nhibernate-in-action.aspx"&gt;NHibernate In Action&lt;/a&gt;" to try and learn how to use NHibernate in a good practice sort of way.&lt;/div&gt;&lt;div&gt;I have fail to find good documentation which explain how to use NHibernate in Windows Application, and more specifically how to create a separation  to layers including NHibernate (how NHibernate incorporate to MVC design pattern).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, I've &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;a href="http://www.manning-sandbox.com/thread.jspa?messageID=77245"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;ask that question in the forum of the book&lt;/span&gt;&lt;/a&gt;&lt;/span&gt; and got an answer.&lt;/div&gt;&lt;div&gt;You are welcome to read the thread and I'll keep on update here as I'll implement the solution.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-5386857787230392642?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/5386857787230392642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=5386857787230392642' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/5386857787230392642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/5386857787230392642'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2008/11/long-running-conversation-with.html' title='Long Running Conversation with NHibernate'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-3112376923767524741</id><published>2008-10-03T13:31:00.004+03:00</published><updated>2008-10-03T13:37:15.452+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Network'/><category scheme='http://www.blogger.com/atom/ns#' term='DnA'/><title type='text'>Everything is a network</title><content type='html'>&lt;span class="Apple-style-span"  style=" ;font-family:'Times New Roman';"&gt;&lt;div style="margin-top: 8px; margin-right: 8px; margin-bottom: 8px; margin-left: 8px; font: normal normal normal small/normal arial; "&gt;&lt;span class="Apple-style-span"   style="  ;font-family:'Times New Roman';font-size:16px;"&gt;&lt;div style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; width: auto; font: normal normal normal 100%/normal Georgia, serif; text-align: left; "&gt;The new project I'm currently working on, called Dynamic Network Adapter (or &lt;span class="goog-spellcheck-word"  style="background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background- background-position: initial initial; color:yellow;"&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;DnA &lt;/span&gt;&lt;/span&gt;for short) evolve around the idea that networks are great tool and can help model the world.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can see it in many different areas. Social Network really took of in the past two years and this is just one area.&lt;/div&gt;&lt;div&gt;Computer network are part of our life.&lt;/div&gt;&lt;div&gt;Even terrorist networks are kind of network.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What I'm trying to say is that working with a man that thought me to see network is everything seem wired at the time. But now it much easy to watch on human behavior and process happening around us as network.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We are developing a computer model to use this network thinking for different purposes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;More will come.&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-3112376923767524741?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/3112376923767524741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=3112376923767524741' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/3112376923767524741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/3112376923767524741'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2008/10/everything-is-network.html' title='Everything is a network'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-2108956654516462965</id><published>2008-08-25T10:16:00.003+03:00</published><updated>2008-08-27T08:54:03.549+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Object'/><category scheme='http://www.blogger.com/atom/ns#' term='DnA'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='ORM'/><title type='text'>NHibernate</title><content type='html'>I've start to work on a new project.&lt;br /&gt;One of the base building blocks of that project is something we call "bank".&lt;br /&gt;Bank can be anything from simple list of items (which maps to simple table in a database) to a complex network of objects like tree for example (which maps to several tables with relation in a database).&lt;br /&gt;&lt;br /&gt;I've start to write some sample code to see how I can solve this problem. I've worked for a week just to produce a solution to loading a bank from a database tables. I've not yet got to saving the bank back to the database.&lt;br /&gt;&lt;br /&gt;Then, after talking to a friend about this problem, I've got to learn about &lt;a href="http://www.nhibernate.org"&gt;NHibernate&lt;/a&gt;.&lt;br /&gt;After few hours of reading the getting &lt;a href="http://www.hibernate.org/hib_docs/nhibernate/1.2/reference/en/pdf/nhibernate_reference.pdf"&gt;reference document&lt;/a&gt; and searching the web I've got a solution for both loading and saving virtually any form of bank to and from a database tables.&lt;br /&gt;&lt;br /&gt;I have to say I am amaze from the easy of use and the abilities NHibernate has. All the plumbing of tracking the objects state (loaded, modified, delete) are now in the hand of NHibernate, yet I can "plug" into the process using various plug-in points left by the developers of NHibernate to observe or participate in the process of loading and saving the objects.&lt;br /&gt;&lt;br /&gt;Next time I'll write about "dynamic bank" - how to let the user define bank without the need to create database table.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-2108956654516462965?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/2108956654516462965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=2108956654516462965' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/2108956654516462965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/2108956654516462965'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2008/08/nhibernate.html' title='NHibernate'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-9039223956294908489</id><published>2008-08-17T13:34:00.005+03:00</published><updated>2008-08-28T10:12:43.462+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='clr'/><category scheme='http://www.blogger.com/atom/ns#' term='event'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><title type='text'>CLR Weak Event</title><content type='html'>Since .NET 1.0 Microsoft provide a standard way to register for events of objects.&lt;br /&gt;One of the biggest problem of using the standard event pattern is that the lifetime of the subscriber become governed by the lifetime of the source.&lt;br /&gt;There are several articles about how to overcome this problem, also Microsoft has add a new class to .NET 3.0 called WeakEvent.&lt;br /&gt;I have found WeakEvent class not feat to my needs since it inherit from DependencyObject which is WPF specific object and thus not suited for usage in general program - not related to WPF.&lt;br /&gt;Also, after reading some articles on the net about this issue, I have realized that most of the solution came from the source side, that is changing the object exposing the event to allow weak events, but this is not always the case - sometime you need to you compiled, closed, even seal object and to register to its events weakly.&lt;br /&gt;&lt;br /&gt;So, the solution was involved around &lt;a href="http://www.blogger.com/msdn.microsoft.com/en-us/library/system.weakreference.aspx"&gt;WeakReference&lt;/a&gt; class.&lt;br /&gt;The idea is simple, we want to register to event of source (call it S) with the receiver (call it R).&lt;br /&gt;In classic .NET event S always keep strong reference to R, usually R also keep strong reference to S.&lt;br /&gt;We need to break the strong reference between S and R so that even when S is still alive, it will not keep R alive any longer then it really needs.&lt;br /&gt;We do this by creating new class (call it M) which will mediate the event from the source to the receiver. M will be register to the event on S and will keep a weak reference to R. M will also need to check if R is still alive before dispatching the event.&lt;br /&gt;&lt;br /&gt;The code:&lt;br /&gt;&lt;br /&gt;class S&lt;br /&gt;{&lt;br /&gt; public event EventHandler SomeHappen;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class R&lt;br /&gt;{&lt;br /&gt; R(S s)&lt;br /&gt; {&lt;br /&gt;   new M(this, s);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; private void HandleSomeHappen(object sender, EventArgs e)&lt;br /&gt; {&lt;br /&gt;   ...&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; private class M&lt;br /&gt; {&lt;br /&gt;   private WeakReference _r;&lt;br /&gt;   private S _s;&lt;br /&gt; &lt;br /&gt;   M(R r, S s)&lt;br /&gt;   {&lt;br /&gt;     _s = s;&lt;br /&gt;     _r = new WeakReference(r);&lt;br /&gt;     s.SomeHappen += DispatchSomeHappen;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   private void DispatchSomeHappen(object sender, EventArgs e)&lt;br /&gt;   {&lt;br /&gt;     R r = (R)_r.Target;&lt;br /&gt;      if (r == null) {&lt;br /&gt;        _s.SomeHappen -= DispatchSomeHappen;&lt;br /&gt;     } else {&lt;br /&gt;        r.HandleSomeHappen(sender, e);&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;As you can see this solution is not generic.&lt;br /&gt;I used a private class to dispatch the events sine I want to be able to leave the handle method in the receiver class private or protected.&lt;br /&gt;Most of the work is done in DispatchXXX method which first check if the target has been garbage collected already, in this case we unregister from the event and leave M to be collected next. Otherwise we dispatch the event to the receiver object and let it handle the event.&lt;br /&gt;&lt;br /&gt;I'm trying to make this solution more generic, but I yet to find the way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-9039223956294908489?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/9039223956294908489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=9039223956294908489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/9039223956294908489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/9039223956294908489'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2008/08/net-events-and-object-lifetime.html' title='CLR Weak Event'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-4054332989541917258</id><published>2006-12-09T18:48:00.000+02:00</published><updated>2006-12-17T22:07:06.381+02:00</updated><title type='text'>Synchronizing the ListViews</title><content type='html'>As you remember, I am developing a .NET project which display gantt graphs.&lt;br /&gt;As we start to develope the UI part we decide we need our view to be devided into two parts: text and graph. This is the same as Microsoft Project view.&lt;br /&gt;&lt;br /&gt;Since we need both views to display header on the top and row for each activity in the gantt we decide to use WPF ListView control. ListView inhreit from ListBox and add switchable View property as well as other features.&lt;br /&gt;&lt;br /&gt;I will not go into details about the implementation of the ListViews here, what I would like to concentrate now is &lt;strong&gt;how can we synchronize the vertical scroll-bar of the two lists&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;We decide that the verical scroll bar of the text view should be hidden while the vertical scroll bar of the graph view should be visible. This way we need to scroll the text view list when-ever the graph view is scroll.&lt;br /&gt;&lt;br /&gt;After much experements and trail-and-error tests I come up with the following solution: &lt;strong&gt;I will walk the visual tree of the two ListViews, grab and save the reference to both ListView's ScrollViewer internal element and use it to synchronize the ListViews&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;I have also consulte Microsoft WPF Development Team members and they confirm my solution is the best they can think of as of this moment.&lt;br /&gt;&lt;br /&gt;I have written a class called ItemsControlVerticalSynchornizer which synchronize the vertical scrollbar of ItemsControl, or any dervied class. I will upload the class to this post as soon as possible.&lt;br /&gt;&lt;br /&gt;Hope you enjoy,&lt;br /&gt;Ido.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-4054332989541917258?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/4054332989541917258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=4054332989541917258' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/4054332989541917258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/4054332989541917258'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2006/12/synchronizing-listviews.html' title='Synchronizing the ListViews'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-1788812703054000801</id><published>2006-10-28T22:46:00.000+02:00</published><updated>2006-12-10T07:56:29.826+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='book review'/><title type='text'>Book Report: Application = Code + Markup by Charles Petzold</title><content type='html'>Another great book by &lt;strong&gt;Charles Petzold - Application = Code + Markup&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;I have pre-order this book from Amazon about a month ago. I decide it better to learn from the experience of someone like Petzold and not try to learn all about WPF from the Internet.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The book is great&lt;/strong&gt;, &lt;strong&gt;every paragraph teach you something new&lt;/strong&gt;. He progress slowly but surely and address all the question you might have about almost every aspect of WPF.&lt;br /&gt;&lt;br /&gt;Before reading that book I know WPF is awesome from the videos and screen-shoots I saw. &lt;strong&gt;After&lt;/strong&gt; &lt;strong&gt;reading the book I am amazed from the work Microsoft had put into Windows Presentation Foundation&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;This book can get you up-and-running with WPF in two weeks&lt;/strong&gt;. That what it took me. Two weeks or reading and playing with WPF and I am now feel like I'm ready to develope great looking applications.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;I really recommend this book to anyone how like to learn WPF in the right way.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Thank you Charles Petzold,&lt;br /&gt;Ido.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-1788812703054000801?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.charlespetzold.com/wpf/' title='Book Report: Application = Code + Markup by Charles Petzold'/><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/1788812703054000801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=1788812703054000801' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/1788812703054000801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/1788812703054000801'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2006/10/book-report-application-code-markup-by.html' title='Book Report: Application = Code + Markup by Charles Petzold'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-5935513843416503343</id><published>2006-10-28T22:15:00.000+02:00</published><updated>2006-10-28T22:32:07.034+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wpf'/><category scheme='http://www.blogger.com/atom/ns#' term='gantt'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='wcf'/><title type='text'>Gantt - The current project</title><content type='html'>Hello,&lt;br /&gt;As a starter for my blog I am going to share with you my up-coming task of architect and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0" onclick="BLOG_clickHandler(this)"&gt;develope&lt;/span&gt; a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1" onclick="BLOG_clickHandler(this)"&gt;gantt&lt;/span&gt; system using C#, .NET 2.0, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2" onclick="BLOG_clickHandler(this)"&gt;WCF&lt;/span&gt; and hopefully &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3" onclick="BLOG_clickHandler(this)"&gt;WPF&lt;/span&gt;. I am a team-member and there are other great people working on this task.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Background&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4" onclick="BLOG_clickHandler(this)"&gt;Gantt&lt;/span&gt; is a way to communicate progress of task between managers and workers.&lt;/strong&gt;&lt;br /&gt;The system will be much like Microsoft Project. The reason we are not going to use Microsoft Project is because &lt;strong&gt;our business model is much different and we have a lot of security issues&lt;/strong&gt; like permissions to see activity, permission to report activity times and so on.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;The Architecture&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;We are using a 3-tier architecture&lt;/strong&gt; to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5" onclick="BLOG_clickHandler(this)"&gt;develope&lt;/span&gt; our application. It means we have a &lt;strong&gt;database, middle-tier and presentation layer&lt;/strong&gt;. We prefer to do most of the calculations in the middle-tier and send to the client a clean read-to-use objects (or tables).&lt;br /&gt;On the client we get the object model and we present it to the client, allowing it to examine it and to act on it.&lt;br /&gt;Our previous version of this application was written in &lt;strong&gt;C++&lt;/strong&gt; and use &lt;strong&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6" onclick="BLOG_clickHandler(this)"&gt;GDI&lt;/span&gt;&lt;/strong&gt; for drawing. This off course lead to pretty dull interface in which alpha-blend is the most exiting feature.&lt;br /&gt;In this version of the application I hope we will use &lt;strong&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7" onclick="BLOG_clickHandler(this)"&gt;WPF&lt;/span&gt;&lt;/strong&gt; because it &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_8"&gt;suppose&lt;/span&gt; to make our life much easier. As someone said, the same way .NET make memory management "Managed" &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9" onclick="BLOG_clickHandler(this)"&gt;WPF&lt;/span&gt; will make graphics "Managed". It means we will create the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_10"&gt;seine&lt;/span&gt; which needs to be display and the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11" onclick="BLOG_clickHandler(this)"&gt;WPF&lt;/span&gt; engine will display it, no &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12" onclick="BLOG_clickHandler(this)"&gt;OnPaint&lt;/span&gt; and WM_PAINT any more.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;To be continued...&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;As the project will progress I will keep posting with news.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-5935513843416503343?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/5935513843416503343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=5935513843416503343' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/5935513843416503343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/5935513843416503343'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2006/10/gantt-current-project.html' title='Gantt - The current project'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34822706.post-115887733775290723</id><published>2006-09-22T01:15:00.000+03:00</published><updated>2006-09-22T01:22:17.753+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='first'/><category scheme='http://www.blogger.com/atom/ns#' term='general'/><title type='text'>My First Post</title><content type='html'>Hello,&lt;br /&gt;Welcome to my new blog.&lt;br /&gt;&lt;br /&gt;My name is Ido Ran, I'm 22 years old (almost 23) and I'm working as a software architecte and developer.&lt;br /&gt;&lt;br /&gt;I have play with computer ever since I was a little child. I start writing programs in the age of 14. In the begining I wrote QBASIC simple programs which have draw circles and make stange sound.&lt;br /&gt;Since then I have learned alot about computer programming and it fasanate me.&lt;br /&gt;&lt;br /&gt;I will write short posts and longer articles about advanced programming issues. I will consitrate on .NET technolegies but I will write about other stuff every one and then.&lt;br /&gt;&lt;br /&gt;Thank you,&lt;br /&gt;Ido Ran.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34822706-115887733775290723?l=dotdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotdotnet.blogspot.com/feeds/115887733775290723/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34822706&amp;postID=115887733775290723' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/115887733775290723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34822706/posts/default/115887733775290723'/><link rel='alternate' type='text/html' href='http://dotdotnet.blogspot.com/2006/09/my-first-post.html' title='My First Post'/><author><name>Ido Ran</name><uri>https://profiles.google.com/113997888652562329648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-2VkfK7NEWKs/AAAAAAAAAAI/AAAAAAAAAAA/3f_5z1C3WlY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
