Quantcast
Channel: XAF Team Blog
Viewing all 148 articles
Browse latest View live

New XAF Case Study

$
0
0

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:

https://www.devexpress.com/Home/Case-Studies/M5/

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.


Business Class Library for Entity Framework (Coming soon in v14.1)

$
0
0

The new DevExpress.Persistent.BaseImpl.EF.v14.1.dlllibrary contains ready-to-use Code-First entities. These include general-purpose entities (like Person, Task, Address, etc.), and entities that are specially designed to be used with XAF extra modules and security system (Event, FileData, User, Role, etc). This addition makes it easier for an XAF developer to get started building applications using Entity Framework for data access.

UI customizations (i.e. Application Model differences) for these entities are also available in the Business Class Library Customization Module.

I think that even non-XAF customers can benefit from these ready-to-use EF data models: they can be used as a guide or reference when customers provide their own implementations.

New DataView mode for ListView (Coming soon in v14.1)

$
0
0

The UseServerMode Boolean property of the Options and ListView nodes is now replaced by the DataAccessMode property of the CollectionSourceDataAccessMode enumeration type. This enumeration contains the Client, Server and DataView values.

The Client value is equivalent to the UseServerMode set to false in previous versions. The Server value is equivalent to the UseServerMode set to true in previous versions.

DataView is a new mode. ListView in DataView mode retrieves XPView or EFDataView lightweight read-only lists of data records without loading complete persistent objects via XPCollection/EFCollection.

Check out the screenshot from the Model Editor for more details:

ListViewPerformance

As you might remember, this new Data View data source was first introduced in the ReportsV2 module, which provides the ViewDataSource component. Originally it was supported for XPO and then for Entity Framework (learn more...).


This functionality will be out as Beta in 14.1, because not all standard scenarios we planned for are covered and tested at this time. For instance, in the first version the DataView mode will work for Grid List Editors only. 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. Support for these List Editors is planned for the future. 

Also, data for non-persistent and reference properties will not be shown in ListView operating in DataView mode by default. To make reference properties work in WinForms, it is required to add a custom model column pointing to a nested property, e.g., Department.Title (this step is not required on the Web).

To enable this functionality on the Web, you currently need to modify the Global.asax.cs file as shown below:


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


We look forward to hearing your feedback on this new mode since Grid List Editors are used in more than 80% of list screens of a typical LOB application.

Yes, the ConditionalAppearance functionality is supported when this new mode is enabled in ListViews:-)

XAF Solution Wizard for easier getting started (Coming soon in v14.1)

$
0
0

XAF now ships with the wizard which allows you to quickly create a new application in a few simple steps. All you need to do is choose a target platform (desktop, web or both), data model type (Entity Framework Code First, Entity Framework Model First or XPO), user authentication type, and finally select extra modules to include in your application. The wizard will automatically generate a solution according to the specified settings.

To start the wizard, choose DevExpress v14.1 XAF Solution Wizard in the New Project dialog.

SolutionWizard_NewProject 

Step 1 – Choose Target Platforms

In this step, you can choose Windows, Web or both.

SolutionWizard_Step1

Step 2 – Choose ORM

In this step, you can choose your data model type – Entity Framework Code First, Entity Framework Model First, or eXpress Persistent Objects (XPO).

SolutionWizard_Step2

Step 3 – Choose Security

In this step you can enable the Security System and choose the authentication type.

SolutionWizard_Step3.1

If you choose XPO in the previous step, you can also enable Integrated Mode or setup the Middle Tier Application Server.

SolutionWizard_Step3.2

Step 4 – Choose Extra Modules

At this last step, you can choose the required extra XAF modules to enrich your application with an additional functionality:

SolutionWizard_Step4

Now you can click Finish and and see the result. The following image demonstrates that the wizard automatically generates the solution code and even populates the data model with entities required by the Security System and chosen extra modules.

SolutionWizard_Studio


Security System Usability Improvements (Coming soon in v14.1)

$
0
0

With the new CheckedListBoxPropertyEditor editor, application administrators can now easily assign member-level permissions:

SecurityMemberPermissionsEditior

Technically, we have provided two PropertyEditor implementations (one for Windows and one for Web), which can display values via a checked list box control in the UI and store the resultant choice in a string property of a business object. For now, these editors are used only in the security module, but we can come with a more generic solution in the future if there is a good demand from our customers.

 

With the new XAF Solution Wizard, you can easily create client-server applications.  The wizard automatically creates a project for the application server and makes necessary changes in the client application’s code.

SolutionWizard_Step3.2

XAF: Brand New Module & Features for both Windows and the Web (Coming soon in v14.2)

$
0
0

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.

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

$
0
0

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:

 
protectedvoid 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: New Web UI Theme, Templates and Optimizations for Desktop and Tablet Browsers (Coming soon in v15.1)

$
0
0

So what do we have planned for XAF in this release? It all starts with the web...

As you can tell from the images below, we decided to change direction from our previous Web UI prototypes based on the Moderno theme (check here) and instead we've started implementing a brand new concept created by our UI designers. The result is an overhauled ASP.NET WebForms theme for XAF Web apps (it’s not available for our ASP.NET controls at present time), new webpage templates and associated optimizations for touch screen devices.  All of this should make accessing XAF web sites from both desktop and tablet browsers more intuitive for your end-users (I hope to talk about smartphones separately later this year).

In the upcoming release we wanted to share a preview (CTP) of our work to date so you can understand where we are heading. We hope to finalize all that we have planned with regard to look & feel, general UX, application flow and behavior by 15.2. It is likely that there will be more updates on this new web theme in the coming months.

At this time, we want to get your feedback and hear your thoughts. We want to work with you to create the best possible solution so you can build apps that address the widest possible use-cases going forward.

                               





Here is a short video that demonstrates our responsive layout in action...so you can get a better sense of how an XAF web application adapts itself as browser width or orientation changes.

Our XCRM demo will use the new style by default. To learn more on how to enable this theme in your existing apps and see how it works for yourself and provide feedback/report issues, refer to this knowledge base article.


XAF: Enhancements to existing modules, Entity Framework and performance (Coming soon in v15.1)

$
0
0

Notifications Module - Officially Shipping

The eXpressApp Framework's Notifications Module (which first shipped as a CTP in v14.2), will officially ship in v15.1 and can now be used in production environments. This update includes a refactored API to simplify its use, addition of new features, improved stability and performance.

We appreciate all the great feedback you provided to us as it helped us cover even more use-cases with this module.


            cid:image001.jpg@01D08F37.E74B7640


Here are a few of the new features we've included in the Notification Module:

  • Ability to open an editable DetailView for the notification record.
  • Unobtrusive notifications when only the number of items changes in the status bar.
  • Ability to display all or only postponed items.
  • Improved processing performance.


Workflow Module - Entity Framework Support

The Workflow Module integrates Windows Workflow Foundation (WF) 4.0/4.5 support into XAF. WF is a workflow management framework designed to assist you in creating more manageable, workflow-enabled applications.  By leveraging WF functionality, the Workflow Module allows you to automated long-running business processes within your XAF application - where the intermediate steps are hours, days or weeks apart. The module allows users to modify the automated processes without writing any code or visualizing complex business processes.

With v15.1, you can now integrate our Workflow Module when using Microsoft ADO.NET Entity Framework. To achieve this, we have implemented EF-compatible versions of workflow entities like EFWorkflowDefinition, EFWorkflowInstance, EFTrackingRecord, EFStartWorkflowRequest, etc., and performed other required R&D and testing work.

            cid:image002.png@01D08F37.E74B7640

Additional Enhancements to XAF's Web and WinForms UI, its Core and Performance

The ASPxDocumentViewer control is now used for report previews in ASP.NET applications (we've deprecated the old Report Viewer control.) By using this new report viewer, cascading parameters and Drill-Down report types are now supported within XAF ASP.NET applications:

              cid:image003.png@01D08F37.E74B7640


Delayed data loading for detail forms has been implemented forWinForms apps. It’s best to demonstrate this with a short video (note that an artifical pause was intentionally added to emulate loading a large amounts of data). You can manually enable this mode via the DelayedDetailViewDataLoading property of the XafApplication class, which can be set either in code or via the Application Designer. Technically in this mode, the DetailView form is displayed nearly instantly, without any data in controls and then data asynchronously retrieved from the database and the controls (e.g., editors display actual data values and the related Actions are updated) are updated accordingly. While this does not really speed things up, it helps to achieve a better UX and perception, as a user receives instant feedback, which may be useful for very complex forms. Take special note that when you enable this mode, the DetailView.CurrentObject will not be immediately available when ViewControllers are activated. Your code should take this situation into account. Our own code already handles this mode well – you can see that the standard Delete Action is activated after data loading is complete.

WinForms apps can now place Actions within the status bar. The easiest way to do this is to set the Category property of your Action to “Notifications”. For instance, this way the Show Notifications Action (the one that displays a “bell”) from the Notifications module is implemented. In addition, review the attached picture and see how I moved (without writing any code and by just using the Model Editor and its ActionDesign | ActionToContainerMapping node) the other built-in Refresh command into the status bar. Alternatively, you can make a custom template as per this document and manage placement via the XAF BarManager or RibbonControl designers.


            cid:image006.png@01D08F37.E74B7640

Another WinForms enhancement is for developers using advanced ribbon menus within their applications. It's now possible to place multiple Action Containers within a single RibbonPageGroup (watch video) and also make it possible to separately configure different menu modes for SingleChoiceActions placed within the same group. Only the required part of Actions from a single RibbonPageGroup can be mapped to the Application Menu or Status Bar. This capability is best illustrated with a short video. You can see a "View" RibbonPageGroup that originally contained two Action Containers: "View" and "Reports". We then add only the "View" container into the Application Menu. There will be more documentation on making these customizations once v15.1 is out.             

We now include a much simpler solution to open a non-persistent object's List View directly from the navigation bar or from custom Actions. The idea is to declare a non-persistent class and decorate it with the DomainComponent and DefaultClassOptions attributes...Then, handle the NonPersistentObjectSpace.ObjectsGetting event and populate the e.Objects collection as required. That's it. Subscribing to this event can typically be done on the ObjectSpaceCreated or ListViewCreated events of the XafApplication class. Internally, the new NonPersistentObjectSpace entity is automatically provided for such non-persistent ListView through NonPersistentObjectSpaceProvider, which is registered among other ORM providers at startup. See a complete example in this Support Center ticketTake special note that in WinForms you can create non-persistent objects with the New Action and navigate to the DetailView of a non-persistent record, make changes and they will automatically be reflected in the source ListView (all changes will obviously disappear after reopening the ListView). See this short video for more info.

We've reduced the number of web browser requests to the server for Web apps in the following scenarios: a) when opening a page for the first time; b) when refreshing a browser page via F5; c) when displaying a popup window. In addition, with several optimizations to the underlying types info system, we've cut startup time by~10-15%.

Hopefully you'll find all of these enhancements useful. Tell us what you think - we want to hear from all our XAF users!

XAF: Enhancements to App UI Management Settings in the Database (Shipping in v15.1)

$
0
0

This feature was first demonstrated in our v14.2 release and based on your feedback, was one of the most popular additions to the eXpressApp Framework. For this release, we have made it even more powerful by implementing the following features:

  • The latest design-time changes made by developers to the Model.XAFML file representing shared model settings will be automatically re-read and considered by the application while debugging in Visual Studio. Technically, we have integrated a code solution from this Support Center thread under the #DEBUG directive via the XAF solution wizard so that all newly created apps have this default behavior. If you need this feature in your existing app, implement the current solution from the aforementioned thread.
  • As for updating shared model settings in production environments, you can now import the new settings from the application UI via the Import Shared Model Difference Action of ModelDifferenceViewController, which is available in WinForms apps only. Technically, this command silently loads the contents of the Model.xafml file to the Shared Model Difference object stored in the database.

             

             

 

  • Initially, there was no easy way to have application UI settings for WinForms and WebForms apps stored in the database separately. With the v15.1 release, the ModelDifferenceDbStore class constructor was extended to accept the string ContextId parameter. This allows you to pass “Win”, “Web” and other custom constants, like “Tablet”, for different applications and configure their user settings independently. To save you time, the default prefixes are automatically added for new applications by the XAF solution wizard. Existing applications can be modified as follows: 

         private void Application_CreateCustomUserModelDifferenceStore(Object sender, CreateCustomModelDifferenceStoreEventArgs e) {
                 e.Store = new ModelDifferenceDbStore((XafApplication)sender, typeof(ModelDifference), false, "Web");
                 e.Handled = true;
         }


    The code of the Create Model Differences Action of ModelDifferenceViewController was modified to take into account all the available ContextId values and create Model Difference objects in the database for each available application user.

  • Previously, the Copy Model Difference Action opened a dialog to copy model settings for the selected user to another user by fully overriding them. With our current release, you can choose to either Overwrite target model differences or Merge the source and the target using the Copy Behavior option:



    Technically, this is a smarter version of the Copy command that does not replace everything, but rather combines both differences together. At this stage, there are no special dialogs to merge only certain Application Model setting nodes as is done in the Merge Model Tool.     

XAF: A preview of the HTML5/JS Report Document Viewer integration in Web UI (Shipping in v15.1.5)

$
0
0

The new HTML5 / JS Report Document Viewer was introduced in our v15.1 release. This new report viewer is reliant on client-side logic and several enhancements to XAF’s ReportsV2 module were required for its integration.

To use the new DevExpress HTML5 Report Viewer, install our most recent service update (v15.1.5) and set the ReportsAspNetModuleV2.ReportViewerType property to the “HTML5” in the Application Designer:



To preview the appearance and functionality of the report viewer in your web app, simply preview an existing report:


2015-07-08_0905.png


Note:

1. The new report viewer does not use ASP.NET WebForms editors for its report parameters. As such, the WebReportServiceController.CustomizeParameterEditors event is not used.

2.The new report viewer is not used by default and is an option at this point in time. We hope you can test its functionality and provide us with early feedback so we can continue to refine and perfect its use. Once we finalize integration, we will likely enable HTML5 mode by default since it will more nicely suit the improved Web UI (CTP) we are developing for v15.2.

XAF - Validation Module Enhancements for Windows and the Web (Coming soon in v15.2)

$
0
0

In our upcoming release of the eXpressApp Framework, data validation occurs immediately after input focus changes when validation rule evaluation does not require querying additional data from the server. These rules are RuleRequiredField,RuleRegularExpressionRuleStringComparisonRuleValueComparison and RuleRange.


In-place validation is enabled for the Save context by default. To enable it for other contexts, use the AllowInplaceValidation property of the Validation | Contexts | Context node in the Model Editor.


Since rule evaluation occurs on the client side, in-place validation does not occur when:


The asterisk (*) symbol is automatically appended to an editor label when the RuleRequiredField is applied.

In-place validation engine relies on Controllers provided in our platform-specific ValidationWindowsFormsModule and ValidationAspNetModule components.

Note: The ASP.NET module was introduced in v15.2. In order to use in-place validation after upgrading your existing ASP.NET applications to v15.2, be certain to add  this module from the Toolbox into the Application Designer.

=====================================

The XAF Team would love your feedback. Please tell us what you think of these new features.

XAF - Web Map Module (Coming soon in v15.2)

$
0
0

With this release, we're shipping a new Map module for XAF Web apps - allowing you display business objects on different kinds of maps. The module integrates the client-side dxMap and dxVectorMap widgets from DevExtreme into ASP.NET XAF applications via specialized XAF server-side wrappers like List and Property Editors: WebMapsListEditor, WebVectorMapsListEditor and WebMapsPropertyEditor.


Primary Capabilities

While designing this module, we considered customer feedback received during the research we conducted earlier this year and also previous user requests from the Support Center and other sources. Let's take a quick look at the functionality implemented in the initial release:


1. Interactive map displays objects implementing the IMapsMarker interface using the Google Maps API or Bing Maps API:

2015-09-30_1040.png

2. Vector map displays objects implementing the IAreaInfo interface as areas with different colors:

2015-09-30_1056.png


3. Vector map displays objects implementing the IVectorMapsPieMarker interface as pie-chart markers:

2015-09-30_1059.png

You can experience a live demo of our Map module in the ListEditors | Maps section of the offline Feature Center demo that is installed with XAF or check its online version at demos.devexpress.com/xaf/featurecenter once v15.2 is officially released.


Configuration

You can configure map types via the Model Editor invoked from Visual Studio or in code:

1. Configuring WebMapsPropertyEditor for a DetailView:

2. Configuring WebVectorMapsListEditor for a ListView:

3. Customizing the underlying dxMap widget in code of a ViewController for a ListView:

usingDevExpress.Persistent.Base;

namespaceDevExpress.ExpressApp.Maps.Web.Controllers {

   publicclassMapCenterController:ObjectViewController<ListView, Store> {

       protectedoverridevoidOnViewControlsCreated() {

           base.OnViewControlsCreated();

           ((WebMapsListEditor)View.Editor).MapViewer.ClientSideEvents.Customize=GetCustomizeScript();

       }

       privatestringGetCustomizeScript() {

           return@"function(sender, map) {

      map.option('center', 'Brooklyn Bridge,New York,NY');

                      map.option('autoAdjust', false);

    }";

       }

   }

}

===========================

We'd love to get your feedback on this new Map module and whether you are planning to use it in upcoming XAF Web apps.

XAF - Web UX Enhancements (Coming soon in v15.2)

$
0
0

In this release cycle, we've evolved our web page templates and themes optimized for touch devices (released n v15.1). While we still continue to refine things, we believe that this feature is ready to be used in production and we do not expect major breaking changes going forward.

In addition to numerous cosmetic enhancements and capabilities that were already test-driven in previous minor updates, let me highlight a few important features:

1. Adaptive and Responsive Layout

Our ASPxGridListEditor supports adaptive layouts and is enabled in the new web style by default. Columns are collapsed automatically when the browser window is resized.

You can control this behavior via the IModelColumnWeb.AdaptivePriority property in the Model Editor invoked for the ASP.NET project. 


This option specifies the column's priority. Columns with a lower AdaptivePriority value remain visible when the browser window shrinks, while columns with a higher value are hidden. Hidden column data can be accessed via the ellipse "..." button. In the image above, both the SUBJECT and PROJECT columns have a lower AdaptivePriority value than others.

2. Device-Specific Settings in ASP.NET Applications

Web applications can now have separate settings for desktop, tablet and mobile devices. Device-specific model differences are stored in the Model.Desktop.xafml, Model.Tablet.xafml and Model.Mobile.xafml files. Database settings storage is also supported.

3. Customizable ASP.NET Templates for Touch Devices

Page templates designed for touch devices can be easily customized. Corresponding project item templates are now available in Visual Studio:

  • DevExpress v15.2 XAF ASP.NET Default Template Content V2
  • DevExpress v15.2 XAF ASP.NET Dialog Template Content V2
  • DevExpress v15.2 XAF ASP.NET Logon Template Content V2
  • DevExpress v15.2 XAF ASP.NET Nested Frame Control V2


Reporting

With v15.2, the DevExpress HTML5 Report Viewer is used by default. 


Our Web Report Designer now supports parameters with complex types (including multi-value parameters for complex types).

Finally, XAF's Reports Module can now store a layout in XML format, making complex report rendering much faster (learn more)!



Confirm unsaved changes

ASP.NET applications can now prevent loss of unsaved data by displaying a warning dialog if a user attempts to close the browser tab, or clicks an Action whose execution may lead to loss of unsaved data.


This behavior is enabled by default. You can disable it using the ConfirmUnsavedChanges property of the Options node in the Model Editor invoked for an ASP.NET project:

The option above is global. To enable/disable the confirmation dialog for a specific Action, use the ConfirmUnsavedChanges property of the ActionDesign | Action node.

By default, the IModelActionWeb.ConfirmUnsavedChanges option is set to true for the following Actions: NextObject, PreviousObject, New, DialogCancel, DialogClose, ChooseTheme, Refresh, Cancel, Edit, Logoff, ChangeVariant

Batch Edit support

ASPxGridListEditor now supports Batch Edit Mode. Unlike other modes, Batch Edit allows you to edit multiple rows and then save all modified objects at the same time.


To enable Batch Edit Mode, set the InlineEditMode property of the ListView node to Batch in the Model Editor and ensure that the AllowEdit property of the same node is set to true.


Please note the following: 

    In Batch Edit mode, the Detail View is not invoked when a user clicks a row.
    A few data types cannot be edited: imagesreferencescriteriafile attachments.
    Initial property values for new objects are passed to the client when the grid control is created and are not updated each time you create objects using the New Command Item.

Batch Edit Mode supports our new ConfirmUnsavedChanges and Validation module features.


Master-Detail support

ASPxGridListEditor now provides built-in support for the master-detail data presentation. To enable it, run the Model Editor for an ASP.NET project, and set the DetailRowMode property of the Views | ListView node to DetailView or DetailViewWithActions.


In DetailViewWithActions mode, a Detail View specified using the DetailRowView property is shown in a detail row. In DetailView mode, the same Detail View is displayed, but the toolbar of its nested List View is hidden.


By default, DetailRowMode is None and the master-detail mode is disabled.

=====================================

Please tell us what you think of these new features.

XAF - Enhancements to Core and other modules (Coming soon in v15.2)

$
0
0
Over the last few days, I've described some of the new features we've introduced into the eXpressApp Framework v15.2. In this post, I'll describe enhancements we've made to XAF's core and other modules.
Reset View Settings
The Reset View Settings Action re-opens the current View and resets all user customizations made to the View's model. This Action is disabled (grayed out) if there are unsaved changes.



Detail Form Layout Customization in Code

With this release, you can customize the Detail View's default layout in your Data Model code using the DetailViewLayout attribute. Please refer to the following example code/screenshot below:

publicclassContact{[Browsable(false)]publicintID{get;privateset;}[DetailViewLayoutAttribute(LayoutColumnPosition.Left)]publicstringFirstName{get;set;}[DetailViewLayoutAttribute(LayoutColumnPosition.Right)]publicstringLastName{get;set;}[DetailViewLayoutAttribute("FullName", 0)]publicstringFullName{get{returnFirstName+" "+LastName;}}[DetailViewLayoutAttribute(LayoutColumnPosition.Left)]publicstringEmail{get;set;}[DetailViewLayoutAttribute(LayoutColumnPosition.Right)]publicvirtualContactManager{get;set;}[DetailViewLayoutAttribute(LayoutColumnPosition.Left)]publicDateTime?Birthday{get;set;}[FieldSize(FieldSizeAttribute.Unlimited)][DetailViewLayoutAttribute("NotesAndRemarks",LayoutGroupType.TabbedGroup, 100)]publicstringNotes{get;set;}[FieldSize(FieldSizeAttribute.Unlimited)][DetailViewLayoutAttribute("NotesAndRemarks",LayoutGroupType.TabbedGroup, 100)]publicstringRemarks{get;set;}}



Non-Persistent Objects Enhancements

In this release we have extended support for usage scenarios when using non-persistent objects first introduced in v15.1:

  • The New, Delete and Save Actions are available for non-persistent objects. Modified objects are accessible using the NonPersistentObjectSpace.ModifiedObjects property.
  • The INotifyPropertyChanged.PropertyChanged event is now triggered for non-persistent objects.
  • The non-persistent Object Space is now accessible for objects that support IObjectSpaceLink.

Security System Enhancements

We continue making the new security system more capable with the following updates:

  • Security permissions are immediately refreshed once the administrator applies changes. You are no longer required to log off all affected users to refresh permissions (learn more...).
  • If the administrator grants certain permissions to a reference or collection property that participates in an association (one-to-many or many-to-many), the same permissions are automatically granted for a property at the other end of this association (learn more...).
  • The Data View mode in now supported.
  • Upcasting is now supported in List View columns.
You should expect more news in this regard after the official release.



General usability and API improvements:

The following is a list of minor features that should make using XAF a little easier. While you can see the full list of these smaller enhancements in our What's New docs, I would like to highlight the following items:

  • S38140 - Core - Introduce IObjectSpace.Evaluate method that will evaluate a criteria expression against both EF and XPO objects (including Domain Components)
  • Q483608 - Core - Make it easier to obtain IQueryable<T> collection through IObjectSpace for LINQ
  • S171061 - Core - Provide an option to avoid saving a master record immediately when a new non-aggregated child object is created in a nested List View
  • S170756 - Core - Provide Refresh method overloads allowing the refresh of the underlying data source
  • T204296 - EF.Usability - Support complex types that are not registered in DbContext and have no key property
  • T177760 - EFDataView - Support common criteria function operators
  • S172038 - Core - Provide a simplified database compatibility check mode; one that relies on the database schema and ignores module assembly versions
  • T312781 - ImagePropertyEditor - Support images declared as reference properties instead of byte array
  • T303205 - Workflow - Add an option to repeat the workflow multiple times while the target object fits criteria

=====================================

I will post additional content on some of these items (like S172038) separatly, once we release v15.2. Please stay tuned and let us know what you think of these new features.


XAF – A Simpler Way to Check Database Compatibility (Coming soon in v15.2)

$
0
0

 

In earlier versions, to check the compatibility of an application and its database, a ModuleInfo table was created in the database. This table stores information on the module versions used in an application. When checking the compatibility of the database and the application, the versions stored in the ModuleInfo table are compared with actual module versions. A DatabaseVersionMismatch event occurs when there's a mismatch. By default, each module's version is set to "1.0.*" using the AssemblyVersion Attribute in the Properties\AssemblyInfo.cs file. The asterisk sign in the version indicates that the build and revision numbers in the version are autoincremented, and so version value is updated with each new build. As a result, WinForms and ASP.NET module versions may not be synced if you build WinForms and ASP.NET applications separately (e.g, when creating a ClickOnce installation or deploying to IIS).

  
With v15.2, we've introduced a new application and database compatibility check mode; one that utilizes native XPO methodologies. In this mode, the following checks are performed:

  1. The database exists.

  2. All required tables exist.

  3. All required columns exist.

 

The DatabaseVersionMismatch event occurs if any of these checks fails.


The new XafApplication.CheckCompatibilityType property specifies which mode to use. The CheckCompatibilityType.ModuleInfo value indicates that the old mode that relies on the ModuleInfo table is used. This mode is still used by default for applications created with earlier versions of XAF. In applications created with the Solution Wizard in version v15.2, the XafApplication.CheckCompatibilityType value is CheckCompatibilityType.DatabaseSchema, which corresponds to the new mode detailed above. This property value can be changed in the Application Designer:


Untitled (1)

 

Note that the use of ModuleInfo is more complicated, but it ensures business logic compatibility in addition to data model compatibility. The new DatabaseSchema mode relies on the database schema only.

A CheckCompatibilityType property has also been added to the IObjectSpaceProvider interface, allowing you to specify the mode individually for each Object Space Provider (when you use multiple databases). By default, it is set to null and the XafApplication.CheckCompatibilityType value is actually used. Another useful change with this interface is the new  IObjectSpaceProvider.SchemaUpdateMode property. You can now use it to specify handle compatibility checking for the database associated with the current Object Space Provider. The following values are available:

  • DatabaseAndSchema - Missing database is autocreated. The database schema is updated when the compatibility check fails.

  • None - Database compatibility issues are ignored.

=======================================

That's my  last post prior to launch and hopefully you've liked what we've done with XAF. As always, we want to hear your thoughts. Please tell us what you think of XAF v15.2.

XAF Goes Mobile: CTP Version Ships with v15.2.9

$
0
0

UPDATE:

Refer to the eXpressApp Framework > Getting Started > XAF Mobile (CTP) Tutorial article to learn more on the new Mobile UI, which is technically is a single-page HTML5/JavaScript application (SPA) based on DevExtreme components that is ready to be compiled by Apache Cordova (PhoneGap) into a native package that can then be submitted to app stores.

========================================================

The eXpressApp Framework (XAF) team has been working hard to add a mobile UI option to your existing or new projects and we are ready for the first public preview. This new feature will let you easily create iOS and Android apps in addition to WinForms and ASP.NET UI options already available to you. The mobile apps will reuse the database, as well as certain aspects of the data model, application logic and UI settings of your existing XAF applications. This will help you avoid all the routine work that would take days or weeks of development efforts if building those mobile apps from scratch.

XAF Mobile App UI

We’ve already shown this functionality to a small group of XAF developers at the end of last year and got lots of useful feedback. The team has fixed issues and incorporated a number of improvements and we now feel that the framework is ready to go public. 

Certain aspects of the new functionality will change and we'd like to think that your feedback will play an important role in that. Please use the resources in this email to evaluate the new features and share your opinion with us.

 

Review the Demo App

Start your evaluation by reviewing a sample mobile application hosted on Azure. Either use the browser-based simulator or try it on your smartphone by simply scanning the QR code.

Run the Demo

 

Build a Mobile App Yourself

We encourage you to follow the tutorial below to create a mobile app based on your own XAF solution. The article uses the Project Manager demo as an example, but you can apply the same steps to any XAF project.

Follow the Tutorial

 

Review Frequently Asked Questions

To learn more about the capabilities and limitations of the XAF Mobile UI, review the knowledge base article that answers the most frequently asked questions.

Read FAQ

 

Complete the Survey: Help Prioritize Future Development

Complete the following survey so we can learn more about the types of application you’re looking to build. We know your time is valuable so we’ve limited it to only 5 questions and the entire survey shouldn’t take longer than 10 minutes.

Complete the Survey

 

Contact Us via the Support Center

We are also looking forward to your reports via the Support Center. Please submit separate tickets for each problem or question for better tracking. Thank you for your help!

XAF - Startup Performance, Application Model and Non-Persistent Objects Enhancements (Coming soon in v16.1)

$
0
0

In my opinion, XAF's Application Model (defined as a set of application settings or UI skeleton) is the second most important XAF feature (first being automatic database and CRUD forms generation based on your ORM data model).

Because of its importance, we consistently strive to improve the Application Model and in our upcoming release, we focused our energies on improving startup application performance and general usability for XAF developers.

Application Model Caching

With v16.1, you can speed up WinForms application startup using the EnableModelCache property. When set to true, Application Model content is cached to a file when the application is first launched and recovered on subsequent runs. This property works in a production environment when the debugger is not attached (see Debugger.IsAttached). By default, EnableModelCache is set to false. To change this property value, add the following code to the Program.cs (Program.vb) file, before the Setup method is called: winApplication.EnableModelCache = true;

As a result of these settings, Nodes Generators and Generator Updaters will be executed and the Model.Cache.xafml cache file will be created only when the application is started for the first time. Note that initial startup can take more time than normal, however, the time taken by subsequent startups will be reduced, because the Application Model content will be recovered from the cache. The cache is recreated when application module version is incremented. 


By default, the Model.Cache.xafml file is located in the application folder. You can change its path using one of the following methods:
  1. override the GetModelCacheFileLocationPath method in XafApplication descendant;
  2. use the ModelCacheLocation key in the configuration file (App.config).

The Model.Cache.xafml file name is specified by the ModelStoreBase.ModelCacheDefaultName constant. If your application is localized, separate cache files are created for each language (e.g. Model.Cache_de.xafml).

    

Frequently Asked Questions

Q: How is this different from the existing ModelAssembly.dll-based cache?
A: Unlike the existing ModelAssembly file-based cache (which is technically an assembly providing Application Model object implementation based on the IModelXXX interfaces), the new model cache file contains the entire model structure in XAFML format.

Q: Is this cached file an equivalent of merging of the platform agnostic model and WinForms/ASP.NET models?  Does this include user modifications?
A: No, this Model.Cache.xafml only contains an unchangeable Application Model layer. Administrative (Model.XAFML) and user-specific (e.g. Model.User.XAFML) model differences are not cached (they are meant to be modified once the app is deployed).

Q: Is generation of this cache file somehow connected with database schema changes?
A: No.

Q: Can this cached file be supplied with the installer?
A: Absolutely. You can generate this file by running your app without the debugger attached and then copy it into your installation program. This manual process may be unnecessary in many cases because the cache file will still be automatically generated after the released application is executed for the first time.

Q: What about this feature for ASP.NET?
A: By default, the EnableModelCache property has no effect on an ASP.NET application since a shared application model is usually generated once for all web clients. If you wish, you can manually activate the creation of this cache file by overriding the GetModelCacheFileLocationPath method of your WebApplication descendant.


Application Model Database Storage Enhancements

As you know, XAF apps can store user-defined application customizations (layouts, selected skin, etc.) in an application database with the use of the ModelDifferenceDbStore class introduced several releases ago. In this release, we've enhanced functionality in the following ways:

  • Design-time customizations are now always loaded from the Model.xafml file stored in the file system to simplify debugging.
    In other words, for administrative model differences we have returned to the schema we used prior to introduction of ModelDifferenceDbStore. Only user-specific model differences are loaded from the database by default. When required, you can uncomment the XafApplication.CreateCustomModelDifferenceStore event subscription manually. Note that Model.xafml file content will be loaded to the database once the application starts. Further changes to this file will be ignored if the database record already exists for shared model differences. To reload settings from Model.xafml, enable the administrative UI and use the Import Shared Model Difference Action (or delete the Shared Model Difference record and restart).

  • ModelDifferenceDbStore can now be used when the Security System is disabled.
    Currently, if the Security System is enabled, the SecuritySystem.CurrentUserId value is used as the identifier.  The System.Security.Principal.WindowsIdentity.GetCurrent().Name value is used as a user identifier (passed to the IModelDifference.UserId property) when the Security System is disabled. So, you can enable ModelDifferenceDbStore for WinForms applications with the disabled Security System using the approach described here. However, we do not recommended that you enable ModelDifferenceDbStore for unsecured ASP.NET applications because the UserID will be the same for all users. Shared model differences are supported for both WinForms and ASP.NET when the Security System is disabled. 

  • XML settings are now validated before being persisted.
    This is a small usability improvement to simplify error debugging when using ModelDifferenceDbStore and when the administrative UI for editing model differences is enabled in the application as described here. Application administrators will not be able to save invalid XML, e.g. with unclosed tags.

    


Non-Persistent Objects Enhancements

We continue incorporating non-persistent objects support implemented in our most recent releases with the help of the NonPersistentObjectSpace and NonPersistentObjectSpaceProvider classes.

With this release, you can display persistent objects in a non-persistent object view with much less code. This is possible with the help of the AdditionalObjectSpaces property in the NonPersistentObjectSpace class. It is best to illustrate this improvement with a short code snippet:

...
[DomainComponent, DefaultClassOptions]
public class NonPersistentObject {
    // ...
    public string Name { get; set; }
    public Person Owner { get; set; }
...
public class AdditionalPersonObjectSpaceController : WindowController {
    private IObjectSpace additionalObjectSpace;
    protected override void OnActivated() {
        base.OnActivated();
        Application.ObjectSpaceCreated += Application_ObjectSpaceCreated;
        additionalObjectSpace = Application.CreateObjectSpace(typeof(Person));
    }
private void Application_ObjectSpaceCreated(Object sender, ObjectSpaceCreatedEventArgs e) {
        if (e.ObjectSpace is NonPersistentObjectSpace) {
            ((NonPersistentObjectSpace)e.ObjectSpace).AdditionalObjectSpaces.Add(additionalObjectSpace);//!!!
        }
    }
...


Once XAF v16.1 is released, refer to the "How to: Show Persistent Objects in a Non-Persistent Object's View" article in the online documentation for a full tutorial and additional explanations. Also notice the new ORM-agnostic DevExpress.ExpressApp.Data.Key attribute we introduced to mark unique key properties of an object type.

    

Another improvement involves showing a non-persistent Detail View: Separately (e.g., from a navigation control or in a popup window) or Embedded (inside a DashboardView item). With XAF v16.1, you can handle the new ObjectByKeyGetting event of the NonPersistentObjectSpace class to provide a non-persistent object instance manually. As an example, consider a scenario when a navigation item pointing to a non-persistent class DetailView was added under the NavigationItems node and its ObjectKey parameter was specified in the Model Editor as shown below:

    

You can now add the following Controller to handle this scenario:

...
public class NonPersistentObjectsController : WindowController {
    protected override void OnActivated() {
        base.OnActivated();
        Application.ObjectSpaceCreated += Application_ObjectSpaceCreated;
    }
    private void Application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e) {
        NonPersistentObjectSpace nonPersistentObjectSpace = e.ObjectSpace as NonPersistentObjectSpace;
        if(nonPersistentObjectSpace != null) {
            nonPersistentObjectSpace.ObjectByKeyGetting += nonPersistentObjectSpace_ObjectByKeyGetting;
        }
    }
    private void nonPersistentObjectSpace_ObjectByKeyGetting(object sender, ObjectByKeyGettingEventArgs e) {
        if(e.ObjectType.IsAssignableFrom(typeof(NonPersistentObject))) {
            if(((int)e.Key) == 138) {
                NonPersistentObject obj138 = new NonPersistentObject();
                obj138.Name = "Sample Object";
                e.Object = obj138;
            }
        }
    }
...


If you want to create a non-persistent object automatically for each Detail View, you do not need to specify an ObjectKey in the Model Editor. Leave the ObjectKey value empty and create the following View Controller, which will create a non-persistent object

...
public class NonPersistentObjectActivatorController : ViewController<DetailView> {
    protected override void OnActivated() {
        base.OnActivated();
        if(ObjectSpace is NonPersistentObjectSpace) {
            View.CurrentObject = View.ObjectTypeInfo.CreateInstance();
        }
    }
}
...


On a final note, let me add that custom calculated fields are now supported as well. In other words, you can define custom fields  for non-persistent types in the Model Editor with the Expression attribute like NonPersistentProperty1 + NonPersistentProperty2.


Several types have changed their host assemblies without changes in namespaces

This is just a formal notification as this change should not be "breaking" or affect you at all in the majority of cases. Refer to the Several types have been moved to the DevExpress.Persistent.Base and DevExpress.Persistent.BaseImpl assemblies from the Charts, ConditionalAppearance, KPI and StateMachine modules in XAF v16.1 KB Article for more details.

XAF - Reports and Security System Enhancements (Coming soon in v16.1)

$
0
0

This post is devoted to several improvements for the two key features of any serious line-of-business application - reporting and security. As you might expect from a mature application framework, DevExpress XAF ships with reusable ReportsV2 and Security modules designed to simplify the integration of the DevExpress Reporting Platform and role-based authorization features (actually much more than this!) for Windows, Web and Mobile platforms.

Let's take a look and see what's inside the upcoming major release for reports and security.


Grid Based Reporting in WinForms Applications

XAF now supports the built-in printing/export capabilities of the DevExpress Grid and thus allows you to create a report from any grid-based List View. The report's layout is autocreated (and is based on grid columns, appearance and filter settings) when you click the "New Report" command in the Export menu.


Technically, this is done by handling the ExportController.ExportActionItemsCreated event from the WinGridReportExportController and adding a New report item to the ExportController.ExportAction.

The New report item invokes the Report Designer. The current grid layout is automatically converted to a report layout. You can learn more about report generation rules in our Advanced Grid Printing and Exporting topic.

If you click Save, the report is saved to the application database, together with other user-defined reports.


Allow/Deny Modifier for Security Permissions (Beta)

With XAF's Security System, your application administrators can now allow access to all data within the application for a specific role and simultaneously deny access to a few data types or members. Alternatively, an end-user can deny access to all data for a role and only allow access to a strict list of objects or members. Both approaches make it easy to allow/deny data access across a broad range of use-case scenarios. To use this feature, choose Allow/Deny Permission Policy on the Choose Security page of the Solution Wizard.

As a result, special types of security users and roles will be used in your application - PermissionPolicyUser and PermissionPolicyRole. Entity Framework and XPO versions of these classes are declared in the Business Class Library. The primary difference with SecuritySystemUser and SecuritySystemRole classes (which were previously used by default and are now used for the Deny All policy) is that the role object exposes the PermissionPolicy property:

With this property, you can assign "deny all", "read only all" or "allow all" default permission policies for each role. This allows you to create very complex and flexible security configurations.

For each operation, you can explicitly specify the Allow or Deny modifier or leave it blank.

If the modifier is not specified, the permission is determined by the role's policy type. Note that policy has the lowest priority and is in play only when permissions are not explicitly specified.


Dynamic Permissions for Associated Objects

To allow users to modify objects used in associations (one-to-many and many-to-many), you should grant access to the properties on both sides of the association, because linking and unlinking operations always lead to the modification of both properties. XAF's Security System now simplifies this task by detecting associations and configuring required permissions automatically.

Required permissions are granted dynamically each time an associated object is requested when the ServerPermissionRequestProcessor.UseAutoAssociationPermission or ServerPermissionPolicyRequestProcessor.UseAutoAssociationPermission static field is set to true. The former field is considered for the Deny All policy, and the latter - for the Allow/Deny policy (see the Allow/Deny Modifier for Security Permissions section above). The SecuritySystem.IsGranted request for a member is processed as follows in this mode.

  • The default security request is processed for a given member. If permission is granted, the result of this request is returned.
  • If permission is not granted at the previous step and the current member is an association (see IMemberInfo.IsAssociation), the request is processed for the associated member. The result of this additional request is returned.
  • If permission is not granted at the first step, and the current member is not an association, Security System checks if the member type is aggregated to another type. If owner type is found, a permission for the corresponding aggregated collection is requested and returned.

The SecuritySystem.IsGranted request for a type or object is processed as follows.

  • The default security request is processed for the given type. If type permission is granted, the result is returned.
  • If type permission is not granted at the previous step, Security System checks if the type is aggregated to another type. If the owner type is found, a permission for the corresponding aggregated collection is requested and returned.
  • The requests for the Navigate operation are not processed using associations.

Simply stated, you configure permissions on one side of the one-to-many or many-to-many association, and the same configuration is automatically applied on the other side. If this does not fit your requirements, you can always configure permissions explicitly.

XAF - UX Improvements for Design Time Templates, Windows and Web UI (Coming soon in v16.1)

$
0
0

Design-time enhancements

With our upcoming release, all XAF templates will be available from the DX Template Gallery (look for the DevExpress v16.1 Template Gallery item in the standard Add New Item... dialog or see the "Add DevExpress Item" context menu item for your projects in Solution Explorer):


Additionally, we've provided shortcuts for the most recently used (MRU) item templates to the Add DevExpress Item... menu - invoked for XAF projects under the Solution Explorer:


Notice that there is a new Non-Persistent Object item template that allows you to create non-persistent classes with ease (it contains all the required boilerplate code and example implementations of the INotifyPropertyChanged, IXafEntityObject, IObjectSpaceLink interfaces). Please review my earlier blog post to learn on more improvements with regard to managing non-persistent objects in standard XAF forms. See the Changes to Visual Studio Item Templates in XAF v16.1 KB article for more details.


WinForms SDI: Outlook-Style Navigation Integration

For those of you targeting Windows, XAF's integration of DevExpress WinForms Outlook-Style navigation controls and OfficeNavigationBar is now better than ever.

The OfficeNavigationBar can be displayed in non-compact mode, as in the screenshot above, or in the compact mode (enabled by default) demonstrated below:

You can always switch between compact and non-compact modes via the Navigation Options dialog ().

Each navigation link at the bottom of the OfficeNavigationBar panel corresponds to the root navigation group defined under the NavigationItems node.

Clicking on these group items can be include animations managed by our TransitionManager component  where the SlideFadeTransition type is used by default (view a full-size GIF without losing quality HERE):


This new feature is enabled only in SDI mode (UIType = SingleWindowSDI) with the ribbon menu (FormStyle=Ribbon) when the new RootGroupStyle property is set to OutlookSimple or OutlookAnimated. You can initialize these configurations in code or via the Model Editor:

For a cleaner UI and better end-user experience, the DockPanel previously hosting the NavBarControl was also removed. The NavBarControl is now positioned directly in the form template, which also helped us remove unnecessary borders.

The expand/collapse functions of the removed dock panel are now natively managed by the NavBarControl and the two new buttons added into the status bar. The "Normal View" button expands the NavBarControl while pressing the "Reading View" button collapses the NavBarControl.


SVG icons support in ASP.NET

In XAF ASP.NET applications, SVG images are now supported, which improves your website's appearance on displays with high pixel density (resolution).

If you're adding custom images as per this documentation article, note that image display size is determined by the svg element's viewBox attribute. Also, SVG icons are not grayed out automatically for disabled Actions. You should manually add a disabled variant of an SVG icon with the _Disabled suffix (e.g., MyIcon_Disabled.svg).

Our UX designers also started to redraw standard XAF images, but this is still in works. You can easily view already updated images in the Model Editor's image picker:

Our future plans include completing this image collection and to introduce this same capability for XAF's WinForms UI.


Faster rendering and other performance optimizations for popular Web UI scenarios

In short, the core idea for all these performance improvements in XAF ASP.NET WebForms apps is that under certain circumstances, we intentionally suppress creation and rendering of current web page controls, disable unnecessary data-binding operations, reduce the number of requests to the server and perform updates on the client side where possible. This allows us to produce a web app that behaves faster and is more responsive, which is essential for hand-held devices (e.g., tablets, smart phones). Desktop web browser users will also benefit from these changes, especially in scenarios involving popup windows.

Since several thousand of our unit and complex functional tests have passed, these optimizations are turned on by default in XAF v16.1, so that everyone can benefit from them. For backward compatibility or any unhandled issues in your custom code that might occur due to these optimizations, we also provided various static options in the DevExpress.ExpressApp.Web.WebApplication.OptimizationSettings class allowing you to turn this feature off completely (or partially). I've described these options and scenarios in the following KB Article: https://www.devexpress.com/kb=T386142 


Your feedback is needed!

As always, my team and I look forward to hearing your thoughts on each of these improvements in comments to this blog or via the https://www.devexpress.com/Support/Center/Question/Create service.

Viewing all 148 articles
Browse latest View live