eXpress App Framework Team

This Blog

November 2014 - Posts

  • 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.
  • XAF: Brand New Module & Features for both Windows and the Web (Coming soon in v14.2)

    End-User Report Designer for ASP.NET

    With this release, the Reports V2 module supports the ASP.NET Report Designer out-of-the-box. End-users can create and modify reports directly in a browser!


    Check it out! We have already incorporated this functionality in all of our demos that include reports. (e.g., in MainDemo or FeatureCenter).

    Note that you do have to change your code to enable the designer in an existing XAF app. If you have an application with the Reports V2 module included, simply upgrade it to v14.2 using the Project Converter tool.

    After the upgrade, you will see that the New Action is now available in the Reports View. To design an existing report created at runtime, select it and click Action_Report_ShowDesignerShow Report Designer.

    The ASPxReportDesigner control is displayed in a popup by default. You can change this behavior using the ReportsAspNetModuleV2.DesignAndPreviewDisplayMode property. If you change the mode from Popup to DetailView in the Application Designer, the designer will be displayed in the main window (screenshot).


    New Notifications Module for WinForms and ASP.NET

    With this release, we've added a new Notifications module (CTP) allowing you to display reminders for scheduler appointments or any custom objects, e.g. tasks. The Scheduler module itself was improved to provide the corresponding UI for configuring reminders and visualizing them in the calendar. Basically, when creating a scheduler event you can create reminders like in Outlook:

     
     

    and then an application will display a popup window before an event starts:

    The Notifications module is a separate module which does not necessarily have to be bound to the Scheduler module: it can display notifications that come from anywhere. In the latter case your goal as a developer is to just feed the notifications service with notification items and the service will process them as required. For now, please keep in mind that this will ship as a preview. We are looking forward to your feedback so we can continue to improve the module to meet your specific requirements.



    User Settings Stored in the Application Database

    Starting with v14.2 all application settings and user preferences (so-called model differences) can be stored and managed directly in the application database for both WinForms and ASP.NET applications. This feature enables your customers to “roam” between machines and still have access to the appropriate settings:



    Previously, these settings were stored in the file system (for WinForms) and in the browser cookies (for ASP.NET) by default. There was also a mechanism for preserving this stuff in any custom data store.

    This functionality is implemented in the system module and it is activated automatically when you enable the Security System in the Solution Wizard or in code. This new settings storage is enabled by default in all newly created WinForms apps. You can enable the same in existing or Web applications by writing a few lines of code.


    Bands Support in Grid List Editors for WinForms and ASP.NET

    You can now enable bands in grid controls for both WinForms and ASP.NET applications:

     

    The band layout can be configured either at runtime via the grid control interface or at design time via the Model Editor under the Views | ListView | BandsLayout node (even in the platform-agnostic module!):


    While working on this feature, we have refactored our Grid List Editors (XAF wrappers around the GridControl and ASPxGridView components) so that now it would be much easier for you to enable support for other view types (card view, layout view, etc.) by  inheriting from our classes.

     

    New Ribbon Templates for WinForms

    We introduced the new Ribbon templates for Main and Detail forms of a WinForms application. Now you can easily customize the placement of your UI commands via the familiar interface of the RibbonControl wizard you often see in traditional WinForms development:

    These new templates are also registered for the 'Add New Item...' dialog in Visual Studio so you can add them into your project and customize according to your business needs:


    The improved templates are also used in newly created XAF projects by default.

    Previously, we provided a single universal version of our WinForms templates for both classic and ribbon menus. While this universality had some great advantages for us at runtime, it cause issues whenever customization was needed. Yes, it was possible to customize everything at runtime, but it was much less convenient for developers.  

    So, now, say, placing any standard or custom Action command into a custom ribbon group is no longer a problem at design time. Check out this short video for more details.

     

    As always, we welcome your comments and feedback. Let us know what you think.

     

    P.S.

    This is of course not all that our team has prepared for the upcoming 14.2 release. In my next large post I will cover a bunch of enhancements to existing features & performance tuning for ASP.NET.

LIVE CHAT

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 info@devexpress.com or call us at +1 (818) 844-3383

FOLLOW US

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

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