Welcome to Windows Communication Foundation (WCF)
Top Tasks :

WCF Community Bloggers

Monday, March 03, 2008 - Posts

  • Consolidated blog feed for Microsoft Regional Directors

    I am one of the Microsoft Regional Directors, which means that I'm in a group containing some of the most thoughtful (and sometimes challenging :) ) people in the Microsoft community. That's a humbling place to be, especially when we all get together and talk about the current and future state of technology! The RD program has a web site, www.TheRegion.com , which includes an aggregated blog summary of all the RD bloggers. Not all RD's blog, but quite a few of us do, and the topics run the entire range from gadgets to hardware to networking to software development to architecture. In short, www.TheRegion.com is a treasure trove of great information! For more information go to www.lhotka.net . Read More...
  • CSLA .NET 3.5 code savings: GetIdValue

    Another place where I was able to reduce business object code in CSLA .NET 3.5 was to effectively eliminate the GetIdValue() method. Prior to version 3.5, GetIdValue() was required, and you had to provide a unique value identifying your object. This value was used to implement Equals() and GetHashCode(), and was used as the ToString() value. This was good, because it enabled the concept of logical equality , where objects were equal to each other based on their id value. For better or worse, WPF doesn't support logical equality. They only support absolute equality - ideally implemented by comparing all properties of the two objects so two objects are only equal if all their properties are equal. A poor man's replacement is to use reference equality - which is much faster but is technically less accurate. The effective default in .NET is reference equality. CSLA .NET 3.5 no longer overrides Equals() or GetHashCode(), so it now uses the .NET default behavior. This makes WPF happy. This might break some people's existing code (though a poll on the forum indicates it is a non-issue for virtually everyone), because there is no longer any idea of logical equality unless you implement it yourself. The upside though, is that you no longer need to override GetIdValue(). I left the method in the framework for backward compatibilty, so if you do override it your code will continue to compile (though the value is now only used in a ToString() override). For more information go to www.lhotka.net . Read More...

Copyright © 2006 Microsoft Corporation. All Rights Reserved. | Terms of Use | Privacy Statement | Contact Us