eXpress App Framework Team

  • New XAF Case Study

    I wanted to draw your attention to a recent case study from Jason Schulz – the M5 project. I loved his perspectives on the power of XAF and the XAF community (including his use of the eXpandFramework).

    If you’ve not had a chance to read it yet, you can do so here:

    And before I forget, if you have an XAF project and would like us to showcase it on our site, please do let me know.

  • What's New in 13.2.8 for the eXpressApp Framework (XAF)


    With XAF v13.2.8, you are now able to use ReportsV2 and the previously available Reports modules within the same application. This is good news for those who want to maintain use of existing reports along-side of new reports generated with XAF's ReportsV2 module.

    How it works?

    1. Open the Application Designer for your existing XAF application (one that is using the previously released Reports module) and drop the new ReportsV2  module from the Visual Studio Toolbox:

    2. Create and design a regular XtraReport in Visual Studio, use the new ReportsV2 data sources and then register the report to display it within XAF's application UI.

    3. Run the application and see both legacy and new reports functioning side by side:

      Note that I also renamed the navigation items so you can distinguish between Old and New.

    What is next?

    We have received lots of positive feedback from our customers and plan to officially release ReportsV2 in 14.1 (due late May 2014).  We will be improving the existing documentation and adding more examples to highlight popular scenarios.

    EFDataView - when flexibility and performance matters

    The EFDataView is our new data source that allows arbitrary combinations of calculated and aggregated values to be retrieved from an
    Entity Framework data model.

    As a lightweight read-only list of data records, the EFDataView retrieves records from a database without loading complete entity objects. This list can be queried much more quickly than a real objects collection. If you are familiar with XPO, think of EFDataView as an analog of the XPView component.

    How it works?

    To create an instance of the EFDataView, pass an EFObjectSpace
    instance to the EFDataView constructor or use the IObjectSpace.CreateDataView method. The data view column names and expressions used to compute column values are specified via the Expressions list. By default, this list is empty and you should populate it manually. Both simple properties and complex expressions can be passed to the EFDataView constructor or IObjectSpace.CreateDataView method via the expressions parameter. The valid separator is a semicolon:

    EFDataView dataView = new EFDataView(objectSpace, typeof(Product), "ID;Name;Sales.Sum([Count] * Price)", null, null);

    The data can also be filtered and sorted via the criteria and sorting parameters:

    List<DataViewExpression> dataViewExpressions = new List<DataViewExpression>();
    dataViewExpressions.Add(new DataViewExpression("Count", new AggregateOperand("Sales", Aggregate.Count)));
    CriteriaOperator criteria = new BinaryOperator("Sales.Count", 0, BinaryOperatorType.Greater);
    SortProperty[] sorting = new SortProperty[] {new SortProperty("Name", SortingDirection.Ascending)};
    EFDataView dataView = new EFDataView(objectSpace, typeof(Sale), dataViewExpressions, criteria, sorting);

    Data records are not retrieved from the database when the EFDataView object is created. Instead, the database is queried when you access a specific record by its index or call one of the following methods for the first time: IBindingList.Find, IEnumerable.GetEnumerator, Contains, CopyTo, Count, IndexOf.

    Later, the cached data records are used by these methods. To refresh data, use the Reload method which clears the cache.

    You can limit the number of retrieved data records by using the TopReturnedObjectsCount property.

    Primary usage scenarios

    1. Data source for a visual data-aware control.

    Since the EFDataView implements the IBindingList and ITypedList interfaces, it can serve as a data source for a visual data-aware control, e.g. the grid, chart, pivot or any other. For instance, you can now use this component “as is” on a custom form  that retrieves data from the database via Entity Framework.

    2. Fast and lightweight data calculations in custom business logic.

    The EFDataView retrieves only required data and not entire persistent entities as well as provides great filtering and sorting capabilities. It is perfect to perform quick data calculations as your business logic dictates.
    As an example, when you access a particular data record by its index, a lightweight IDataRecord object is returned:

    IDataRecord dataRecord = dataView[0];

    Now to get a column value within a particular data record, use the IDataRecord.Item property as follows:

    int id = dataView[0]["ID"];

    Here, the "ID" string is the name of the column within the Expressions list. If you use the semicolon-separated string to specify the columns set in the EFDataView constructor, the column name coincides with the expression text:

    int total = dataView[0]["Sales.Sum(Count * Price)"];

    What’s next?

    We want to give an XAF user the flexibility to configure the ListView’s data source mode depending on the required functionality. This will be possible without writing any code, but rather via a setting in the Model Editor. For instance, Currently the ListView operates with entire persistent objects by default, but there will also be a built-in setting to enable the “Data View” mode to achieve a greater performance in certain scenarios (e.g., for analytics and reporting involving large volumes of data).  By introducing the new ViewDataSource component for our new ReportsV2 module in v13.2 we are already on our way to offering more flexibility for an XAF user. As our upcoming release of 14.1 draws near I will be able to share more details, so stay tuned.

  • Improved Entity Framework support in XAF 13.2

    With the release v13.2.6, eXpressApp Framework (XAF) supports Entity Framework 6 by default. If you are upgrading from an earlier version of EF, please take special note of the following Microsoft article: Upgrading to EF6.

    Due to the recent changes to Entity Framework, we have also updated and restructured our documentation to help you get started with Entity Framework in XAF. More is also coming as we simplify some of our EF-related APIs.
    To learn about these changes, please be sure to visit the Business Model Design with Entity Framework section of our docs.

    In addition to service refactorings and usability improvements, v13.2.7 introduces additional features requested by our Entity Framework users. Specifically, we now support composite keys and custom calculated fields in the entity data model. These changes allow your end-users to extend a business model at runtime without recompiling the app. Note that since built-in support for custom fields does not exist in Entity Framework, we had to provide our own implementation (check the docs for more information).

  • A few more reasons to upgrade to v13.2

    13.2 was a great release and many of you already upgraded your applications. For everyone else I am here to help you make that decision sooner and easier, by reminding you what our reviewers had to say, when they upgraded their apps to our latest major release.

    These are real world feedback without any kind of interaction from us.

    Gustavo Marzioni
    Making Business Applications Easier

    Gustavo is a veteran programmer (20 years+) with a great presence in our community (most active user in eXpandFramework). He posted a very complete review of all new XAF features and a few other interesting things we released with 13.2 as part of our DXperience subscription. In addition you can find a performance comparison for our new ReportsV2 module.

    Mario Blataric
    Dungeons of XAF and Magic 13.2

    Mario reviews v13.2 and explains how XAF helps him to fight monsters in today’s modern dungeon of dev technologies and platforms. His XAF app has more than 1500 reports so he focuses on the ReportsV2 module.

    Martynas Dauciunas
    Devexpress 13.2 Review - why bother upgrading ? 

    Martynas known from his very useful Excel Import Wizard module wrote an extensive review of all new features and problems encountered when he updated his 12.x ERP/CMMS application to v13.2.

    Manuel Grundner

    DevExpress 13.2 Review Part 1
    DevExpress 13.2 Review Part 2
    DevExpress 13.2 Review Part 3

    Manuel has already contributed many solutions. This time he wrote a great review for all new XAF features. He also reviewed components not integrated with XAF like the new TaskBarAssistant and as a bonus in part 3 he wrote how to create a module that integrated this component with XAF. This module will soon be integrated into our community project eXpandFramework.

    Robert Anderson
    DevExpress 13.2 Review - Part 1
    DevExpress 13.2 Review - Part 2

    Robert is a casual blogger and community contributor. He wrote about all new 13.2 features along with a few more tricks and thoughts which cannot be found in our official posts.

    Until next time,

    Happy New Year to all!

  • XAF: Soft Validation (What’s New in 13.2)

    Our next major release (13.2), updates our Validation Module with more features that come with different behavior rules, such as Warnings and Information. These can be applied to your existing validation rules using code or the Model Editor.

    The XAF validation module is a mature and flexible validation system, which allows you to create rules that can validate any business problem, For more information, check out the module documentation.

    Suppose we have a Business Object that disallows saving a Customer if the Name property is blank. If this attempted the UI should respond with a “Everybody has a name!” message.


    public class Customer : BaseObject {

        public Customer(Session session) : base(session) { }

        [RuleRequiredField("Customer_Name_Required", DefaultContexts.Save, "Everybody has a name!")]

        public string Name { get; set; }

        public string City { get; set; }

        public int Age { get; set; }


    When an end user tries to save the Customer without a name, XAF will show the Validation Error listview and consequently abort.


    Creating a warning rule

    A common requirement for our Customer class is to warn the end user that, if possible, he/she should provide the Customer’s city. To do this, we need to mark the City property with a  RuleRequiredField. However, this time we have to set the ResultType to Warning as illustrated below.


    public class Customer : BaseObject {

        public Customer(Session session) : base(session) { }

        [RuleRequiredField("Customer_Name_Required", DefaultContexts.Save, "Everybody has a name!")]

        public string Name { get; set; }

        [RuleRequiredField("Customer_City_Warning", DefaultContexts.Save, "Provide the City if possible",

            ResultType = ValidationResultType.Warning)]

        public string City { get; set; }

        public int Age { get; set; }


    When the end user saves the Customer (in runtime) providing a Name and not a City, XAF will again show the Validation Error listview however, this time there will be an extra Ignore action.


    If the end user executes the Close action, the object will not be saved however if he executes the Ignore action it will be saved. In both cases in the detailview there will be a warning action by the City textbox to draw the end user’s attention.


    Creating an Information rule

    XAF allows you to create validation rules even at runtime using the Model Editor. So let’s say we want to just inform the end user, if he enters a Customer Age not between 10 and 60. This means that we need to use a RuleRangeField rule as illustrated in the next two images.



    When the end user saves a Customer (in runtime) with an invalid Age range, XAF will not display the Validation Error listview at all. However, it will display an Information icon to draw his/her attention to the Age property.


    Where to see more examples?

    You may explore our FeatureCenter application located in your C:\Users\Public\Documents\DXperience 13.2 Demos\eXpressApp Framework\FeatureCenter\CS folder to see a few rules in action.

    What about the web?

    The validation module as a platform agnostic module works similarly for the web.


    The soft validation is in its first release (CTP), thus we look forward to your feedback as we get it ready for it’s official release. Let me know what you think.

  • XAF: Easy custom members (What’s New in 13.2)

    With our next major release (13.2), we have simplified the manner in which you are able to add custom and computed fields to existing business models. The functionality is available to both developers and end-users.

    Once beta 1 is released, you can explore this new custom member functionality by exploring the FeatureCenter solution located in the C:\Users\Public\Documents\DXperience 13.2 Demos\eXpressApp Framework\FeatureCenter\CS folder.

    Design time

    As you know, XAF already offered the ability to create non-calculated persistent fields at design time using the Model Editor. In 13.2, we’ve extended the Application Model with an Expression attribute as illustrated in the image below.


    When the Expression attribute has a value, XAF will create a calculated member or it will default to the creation of a persistent member. Additionally, you can create a complex expression such as the Sum of another custom field as illustrated below.


    By design, XAF will not display these custom fields in any view since they were created manually after the Application Model was generated.


    The great thing is that in 13.2, end-users can use the runtime version of the Model Editor to create custom members and extend the business domain as discussed in the previous section.

    The image below illustrates where to locate the custom member in the Windows version of our FeatureCenter (same location for the web).


    To invoke the runtime Model Editor, end-users can execute the Edit Model action.


    You may also want to restrict Application Model modification to certain user groups. You can do that as illustrated below.


    Developers can restrict end-users from creating custom members at runtime by setting the static ModelMemberRequiredCalculator.AllowPersistentCustomProperties to false.

    The Web Runtime

    To create a custom member for the web, you can use the Standalone Model Editor and edit the Model.xafml file located in the root of the web-site.


    Custom members are in their first release (CTP) so we look forward to your feedback as we get it ready for the official release. Let me know what you think.

  • XAF: Reporting V2 (What’s New in 13.2)

    With the upcoming release of the eXpressApp Framework (version 13.2), we’re introducing a new way in which to create reports for your XAF powered application. Simply said, you’ll now be able to create your report using XtraReports within Visual Studio and effortlessly integrate them into your XAF applications.

    This is an introductory post for the ReportsV2 module and I’ll describe it in more detail once we release. For now, please keep in mind that this will ship as a beta. We are looking forward to your feedback so we can continue to improve the module to meet your specific requirements.

    To start using ReportV2, I’ll select it from the toolbox…


    Because ReportsV2 integrates XtraReports at design time, you can use all the examples and documentation form our Reports Team. As you might imagine, when creating reports with this new module, you’ll be writing code and creating your own custom template within Visual Studio using your language of choice (C#, VB.Net). XAF will allow you to preview and print these new templates at runtime much like the existing Reports module. Since the design time report is a template, it is not editable at runtime, however, it is possible to clone it, make an editable copy and continue designing at runtime. In addition to native integration, ReportsV2 should make it easier for you to work with Stored Procedures, SubReports and hosting of custom components (this will be the subject of a dedicated blog post)..

    To integrate XtraReports at design time, our team introduced two new components: the CollectionDataSource and the ViewDataSource. In the first beta release, you will need to add them to your toolbox manually.


    The CollectionDataSource component

    Drag and drop the component from the VS toolbox to the designer template of an XtraReport class. To create the XtraReports class, use existing XtraReports documentation. After setting up the ObjectTypeName to one of your domain objects the CollectionDataSource will load all objects properties as is.


    The ViewDataSource component

    Much like CollectionDataSource, you will need to set the ObjectTypeName property. Note that the ViewDataSource component is designed to load only required plain data properties or aggregated calculations instead of the entire object hierarchy. As a result, you will get better performance and less memory consumption when you are dealing with thousands of records and complex data models. To configure the properties or expressions that will be used as a datasource, you can use the Properties collection as illustrated below.


    Runtime integration

    To load the report you created at design time with the new module, we provide a ModuleUpdater subclass -PredefinedReportsUpdater - which can be used as shown in the snippet below.

    public override IEnumerable<ModuleUpdater> GetModuleUpdaters(IObjectSpace objectSpace, Version versionFromDB) {

        ModuleUpdater updater = new DatabaseUpdate.Updater(objectSpace, versionFromDB);

        PredefinedReportsUpdater predefinedReportsUpdater = new PredefinedReportsUpdater(Application, objectSpace, versionFromDB);

        predefinedReportsUpdater.AddPredefinedReport<XtraReportOrdinary>("Inplace Report", typeof(Contact), isInplaceReport: true);

        predefinedReportsUpdater.AddPredefinedReport<XtraReportView>("Report with ViewDataSource", null);

        return new ModuleUpdater[] { updater, predefinedReportsUpdater };


    We’ve created a specific demo for the ReportsV2 module. It is located in your C:\Users\Public\Documents\DXperience 13.2 Demos\eXpressApp Framework\ReportsV2Demo folder.

    Because ReportsV2 will ship as a beta, we do not recommend its use in production code. We do want to hear your thoughts on ReportsV2 and are looking forward to incorporate your feedback…so please let us know what you think…


  • How to send email for any business scenario without coding

    A few weeks ago, the eXpandFramework released registration support as discussed in How to manage users (register a new user, restore a password, etc.) from the logon form. While users could register, the implementation process was still incomplete it was missing email notification. Thus, this post will discuss the new EmailModule which was made available beginning version

    The module was designed following the workflow discussed in Declarative data auditing. In this post I will demonstrate how to install the module along with the registration functionality discussed in manage users from the logon post in order to create three mail rules.

    1) When new user is registered.
    2) When the password is forgotten.
    3) When a new customer is created.

    In addition I will discuss how to restrict the EmailModue to sending emails only when a specific user role is logged in.

    1) Installation

    To complete installation, drag & drop the EmailModule from the toolbox into the module designer.


    2) Enabling Registration

    To use the registration process, the XpandSecurityWinModule & XpandSecurityWebModule must be installed just as we did with the EmailModule in step 1. Drag & drop these two modules from the toolbox into the module desinger. In addition, use the XpandLogonParemeters as the LogonParametersType of our authentication as illustrated in the following image.


    The final step is to configure the model as shown below.


    When the application starts, the logon form will have two extra actions. See below.


    When the end user executes the top action, the XpandSecurity module will create a new view from the non-persistent RegisterUserParameters class.


    Let’s stop here and configure the rule that will actually send an email..

    4) Sending an email when a user is registered

    The EmailModule will extend the Application model with an extra node


    The first step towards sending an email is to setup the SmtpClient. See below.


    Next we need to create an EmailContext that will instruct the EmailModule on how to locate the email template used for this type of notification.


    Now it’s time to create the actual EmailTemplate. The EmailModule uses the Razor engine and provides an EmailTemplate persistent object for this. Thus, the code snippet inside a ModuleUpdater bellow can do the job!


    And of course, XAF can do its usual magic in terms of the UI, allowing the end user to fully design the template at runtime in both windows and web!


    The next stop is to create the rule that will send an email based on the template created when a new user registers. This is illustrated below.


    and the mail is send!

    5) Sending an email for a forgotten password

    As you might have guessed, the process is awfully similar here. We create a different EmailTemplate persistent object for this type of a notification and then create a new model EmailTemplateContent.


    Then we form a rule, which instead of using the RegisterUserParameters class will use the RestorePasswordParameter and the “pass forgotten Template” context.


    6) Sending an email to all admins when a new customer is created

    The procedure is pretty similar to the steps in the previous section. The difference is that in this case we will not set the CurrentObjectEmailMember attribute, since we want to send the email to all the admins and not to the customer. This is why we will need to create an EmailRecipient context as the image below illustrates.


    After, we must create the actual rule where we will set the EmailReceipientContext attribute..


    7) Sending emails only when a specific user role is logged in

    If you already read the Declarative data auditing post you probably know that all modules that use the Logic module can create rules using three different ways.Code Attributes decorating a class, using the Application Model or using permissions as you see bellow.




    Note that the above layout is inherited from the Logic module using the technique discussed in the Model View inheritance version post.

    An alternative approach is to use the Model Application modifications discussed in this post and using the ModelDifference module apply them to a Role Model and assign that model to the roles you want. For more information on this approach, see Changing your web Model at runtime with Model Editor and no IIS reset.

    Feel free to explore what I discussed in this post in the eXpand source code under Demos/Modules/Email/EmailTester.sln

    As always feel free to use the eXpand forums for your feedback and questions.

    Happy XAF’ing to all!

  • The XAF training week in Germany

    Last week I had the privilege to join many of our customers at Oliver’s XAF Training Class in Germany. I wanted to take the time and share with you what happened at the event – as it was an amazing week and highly recommend it to all XAF users. 

    The location

    The hotel is located high in the mountains and the above an amazing landscape…a simply beautiful location.


    The agenda

    Day 1:

    The organizers (Oliver and John) did a great job with course content. You can see all the XAF courseware below.


    Day 1 started with XPO and how it works independent of XAF. Oliver is an XPO legend so the introduction was amazing and even I learned some new stuff. Oliver then took the time to describe XAF Domain Components and other data layer related subjects.

    The day continued with a number of hands on labs so everyone can learn by actually doing.

    To help get relaxed after a busy day of learning, we spent some time on the golf course.


    Day 2:

    The day started with instruction on editing and maintaining the model as well as standard functionality available through it. Actions, controller extensions binding business logic was also on the menu.

    Oliver is an experienced instructor and did great job in this topic area as well. Like day 1, hands on labs were on day 2’s agenda.


    The day ended with time at the spa and a great dinner.

    Day 3:

    This day involved learning about the built-in modules in XAF and so Oliver spoke to us about Security, Validation, Printing, Reporting, Auditing, State Machines. We covered all simple modules with a few hours of hands on labs.

    To blow off steam, John and Oliver organized an evening at the mini-car race track. Many of us gave it our best shot to win….


    Unfortunately only one person can win… Smile.


    Day 4

    With spirits high, Oliver moved onto more advanced modules like XAF’s Scheduler, KPI, WorkFlow and of course a few hours of hands on labs. He also took the time to go further into more difficult topics such as extending and working outside the XAF framework.

    The class insisted so I also did a presentation on eXpandFramework where I described how you can use all that extended functionality in our community project.

    Day 4’s final event involved alcohol, so I’m not going to post any pictures  here Smile.

    Day 5 

    Unfortunately I had a early flight on the last day and couldn’t attend however I can share the daily agenda.

    • Modularizing your own functionality

    • Testing

    • Deployment / Update / ALM / Security Considerations

    • Q&A

    Way to go to John, Oliver and DevExpress for this amazing XAF training week!

    Until next time, Happy XAF’ing to all!

    Subscribe to XAF feed
    Subscribe to community feed

  • A Google Map module for XAF web applications

    XAF it’s a great platform simply because everything is pluggable and reusable! In this post I will demonstrate one more pluggable and reusable contribution – the MapView module from Sergej Derjabkin!

    Scenario: We have a business object which has an Address property and we want to display them in Google maps. However we have no time to research or develop anything by ourselves.

    Step1: Install the MapView module by drag & drop from the toolbox.


    Step2: Open Application Model editor to configure from where the module will take its data. This requires that we locate the Customer in the BOModel node and simply change the attributes as illustrated below.


    Step3: To display the Customer Addresses, the MapView module provides the MapListEditor. Simply install the MapViewWebModule and assign the list editor to the Customer_ListView.


    Step4: Run the XAF web app and see the results in the map!


    Bonus scenario: Display a detail view of the mapped address.

    Sergej Derjabkin also contributed webmaster detail functionality which is available with XpandSystemAspNetModule so install it as in Step1 and set the MasterDetailMode attribute to ListViewAndDetailView. Youi ‘ll need to override the SupportMasterDetailMode of your WebApplication descendant and return true.


    Simple and fast – the XAF way!

    Sergej Derjabkin released his MapView module as a preview in eXpand v13.1.7.2 and asked me to get your feedback in order to develop further, so feel free to thank him personally and ask your questions or even contribute your code or ideas in eXpand forums. To see MapView module in action use the Demos/Modules/MapView/MapViewTester.sln found in eXpandFramework sources.

    Subscribe to XAF feed
    Subscribe to community feed

Next page »

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 or call us at +1 (818) 844-3383


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, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

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