XAF - Application Performance and Improved Usability (Coming soon in v17.1)

XAF Team Blog
08 May 2017

In this post, I'd like to highlight a few of the more interesting enhancements we've made to XAF in this release cycle.

Platform Agnostic Notifications 

You can now display notifications to users (e.g. confirmation messages, warnings, errors) with ease by calling the new platform-independent ShowViewStrategyBase.ShowMessage method. Depending on method parameters and target platform, your message can be represented by Outlook-like alerts, Windows 10-like toast windows or flyout panels (all powered by DevExpress WinForms Controls and/or DevExtreme HTML 5 widgets). A typical example will look something like this: 

public class ProjectTaskController : ViewController {
    //… 
    MessageOptions options = new MessageOptions();
    options.Duration = 2000;
    options.Message = string.Format("{0} task(s) have been completed!", e.SelectedObjects.Count);
    options.Type = InformationType.Success;
    options.Web.Position = InformationPosition.Bottom;
    options.Win.Caption = "Success";
    options.Win.Type = WinMessageType.Toast;
    Application.ShowViewStrategy.ShowMessage(options);
}

Here are a couple of examples of the UX within Windows and XAF's Web UI:



You can play with this feature in our FeatureCenter. This feature has been successfully test-driven since its initial preview in v16.2.5. v17.1 includes enhancements based on customer requests and offers improved stability due to extended test coverage. Be sure to visit Concepts > UI Construction > Text Notifications to learn more about possible customizations and usage limits.


Optimized controller creation in ListPropertyEditor for detail collections

With this release, XAF powered applications with numerous Controllers associated with detail collections load faster. That is possible because we no longer instantiate non-activated View Controllers due to TargetViewType, TargetViewNesting, TargetObjectType or TargetViewId restrictions. This optimization is automatically enabled in newly generated XAF v17.1 apps. In apps created using older XAF versions, you can set the XafApplication > OptimizedControllersCreation property manually.

The second screenshot (B) illustrates where this improvement will be the most noticeable - a huge application with hundreds of Controllers:



High DPI improvements

In v17.1, desktop apps powered by XAF will offer a consistent appearance across a wide variety of high-DPI display settings. Your WinForms XAF applications will now be scaled correctly when setting the scaling factor (change text size, app and other item options) to a value greater than 100%. To enable the High DPI support, add the 'app.manifest' file to your project and enable the 'dpiAware' option. DPI-aware scaling is also enabled in XAF design-time tools.

Other important changes

Finally, I'd like to repost information from XAF's "Breaking Changes" section. Though not breaking changes, they are important things to consider for every single XAF user:

BC4063 - More secure password generation algorithms for built-in security system classes are available in XAF v16.2 and v17.1
Refer to the FIPS-compliance changes to the DevExpress.Persistent.Base.PasswordCryptographer and DevExpress.ExpressApp.Utils.ImageLoader classes KB Article for additional information.

BC4062 - The Frame.GetController<ControllerType> method may return null when the XafApplication.OptimizedControllersCreation property is set to true
XAF Solution Wizard now sets the XafApplication.OptimizedControllersCreation property to true for newly generated XAF projects. To avoid possible null reference exceptions in nested List Views, always check whether the Frame.GetController<ControllerType> method result is not null when the OptimizedControllersCreation property is true.

BC4038 - WebLayoutManager - Initialization and usage of LayoutItemTemplateContainerBase descendants has been changed
Refer to the Web Layout Manager improvements and important changes in XAF v17.1 KB Article for additional information.

Free DevExpress Products – Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We’ll be happy to follow-up.
Stepan Lauryn
Stepan Lauryn

You are going the right way to increase the performance of XAF based applications. Good luck :-).

8 May 2017
Mohamed Al Zayani
Mohamed Al Zayani

I feel that XAF didn't get enough attention lately. I love to see a road map or future plans for XAF.

e.g. RTL support, Flat look and feel icons, integration of Spreadsheet and Diagrams, ...etc

8 May 2017
Martin Praxmarer - DevExpress MVP
Martin Praxmarer - DevExpress MVP

I love the Optimized controller creation ;))

8 May 2017
Chris Royle (LOB)
Chris Royle (LOBS)

Is there any sort of measure of what level of performance improvement one might see for example B ?

9 May 2017
Dennis (DevExpress)
Dennis Garavsky (DevExpress)

@Chris: In one customer DetailView (btw, it was Martin's app) with 5 visible frames (one main + 4 nested ones for ListPropertyEditors), the opening time was reduced from 1.8sec on 0.5-0.6 seconds on our dev machines (on slower client PCs these numbers can be bigger).

9 May 2017
Dennis (DevExpress)
Dennis Garavsky (DevExpress)

@Mohamed:

Thanks for your feedback. Even though we still monitor XAF user interest in RTL support, it is very low, to be honest. On the other side, adding a proper RTL support implies large investments from our team... So, for now, we can only suggest you enable appropriate options our WinForms and ASP.NET components provide (www.devexpress.com/.../T251590) + implement further tuning on your own. We will be more than happy to hear of your experience with these default options + see screenshots of places which you additionally needed to customize along with custom solution descriptions. With that, we can better estimate this task and probably include some of these solutions by default.

As for replacing default images, this is something that is already in our backlog, though I cannot promise any ETAs for it (currently, it is quite easy to provide your own images as per documentation.devexpress.com/.../CustomDocument112792.aspx).

As for the two last wishes, as you know, it is also already possible to integrate these and any other custom controls unavailable in the standard delivery. This can be done by any XAF user on their own in accordance with their specific business requirements using various options described at documentation.devexpress.com/.../CustomDocument113610.aspx. At this stage, we are not yet ready to create generic XAF modules based on these quite specialized controls so that the majority of our users would benefit from them. It is also important to note here that as framework creators, we always try to put more effort into things, which cannot be done easily or done at all by our users themselves (e.g., performance improvements or some complex modules like new Web or Mobile UIs). We are also paying a lot of attention to improving general developer usability (e.g., APIs, related tooling and documentation). Anyway, we also constantly monitor user requests and popular custom functionality (e.g., map or dashboard components integration, which I recently blogged about) is also being added by us as we develop a good understanding of common and very popular use-case scenarios and come with a universal implementation helpful for the majority. Let me know if you have any further questions on our team priorities.

9 May 2017
Julian Fernandez 1
Julian Fernandez 1

Does XAF use the new ASP.NET Bootstrap controls? I think this would correct many inconsistencies and untidiness in the current ASP.NET theme.

9 May 2017
Dennis (DevExpress)
Dennis Garavsky (DevExpress)

@Julian: No. BTW, exactly what did not you like in the new Web UI?

9 May 2017
Julian Fernandez 1
Julian Fernandez 1

On some occasions the layout breaks down when resized. The dashboard title is incorrectly located. In detail view the title of groups and flaps is not homogeneous. The nested tree list draws an unnecessary space because it automatically hides the pager (in the standard list it does not happen). Some spaces are disproportionate. The checkbox is too spaced. The column selector on the grid is too small... The new Web UI is very useful and colorful but it is also important to be careful with the details.

9 May 2017
Dennis (DevExpress)
Dennis Garavsky (DevExpress)

I appreciate you taking the time to provide such detailed feedback. Our team will process it and contact you with further questions or inform you about updates (I've created a private ticket on your behalf). Thanks again.

9 May 2017

Please login or register to post comments.