AussieALF Blog
ObjectLayer… Where is more info?
With 11.2 just around the corner, I figured I would post an update on where I am at.
Currently I stopped my R&D on the ObjectLayer until the 11.2 release, with this release the class and interfaces have had more work done to them (as DX has been working on this implementation for their own systems and also based on feedback from customers).
I believe this is one of the reasons we don’t see alot of documentation on the subject as such, as writing documentation on a evolving set of classes/interfaces would just make alot of work for the tech writers.
As I don’t have alot of R&D time, I wanted to wait until 11.2 which IMHO will be getting closer to a finalised structure (or at least a more extendable structure).
As soon as I can sink my teeth into 11.2 (including any betas that will inevitably be released in the coming month or two) I will be posting my findings and will concentrate on some example projects.
So till then have a Happy Halloween.
Simple Result Helper Class
This isn’t XPO related, but just something that I have been using more and more of recently.
Narrowing and Widening overrides can be very handy, in my case I have created a simple helper class called xResult.
Basically this allows me to return type of xResult and allow passing this xResult whereever MyType is required.
When I use it is where I ask a Helper function to obtain some information for me. So in my example I have a function GetCriteria in a base class that returns a xResult.
Now when I call GetCriteria, if there is some interaction which I need to pass back to “cancel” the operation I can return a xResult which has Succeeded as False. Previously the only option I had was to throw an exception and catch it, this of course isn’t a good practice, the other idea could be to return null, however in this case returning null is a perfectly valid result.
I figured I would post it here incase it helped others or if others had any other suggestions regarding this approach.
State of ObjectLayer
OK, well as you probably are aware I have been researching the ObjectLayer for my commercial application which is currently using the serialization of IDataStoreover WCF.
The aim is to blog about how to achieve certain things using the ObjectLayer, however at this stage, I don’t have anything to report other than I found a brick wall that I am working on how to get over
DevExpress Support Center – My Tags?
OK this one isn’t XPO related however, if you haven’t come across this feature (like myself) then you might be quite happy to learn a bit about it. The Support Center does support favorites, originally there was a favorites system which I had used a little, but when the new one came out I didn’t notice anything to bookmark/favorite an article.
Today I just accidentally found it. So lets look at it.
TIP for XPO ThreadSafeDataLayer
When dealing with services or websites where many operations can be requested asynchronously from different threads, you must ensure that you use the ThreadSafeDataLayer.
The DX help document http://documentation.devexpress.com/#XPO/clsDevExpressXpoThreadSafeDataLayertopic does have a little Note which reads:
Prior to performing any operations with persistent objects in a data store using thread-safe data access layers, call the Session.CreateObjectTypeRecords method to obtain complete metadata information on the persistent objects.
Now the problem is, some XPO novices may run into issues, as per “XPO Best Practices” the Default Session should be null and therefore, this will mean that they will create a new Session using their newly created ThreadSafeDataLayer. The issue is here is that the ThreadSafeDataLayer requires all SchemaUpdates/ObjectType records to already be in place (due to the asynchronous ways the ThreadSafeDataLayer cannot safely ensure that if it did a UpdateSchema/CreateObjectTypeRecords that there isn’t already another thread requesting this)
So, what does this note from DX mean?
More Articles...
- XPO ObjectLayer Tutorial BreakDown
- How to serialize your XPO
- Nullable Type CodeRush Template
- XPO Lightweight Associations
- XPO_EasyFields build 1439
- Minor Update to XPO_EasyFields (beta)
- XPO Associations + Constants = Safety
- Alternative to XPO_EasyFields
- XPO_EasyFields and SetPropertyValue
- ValueConverter example for TimeZones
- How I love DevExpress CodeRush!
- New Site – wiki.alfware.com.au
- How to make XPO easier for everyone
- XPO + WCF = Awesomeness
- What happened to me?
- Some Delays on my next post :(
- Simple Collection to “Lock” Controls using DX Editors
- Need your input
- XPO from the beginning, Part 1, Basic Information
- How to make XPO only update changed fields
- XPO_EasyFields, makes your life easy with XPO
- Do you bloat your app?
- Microsoft JET SQL Reference
- Simple XPO Template for XPOSync bug
- CodeRush Is Your Best Friend for XPO
- Jeez that was painful, I think my new blog is up and running
- Something new for XPO v9.3, Free Joins
- New Blog Site
- Woohoo I am apart of the DevExpress DX-Squad
- XPO Simplified Criteria Syntax explained (part 1)
- Simple binding using DevExpress XtraEditors and XPO Simplified Criteria Syntax
- XPO Simplified Criteria Syntax
- RemoXPO – My adaptation of DevExpress Oliver Sturm’s XPO Publication Service
- DevExpress XPO and .NET Remoting, a perfect match
- Thanks to DevExpress CodeRush CodeIssues it has taught me a simplified initiation of object
- Nice, Simple XtraReport to HTML Email embedding IMG resources code
- My XtraLookupEdit, allows you to bind a DisplayValue and EditValue
- Is WinForms the Dinosaur of Programming?
Latest Comments
- Simple Collection to...
Hey Norman, Keep in mind that Baritem ar... More... - Simple Collection to...
Great many thanks - this said, I'm looki... More... - Simple Collection to...
I just checked my class here and it stil... More... - Simple Collection to...
I'm using Winform DevExpress Library - a... More... - XPO ObjectLayer Tuto...
Cheers Glen, I have held off continuing ... More...





