Blogs

eXpress App Framework Team

How to use an eXpand module with an existing XAF application

     

Let me describe for a moment how we at DevExpress work. We build and sell software which means that we only sell and provide support for products that have been built and tested by us! However I am here as a framework evangelist and huge XAF fan. This makes it my duty to spread the word as much as I can and make XAF even bigger. To this end through collaboration within the XAF community, we have been building and supporting eXpand. This framework follows XAF to the letter and takes things even further. eXpand gets its inspiration from real life situations and bases itself on examples from DevExpress Support Center. eXpand is the first open source project based on the DevExpress eXpressApp Framework (XAF). More info is available at www.expandframework.com and our very existence relies on your efforts! Anyone is welcome to contribute and enjoy the rewards. It is not necessary to be a XAF guru, we can all manage to create a behavior taken from DevExpress code central. Let’s work together to enhance our beloved XAF!

Using an eXpand module with an existing XAF application is an issue that is being raised a lot recently and I am sure it deserves a post and a place in Xpand Wiki. The following information applies to any Xpand module. Note that installing an Xpand module is almost as easy as using a XAF one.

Introduction

Firstly, as a base type for our application components it is imperative to use XpandWinApplication or XpandWebApplication. Therefore we need to reference Xpand.ExpressApp.Win or Xpand.ExpressApp.Web assemblies from our application projects and replace their components’ base types accordingly,

image

Additionally we need to reference Xpand.Persistent.BaseImpl and set its Copy Local attribute to true. Having similar architecture with XAF, eXpand modules use interfaces and their implementations are hosted in the BaseImpl assembly. Xpand modules know how to locate the Business Objects they require so this is all we need to do at this point.

Note; BaseImpl assembly has no references to DX BaseImpl and it is possible to use a replace it with a custom one .

Registering in Toolbox (Obsolete after v11.1.8.13 - Toolbox is autopopulated now)

Now, unless we are a XAF guru, we have to register the assemblies in the VS toolbox. I suggest creating the toolbox items within a new Xpand Tab as shown. At this point we don’t have the resources to create our own ToolBoxCreator utility. If any VS IDE guru wants to contribute such a tool, we owe him one!

image image

Registration

Registering and using a module is as easy as dragging and dropping it into the Application Designer. The designer will then add all required references and modules for us.

image

Give us your feedback

Was this post useful to you? Do you want to learn more about Xpand framework? We would love to hear your feedback!

Happy eXpanding!

Published Aug 01 2011, 05:33 PM by Apostolis Bekiaris (DevExpress)
Filed under: ,
Technorati tags: eXpandFrameWork, XAF
Bookmark and Share

Comments

 

Alain Bismark said:

Great!

Can you provide information about which functionalities are ready to use inheriting from XpandWinApplication and using Xpand.Persistent.BaseImpl?

Thanks

August 1, 2011 7:39 PM
 

Apostolis Bekiaris (DevExpress) said:

Hi Alain

XpandWinApplication or its interfaces are required from core modules (Xpand.ExpressApp, Xpand.ExpressApp.Win, Xpand.ExpressApp.Web). However it is not imperative to derive from this class, you can instead implement its interfaces (ISupportModelsManager, ISupportCustomListEditorCreation, IWinApplication, ISupportConfirmationRequired, ISupportAfterViewShown, ISupportLogonParameterStore, ISupportFullConnectionString). However this is not trivial as you can tell. Each interface extends application component's behavior. All those interfaces live inside the Xpand.ExpressApp core assembly. The current architecture allows each module to reference the core assemblies and make use of these interfaces as well. This is how the module extends the functionality of the XafApplication descendants. Bottom line if you want to use only one module you may get away by implementing just 1 or to of them

August 2, 2011 2:12 PM
 

Stepan Lauryn said:

Hi, I try add XPAND Library to AF project. I have this error after login to XAF application:

Add a business object that implements Xpand.Persistent.Base.General.ISequenceObject at your AdditionalBusinessClasses (module.designer.cs)

Can you help me?

Stepan

November 6, 2011 5:54 PM
 

Apostolis Bekiaris (DevExpress) said:

Hi Stepan

Consider using Xpand forums to get support its hard to trace or answer tickets here. Thanks for your understanding

November 7, 2011 9:25 AM
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.