XAF: Enhancements to Existing Features & Performance Tuning (Coming soon in v14.2)

Grid Designer for List View

In XAF v14.2, responding to customer feedback, we introduce a new easy-to-use way to configure List View columns at design time. Model Editor now includes a designer that imitates the grid filled with sample data. When the ListView | Columns node is focused, the property list to the right is replaced with a design surface. This allows you to see how the grid will be displayed at runtime. Take special note that while the WinForms Data Grid control is displayed at design time. However, the customizations are correctly applied for both WinForms and ASP.NET applications.



The designer provides the same configuration capabilities that are available in XAF WinForms applications at runtime. You can:

  • resize columns;
  • drag and drop column headers to re-arrange columns;
  • hide a column by dragging it outside the grid;
  • show hidden columns using Column Chooser;
  • apply sortinggrouping and filtering;
  • display summaries (when you enable the IsFooterVisible property).


Data-Specific Column Types for ASPxGridView

Starting from version 14.2, opening, paging, grouping, sorting and filtering of lists displayed through the ASPxGridView control in XAF works noticeably faster. We extended our code to use data-specific column types whenever possible. The use of data-specific columns for simple types like System.String, System.DateTime, System.Boolean, etc. allows reducing the request processing time on the server side, reducing rendering time in the browser and reducing traffic due to the simplified page structure. 

Take a look at the video that demonstrates an XAF Web application displaying a grid with 50 objects and 13 columns within Internet Explorer 11 on the test machine with Intel(R) Core(TM) i7-3770 CPU 3.40GHz, 16384MB RAM, Windows 8 Enterprise 64-bit and IIS 7 

ASPxGridView

These are the results of our measurements of this application:

chart

By default, table data in ListView of XAF Web applications is displayed using the ASPxGridView control. Previously, cell values were displayed using the ITemplate templates specified via the GridViewDataColumn.DataItemTemplate property for data cells and GridViewDataColumn.EditItemTemplate for edit cells. With this approach, we have full control of the data representation in grid cells and can use the same editors to display properties in List Views and Detail Views. However, the approach has certain drawbacks, like overall complexity, increased markup generation and rendering time, and difficulties in configuration and customization.
 

To overcome these drawbacks, in version 14.2, we extended our code to use data-specific column types whenever possible. Even though the DataItemTemplate approach is still used when there is no appropriate data-specific column information, the performance impact is significant in many configurations. In the inline edit mode, we still the rich editing capabilities of EditItemTemplate (which are also used in the Detail Views).

You can easily adjust the default columns settings or create  new custom columns using events the following ASPxGridListEditor class events: CustomizeGridViewDataColumnCreateCustomDataItemTemplateCreateCustomEditItemTemplateCreateCustomGridViewDataColumn.

Please note the following limitations of the new mode.

  • You cannot navigate to a referenced object by clicking a cell that displays a reference property.
  • The "N/A" text is not displayed for null reference values.

If you want to revert back to the old mode for any reason, set the static ASPxGridListEditor.UseASPxGridViewDataSpecificColumns property to false in the Global.asax.cs (Global.asax.vb) file:

 
protected void Application_Start(Object sender, EventArgs e) {
ASPxGridListEditor.UseASPxGridViewDataSpecificColumns = false;
// ...
}


New Image Property Editor


As a part of the effort to speed up XAF applications, we will introduced support of byte array image storage for Image Property Editors (in both WinForms and ASP.NET). This allows us to decrease web server memory consumption, because the byte array can contain an image in a compressed format and the server does not have to unpack it. Additionally, you can enable the delayed (or lazy) loading of images to further decrease memory usage. Practically, this means that you can display large list views with lots of images and experience no performance issues. 



Another nice thing about the new editor is that we made it possible to navigate to a detail form when clicking on the image cell in the ListView, which was not present previously.

To use a byte array persistent property as an image storage, simply decorate it with the ImageEditor attribute:

[ImageEditor]
public Byte[] Photo { get; set; }

If you want to implement lazy loading for such properties, check out the examples for Entity Framework and XPO when v14.2 is out.

Notice that the previous approach with the System.Drawing.Image type property is still supported, but we recommend that you migrate to the byte array storage to get the performance benefits described above.


Solution Wizard Improvements


Now you can run the Solution Wizard from an existing solution to add extra XAF projects (Application Server,Workflow Server, etc.):


Additionally the wizard is now included in the DevExpress Template Gallery. Our future plans regarding the wizard include better organization of the XAF Item Templates (ViewController, Frame Templates, etc.) and capability to create test data and configuration for all the XAF extra modules.

Data View Mode for List View

The Data View mode released as a beta in v14.1 is now fully released in 14.2. In this mode, a lightweight read-only list of data records (a data view) is retrieved from a database in a single request without loading complete business objects. This list can be queried much more quickly than a real objects collection. You can now use this feature in your production environment to improve performance for use-case scenarios involving large volumes of data.



Miscellaneous Improvements

·        Specifying a client's logo is now completely simple. You can set the required image using the Logo property of the Application node in the Model Editor. This works both for WinForms and ASP.NET applications, and you no longer need to dig into the details of different approaches for WinForms and ASP.NET in most cases - the framework handles this all for you.

·        Newly created XAF Web apps will now display detail collections in DetailView, which is in 'edit' mode by default (don't worry as this does not affect existing apps). This saves your extra clicks on switching between the "view" and 'edit' modes.

·       The ExpandObjectMembers attribute now allows expanding a specified single member of a complex type property. This adds more control over layout generation in both ListView and DetailView as previously you could only expand all or nothing.


·        An Entity Framework-based version of our popular XCRM demo was created in this release. While accomplishing this task, we strengthened Entity Framework support in XAF and improved its stability. Check it out at %Public%\Documents\DevExpress Demos 14.2\Components\eXpressApp Framework\XCRM\CS\ once you get your hands at 14.2!

·        DevExpress XPO (an alternative to Microsoft Entity Framework for data access in XAF) now supports the latest ADO.NET connector libraries for Sybase (Sybase.AdoNet2.AseClient.dll and Sybase.AdoNet4.AseClient.dll), which are completely managed and include the latest improvements for working with this database engine.


As always, we welcome your comments and feedback. Let us know what you think.
17 comment(s)
Martin Praxmarer - DevExpress MVP

Hi Dennis - the byte array storage for Images - for winforms it does not make a difference i guess, or do i miss something?

20 November, 2014
Achmad Mulyadi

Hi Dennis,

Do you have an exact planned release date for this version?

20 November, 2014
Joëlle Perritaz

Yay for List View's Designer in Model Editor !

20 November, 2014
Konstantin B (DevExpress)

@Martin: Yes, you are right, from the user point of view there are no changes in the ImagePropertyEditor for WinForms. However, from the developer point, the amount of code required to declare an image property in EF is reduced from 21 to 2 lines (see T161967).

21 November, 2014
Martin Praxmarer - DevExpress MVP

Thx Konstantin - i am lucky that i still use XPO ;)

21 November, 2014
Chris Royle (LOB)

@Dennis - will the Grid Designer changes be available in the standalone run-time model editor as well ?

21 November, 2014
Chris Royle (LOB)

@Dennis - What's the new syntax for ExpandObjectMembers() ? Does it allow something like ExpandObjectMembers("Oid;*") for expressing everything but, and selected field inclusion ?

21 November, 2014
Dennis (DevExpress Support)

@Chris: Yes, of course.

21 November, 2014
Dennis (DevExpress Support)

@Chris: This little gem currently expects a single member (note: it is going to be included in the final version), but we are open to improvements, especially if they are often needed by XAF users and can save them time.

21 November, 2014
Chris Royle (LOB)

@Dennis: So it's an inclusion only attribute ? So for n properties we'd use n attributes ? Exclusion & delimited field names would suit us better as we use linked partial classes. Also it's consistent with how the appearance & validation attribute syntaxes work IIRC. I might make a suggestion once we used this, for the next release.

21 November, 2014
Jascha

Hi, Re "Data View Mode for List View", does that apply to all types of list editor (pivot in particular) as that is where the real gains are potentially, due to the summarisation being done on the server so a large table may return a small number of summarised rows as the result?

21 November, 2014
Dennis (DevExpress Support)

@Jascha: Thanks for your feedback. For now, the rest of the built-in ListEditors (like TreeList , PivotGrid, Chart, Scheduler, etc.) will use Client mode by default, even if the DataView mode is specified in the model settings.

As for the pivot grid performance, we also look forward to other options like community.devexpress.com/.../net-pivotgrid-server-mode-amp-asp-net-pivotgrid-virtual-scrolling-coming-soon-in-v14-2.aspx

21 November, 2014
Dennis (DevExpress Support)

@Chris: Yes, thanks for your feedback. We will take it into account. For now, as you probably know, it is already possible to achieve what you need by customizing the application model.

21 November, 2014
Sayyid Nasri Haik

Do you have properties in Model Editor for set FontSize in 14.2? Possible can i use ApperanceAttribute for set FontSize for property and editors in 14.2 both Win and Asp?

23 November, 2014
Dennis (DevExpress Support)

@Sayyid: Not in this release, but it is possible to create your own options in the Model Editor and then handle their assignment in a Controller. See also: www.devexpress.com/.../S35762

24 November, 2014
Steve Sharkey

Is the "new" security system out of beta yet?

27 November, 2014
Dennis (DevExpress Support)

@Steve: Not yet as there is still a list of things we would like to improve. Check the documentation.devexpress.com for more details.

28 November, 2014

Please login or register to post comments.