.NET provides a lot of ways to collaborate between systems. All of them are based on data serialization. XPO is missing that, and have a client project that could not live without some generic type of serialization. So I create a simple but powerful IO engine
- It can serialize any object that inherits DevExpress.Xpo.XPBaseObject.
- It will also serialize any object that is related to the root object of serialization.
- To control the export engine A serialization graph can be provided .
- Object's properties can be serialized according to Serialization Strategy enumeration
- Friendly keys support. For importing data from other RDBMS systems that do not have a GUID primary key
- From a non xaf application I need to import customers based on some filtering taken from a xaf application.
- The design of Customer object differs between applications. In the Xaf application Customer inherits user but in the non Xaf does not. Property names also differ
The above problems can be solved with IO module with easy
2 apps communicating
Lets try to build a WCF service to enable communication. We are going to host it on IIS so create a new WCF Service Application
add an HttpModule to setup an application instance at HttpApplication init. We need to setup an application instance to be sure that the XPDictionary modifications through controllers take place
Our service is going to have the following contract
and implemented as
Now we are able to call the WCF service to get the xml of Customers of the Xaf application and transform it using extension methods defined in IO module like
ps:Import/Export action within a xaf application are inside export predefined category and they are available for all objects