XPO

December 2007 - Posts

  • Some SetPropertyValue/GetPropertyValue overloads will be deprecated

    In future releases of XPO, we will deprecate certain overloads of the SetPropertyValue and GetPropertyValues in XPBaseObject. In a previous post of mine I have outlined some of the various combinations that can currently be used for property implementations in persistent classes, and the case that's the subject of this post is case 1.

    There's a nice little example and an explanation of this case in the original post, but here's a quick summary. The overload in question is the one where the methods do not take a parameter for the property name. This was previously already a scenario that I marked not recommended, because of performance as well as technical issues with it. The performance issues are simply due to the additional work that needs to be done on every single property access, the technical issues I'm referring to relate to changes in .NET 2. Again, for more details about the issues we're having with this, please read this blog post or feel free to contact our support team and request any information you need.

    We have since had a number of support incidents, where programmers were not aware of the implications of this particular implementation, and were wondering about various side effects. In each of those cases, the problem could be solved simply by using one of the method overloads that take the property name as a parameter. As things are, we regret that we ever introduced this seemingly comfortable way of working with the helper methods. As there are now no perceivable advantages left of this approach, we have made the following decision:

    Over the next few releases, these method overloads are going to be marked obsolete, and then removed!
    (Clarification: we are still talking about those overloads of SetPropertyValue and GetPropertyValue that do not take a property name as one of their parameters!)

    As a result, if you are using these overloads, you will start seeing warning messages from the Obsolete attribute in one of the next XPO versions (I'm currently assuming 7.3.6, as 7.3.5 is just out the door). To solve this problem and make sure that your application does what it should (isn't it nice that at least there's some real purpose in this <g>), you will have to insert the property name into the parameter lists of all calls to SetPropertyValue and GetPropertyValue (it's always the first parameter).

    Please feel free to contact us in any way if you want to discuss the matter with us, register disagreement, or if you have questions.

LIVE CHAT

Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

FOLLOW US

DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2017 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners