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

XAF v24.2 EAP — Passwordless Sign-ins and MFA, Calculated Fields and Soft Deletion in EF Core, Tabbed MDI and Performance Enhancements in Blazor

$
0
0

This post documents a few XAF-related features we expect to ship in early December and details what’s inside our Early Access Preview build (for additional information on what you can expect in December, please refer to our Year-End v2024.2 roadmap). As you will note below, XAF-related focus areas remain Blazor, Entity Framework Core and Security. 

If you own an active Universal Subscription, feel free to download this Early Access Preview (EAP) build at your convenience. If you own an active DXperience Subscription and would like to learn more about our Cross-Platform .NET App UI (XAF) or Web API Service, you can explore the features described herein by logging onto the DevExpress Download Manager and installing this EAP build in trial mode. Once you do, please tell us whether these new features address your business needs. Your feedback will help us fine-tune our implementation before official launch.

If you are using a trial and want to try these preview features today, you can purchase a DevExpress Universal license online (this will give you access to the early access preview build). If you own a non-Universal subscription and are ready to upgrade, email us at clientservices@devexpress.com for upgrade pricing.

.NET Core / .NET Enhancements

.NET 8, .NET Framework 4.6.2, Visual Studio 2019 are minimally supported versions for DevExpress libraries moving forward

Learn more about this global (v24.2+) change in the following announcement.

To simplify the migration process, the DevExpress Project Converter will attempt to re-target your XAF projects to .NET 8 automatically.  


We will also try to update 3rd party packages to the latest compatible versions, where possible (for example, System.Text.Json, Microsoft.AspNetCore.*, Microsoft.EntityFrameworkCore.*, etc.) - almost 200 known dependencies in our Directory.Packages.props file.

This automation should save hours of manual effort especially for those XAF customers with large .NET Framework or .NET solutions. Of course, if your team already uses props files and Central Package Management (CPM), then you can skip our Project Converter and update everything manually. 

 

Easier Upgrade to .NET from .NET Framework

Our Project Converter can now convert DevExpress assembly references in your solution or specific projects to corresponding DevExpress NuGet packages. By selecting the "Convert DevExpress assembly references to NuGet packages" option under Advanced settings, you can easily transition to NuGet-based project management.

DevExpress Project Converter v24.2

To streamline the upgrade process, our Project Converter automatically creates backup (.bak) files for your CSPROJ and VBPROJ files. Once DevExpress assemblies are converted, complete the upgrade process by using the Microsoft .NET Upgrade Assistant (to migrate your application to the most recent version of .NET).

Documentation: Migrate a .NET Framework App to .NET | Choose Suitable NuGet Feed | Install NuGet Packages in IDE 

.NET 9 Support

XAF UI and Web API Service will fully support NET 9 in November (v24.2.2+). If you are already using .NET 9 RC1, replace 8.0.0 with 9.0.0 in the Model Editor config file (C:\Program Files\DevExpress 24.2\Components\Tools\eXpressAppFrameworkNetCore\Model Editor\DevExpress.ExpressApp.Design.ModelEditorServer.NetCore.v24.2.runtimeconfig.json): See T1200937 - Core - Model Editor does not work with .NET 8 projects.

Cross-Platform Enhancements

Security Enhancements: Passkeys and MFA Support with Microsoft Entra ID, Google and Other Authentication Providers

As you may already know, both XAF UI (Blazor and WinForms) and our Web API Service offer a "1-click" solution to incorporate modern OAuth2 authentication providers with native Single Sign-On (SSO) (such as Microsoft Entra SSO), Multi-Factor Authentication (MFA), and other security features. This works for both EF Core and XPO ORM. For additional information in this regard, refer to Active Directory and OAuth2 Authentication Providers in ASP.NET Core Blazor Applications and related documents.


Passkeys uses your device lock (such as your fingerprint, face, pin or pattern) to sign in to your Microsoft, Google or other authentication provider accounts. For example, Microsoft Authenticator can be used to sign in to any Microsoft Entra ID account without using a password. Microsoft Authenticator uses key-based authentication to enable user credentials tied to a device (where the device uses a PIN or biometrics). Windows Hello for Business uses a similar technology.


With v24.2, XAF UI (Blazor and WinForms) and our Web API Service will support all Passkey-related usage scenarios. This includes restoring a forgotten password, temporarily blocking access to accounts, account recovery, face recognition login, PIN, fingerprint, OTP, QR codes, or various authenticator apps, using a Middle Tier Application Server or simpler configurations in WinForms, etc.


EF Core Calculated Fields

We implemented a simpler solution for server-side calculated fields in EF Core. Note that you can sort, group, or filter List View data by calculated properties in Server and InstantFeedback modes. Use DevExpress.ExpressApp.DC.CalculatedAttribute or DevExpress.ExpressApp.DC.PersistentAliasAttribute to indicate whether a property's value is calculated. The following code snippet demonstrates how to create a class with a calculated property: 

using DevExpress.ExpressApp.DC;
public class Product : BaseObject {
 // ...
 public virtual decimal Quantity { get; set; }
 public virtual decimal Price { get; set; }
 
[PersistentAlias("Quantity * Price")]
 // or [Calculated("Quantity * Price")]
 public decimal TotalPrice {
     get {  return EvaluateAlias<decimal>();  }
 }
} 

EF Core Soft Deletion

v24.2 supports EF Core soft deletion (aka XPO's Deferred Deletion) for both XAF UI and Web API Service-powered apps.

With soft or deferred object deletion, the ORM marks objects as deleted and does not physically remove them from the database immediately. This technique helps avoid database exceptions when deleting objects referenced by other entities. 

We have also created an automatic converter for existing database tables (to add the new GCRecord column). For additional information in this regard, please review the following: Core - Database and data model code changes for XAF EF Core apps to support Soft/Deferred Deletion.  

EF Core Filtering Capabilities Are Now on Par with XPO ORM

v24.2 introduces calculated properties for EF Core in XAF (see above). This change necessitated easy access to custom IsExactType and IsInstanceOfType functions regardless of the ORM used in an application. 

To achieve parity, we moved custom IsExactType and IsInstanceOfType functions from the DevExpress.Xpo assembly to the DevExpress.Data assembly (see the following ticket for additional information: XPO - The IsExactType and IsInstanceOfType custom functions has been moved to the DevExpress.Data assembly).  
 
The change allows this feature to work in EF Core. We would also like to mention that you can use the following features in EF Core projects: Upcasting and Free Joins. This makes EF Core filtering capabilities no different from what is available in XPO ORM today.

XPO DateOnly/TimeOnly Support 

In v24.2, XAF supports DateOnly/TimeOnly in XPO connection providers for .NET apps. This enhancement benefits XAF/Reporting/Dashboards and other products since XPO is at the core of data access code internally. As part of this, we also changed column mappings for SQL types Date and Time.  

For more information on DateOnly/TimeOnly enhancements at the UI level of XAF WinForms apps (in grid and other controls), please review the following articles: v24.1 (WinForms,Blazor), v24.2 (the links to WinForms and Blazor EAP posts). 

Performance Enhancements 

We optimized image/icon load operations across all supported platforms. We noticed improvements in application startup time of up to 2 seconds (or more in complex applications with numerous Actions [>500]). 

Internally, we also used CriteriaCompiler instead of CriteriaEvaluator in security Object and Member Permissions (EF Core and XPO ORM) and Calculated Fields (EF Core only). This cut calculation time and memory allocations in half for specific usage scenarios. Optimizations are not yet finalized, but our complete implementation should be available as we near Beta 1 in November (v24.2.2+). In the meantime, you can check out a few screenshots from our labs (these changes are not yet included into this EAP):

Audit Trail Enhancements 

XAF now automatically excludes all non-persistent properties from the audit trail in XPO-based applications. This enhancement can improve performance if setter methods for non-persistent properties contain extensive logic. 

To update existing apps, set the static ObjectAuditProcessor.ExcludeNonPersistentFromAudit property to true. For additional information, please review the following: T1246233 - Audit - Non Persistent Properties are Excluded from the Audit Log (XPO)

Usability Enhancements 

We added new extension methods to make it easier to create a new Object Space using XafApplication and IObjectSpaceFactory. 

// v24.1.3 and earlier
var os = Application.CreateObjectSpace(typeof(Person));
// v24.1.5+ and v24.2+
var os = Application.CreateObjectSpace<Person>();

If you used IObjectSpaceFactory in ASP.NET Core apps (Web API Service controllers, custom Razor components, etc.), please consider the following minor breaking change in v24.2: T1254577 - INonSecuredObjectSpaceFactory and IObjectSpaceFactory classes were moved to the DevExpress.ExpressApp namespace

Artificial Intelligence (AI)

XAF Blazor and XAF WinForms-powered apps automatically derive all AI-related features available in DevExpress components for each supported UI platforms. You can either access underlying UI controls and enable AI features as necessary (an example with Blazor Rich Text Editor) OR create custom XAF Property Editors / user controls/forms based on AI-powered DevExpress controls like the Chat control.

DevExpress AI-powered APIs allow you to integrate the following AI services into your DevExpress-powered applications:

  • OpenAI
  • Azure OpenAI
  • Ollama

AI services and DevExpress AI extensions (behaviors) follow a "bring your own key" approach. DevExpress does not provide a REST API or include built-in LLMs/SLMs. To use AI services, you need an active Azure/OpenAI subscription to obtain the necessary REST API endpoint, key, and model deployment name. This information must be provided at application startup to register AI clients and enable DevExpress AI-powered features in your applications.

For additional information, please review the following documents: OverviewDevExpress AI-Powered Extensions for WinForms | AI-Powered Behaviors in Rich Text and Spreadsheet Editors for WinFormsAI-Powered Blazor Chat Component.

ASP.NET Core Blazor UI

HTML Markup Support within the Rich Text Property Editor 

XAF Blazor v24.2 supports DocumentStorageFormat = Html for the RichTextPropertyEditor. You can change this property via the Model Editor to support HTML markup instead of RTF (default). 

Default Caption or Image in Action Container with Drop-Down Menu 

In previous versions, action containers with drop-down menus required a default action which was displayed inside the container. In this instance, when the drop-down menu was opened, it displayed all actions except the default. Based on user feedback, we have changed this behavior in this release.

You can now leave the container without a default action and set a custom caption and image for the container instead. These captions and images will always be displayed regardless of which action is currently selected. In this instance, all actions added to the container are added to the drop-down menu. 

Toolbar.AddActionContainer("DropdownContainer", isDropDown: true, caption: "Actions", imageName: "Action_Search"); 

Tabbed MDI Enhancements

Tabbed MDI is a multiple document interface (MDI) UI metaphor found in many modern applications (including your favorite Web browser or Microsoft Outlook Web). It is a robust interface that maximizes document screen real estate, especially when working with multiple documents, email messages, etc. Tabbed MDI is enabled in XAF Blazor and WinForms apps by default.

XAF Blazor v24.2 adds tab context menu support (Close, Close All But This, Close All) and allows users to close a tab by using a middle-mouse click. XAF also stores the last active tab in the Application Model and restores it when you restart the application.


Early Access and CTP builds are provided solely for early testing purposes and are not ready for production use. This build can be installed side by side with other major versions of DevExpress products. Please backup your project and other important data before installing Early Access and CTP builds. This EAP may not include all features/products we expect to ship in our v24.1 release cycle. As its name implies, the EAP offers an early preview of what we expect to ship in two months.

Your Feedback Matters!

We recommend that you test the new features outlined in this post within Visual Studio 2022 using our MainDemo.NET.EFCore or MainDemo.NET.XPO demo (located in the following folder: "c:\Users\Public\Documents\DevExpress Demos 24.2\Components\XAF\"). You can also test the EAP build against your project, but please remember that this build is not ready for production use. We will keep you posted about additional features we expect to ship in 2024 (see our Year-End v2024.2 roadmap) as we get closer to official release.

If you've had the opportunity to use the EAP build, please post your thoughts in our roadmap survey below OR create a Support Center ticket. We will happily follow up.

Thanks,
Dennis Garavsky
Principal Product Manager
dennis@devexpress.com



Viewing all articles
Browse latest Browse all 148

Trending Articles