Hi all,
I've just started investigating XAF. On the first approach it seems quite overwhelming. Maybe this is the reason why I ask this question:
I would like to start a new project with XAF. What would be the "preferred" approach, using DC or XPO?
DC seems to be very attractive and somehow new in the framework. XPO seems to be a proven technology. I know that the Domain Components will be more or less XPO objects in runtime. I just don't know what is "better" to use now? I've read a lot in the documentation, but still I'm a bit lost.
Right now I would prefer DC. But I'm unsure if there are any limitations or problems, since it is "the new kid on the block"? (Well at least since approx. three years… ;) )
Any help or guidance is much appreciated.
Thanks a lot in advance,
Sven
Domain Components (DC) vs. XPO classes for a new project
Answers approved by DevExpress Support
Hello Sven,
Thank you for your interest in our frameworks!
If I were in your shoes, I would rather start with pure XPO classes, because DC is an advanced data management technology, which may be difficult for beginners. Before, we recommended our users look at DC when they are quite good with persistent objects already and want to better reuse your code.
As for DC limitations and specifics, since this is a niche tech, support for it in certain built-in modules is limited + bear in mind that DC involves one more abstraction level above XPO:
- Blazor Web and Mobile apps do not support Domain Components.
- DC - Provide support for Domain Components in the RemoteSecuredDataServer/WcfSecuredDataServer classes
- DC and BO Designer: will DCs be designable soon?
- Association between Domain Component and Domain Object
- DC - Provide the capability to change database mappings for domain components and their members
- DC - provide support for persistent structure-type properties
- DC - Performance problems when multiple inheritance is heavily used (many shared part domain components)
- DC - The XPObjectSpace.FindObjectSpaceByObject method returns null in some circumstances when SecuredObjectSpaceProvider is used
- DC - Cannot refer to the Oid property in XPQuery by casting to DCBaseObject - How to use expression Exists() for SharedPart DC
- How to add a dynamic list member to a domain component (DC) at runtime? - How to reference a domain component (DC) from an XPO business class and vice versa
I hope you find this information helpful.
Hello Dennnis,
I would like to know if there is any performance issues in using DC compared to XPO. As i will be starting to write a complex application, i want to take the right start.
Your advise is highly appreciated!
@Mohammed: I am afraid it is difficult to answer your question, because it is possible to create bad data models with both EF, XPO or DC. I should admit, however, that creating a bad and slow data model with DC is a bit easier, especially if you do not think about how this data model interacts with the database. Finally, with XPO and EF, a developer has more flexibility and capabilities for specific customizations than with DC.