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

XAF v24.1 EAP — Tabbed MDI, Batch Edit, Notifications, Customization Form and Accessibility for Blazor, EF Core 8 and Performance Boost for Middle Tier Server

$
0
0

As you may already know, we are a couple of months away from our next major update (v24.1). This post describes a few XAF-related features we expect to ship in early June and details what’s inside our Early Access Preview build (for additional information on what you can expect, refer to our June 2024.1 roadmap).

As you will see below, XAF key focus areas will continue to remain Blazor, Entity Framework Core, Security and .NET 8One of XAF’s core development pillars is Low-Code/No-Code .NET application development (for Web, Desktop and APIs simultaneously). When time to market/efficiency matters (especially in today's world), XAF can help you deliver line-of-business apps in the shortest possible time using familiar RAD methodologies.

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 take a moment to 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.

ASP.NET Core Blazor UI

Tabbed MDI Support

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 WinForms apps by default, and XAF Blazor will provide a similar user experience in v24.1. You can also customize Tabbed MDI in the Model Editor as follows:

  • Restore previously opened tabs between application runs (RestoreTabbedMdiLayout True by default)
  • Refresh View data source on tab focus (RefreshViewOnTabFocus = False by default)
  • Display or hide tab images (ShowTabImage = True by default)
  • Display tabs at the top, bottom, or right of the main window (TabPosition = Top by default)

In addition, you can access the underlying tab control in code and configure it as needed using a Controller (in the SolutionName.Blazor project). For instance, you can load tabs on demand or simultaneously.

protected override void OnFrameAssigned() {
    base.OnFrameAssigned();
    Frame.TemplateChanged += Frame_TemplateChanged;
}
private void Frame_TemplateChanged(object sender, EventArgs e) {
    if(Frame.Template is ApplicationMdiWindowTemplate template) {
        template.TabsModel.RenderMode = DevExpress.Blazor.TabsRenderMode.AllTabs;
    }
}


Since our EAP v24.1 contains known issues with Tabbed MDI (fixed in our latest builds), we mostly ask that you to test this UI metaphor in your app for feedback purposes. 

Add New Fields into the Customization Form of the Grid and Layout Controls at Runtime

XAF WinForms apps include an Object Model dialog. With it, end-users can search, tick or untick data model fields (including sub-fields and collections), which are not yet displayed in the grid or layout control (as part of the Column Chooser or Customization Form).

Much like Microsoft Office apps, this capability allows users to fully customize list and detail forms (based on the structure of a data model). Again, this is helpful when developers need to address changes to business requirements without redeployment. For more information, refer to Runtime Layout Customization in ASP.NET Core Blazor Applications

XAF Blazor provides a similar experience for both ListView and DetailView in v24.1 (just remember this known issue). This feature removes the need for many UI customizations in the design-time Model Editor (inside Visual Studio) - something many of you love in XAF WinForms UI. Of course, you can also disable these runtime capabilities for end-users.

Notifications Module

XAF Blazor v24.1 supports our Notifications Module. The module allows you to display reminders for scheduler appointments or any custom objects (such as tasks). The detail form for a scheduler appointment/event will also allow you to configure reminders like those available in Microsoft Outlook. With the help of the Notifications Module, your app can display a popup window before appointment/event start times.

NOTE: our Notifications module does not have to be bound to the Scheduler module: it can display notifications that originate from anywhere. In the latter instance, your goal as a developer is to provide the notifications service with notification items and the service will process them as required.

Batch / Cell Edit in Grid List Editor

Batch Edit support officially ships in XAF Blazor v24.1 via a single option (InlineEditMode = Batch) - much like its XAF WebForms counterpart. At present (v23.2), XAF Blazor developers must manually enable this option (learn more).

Accessibility Enhancements and Keyboard Support

Currently, XAF (UI for ASP.NET Core Blazor, WinForms, and ASP.NET WebForms) ships with partial accessibility support mirroring those found in corresponding DevExpress UI controls across respective UI platforms:

XAF Blazor also ships with its own set of UI components/elements (like property editors and action containers). In v24.1, we extended accessibility support and improved keyboard support for all XAF Blazor UI elements (~20% of scenarios). XAF accessibility support will also level up automatically as soon as we enhance accessibility in DevExpress Blazor UI components throughout 2024.

Our Blazor Grid's keyboard navigation option also officially ships and is enabled by default in XAF Blazor.  See also the "Keyboard Support" and "Keyboard Support Enhancements and New Tab Navigation" sections in Blazor — June 2024 Roadmap (v24.1).

And Much More for Blazor...

For even more enhancements in XAF Blazor UI, please check out Blazor Component Suite — Early Access Preview (v24.1) - many of these component features will be available in XAF Blazor automatically.

Cross-Platform Enhancements

Migration from Newtonsoft.Json to System.Text.Json

System.Text.Json library is now used to deserialize input parameters for Backend Web API Service endpoints. 

For more information, refer to my other post .NET and .NET Framework — Migration from Newtonsoft.Json to System.Text.Json (v24.1) and this Breaking Change.

EF Core 8 Support

EF Core 8 support officially ships in v24.1 for XAF and associated Backend Web API Service. EF Core 8 is the latest production-ready version of Entity Framework.

While EF Core 8 offers numerous advantages over its predecessor (performance and customization included), it also introduced a series of breaking changes that we will need to address (for instance, DateOnly and TimeOnly support). To solicit feedback before official release, we intentionally added preview (CTP) support of EF Core 8 in v23.2.4+.

For more information about recent EF Core updates, refer to the following Microsoft document: What's New in EF Core 8 | EF Core 8 Breaking Changes | Performance Benchmarks for EF Core 8 vs XPO ORM.

Cascade Deletion for Aggregated One-to-Many Collections in EF Core

With v24.1, XAF's Solution Wizard includes `modelBuilder.SetOneToManyAssociationDeleteBehavior(DeleteBehavior.SetNull, DeleteBehavior.Cascade);` in the OnModelCreating method of EF Core-based apps. This code will configure DeleteBehavior.SetNull for non-aggregated One-to-Many associations and DeleteBehavior.Cascade for aggregated One-to-Many associations respectively. Previously, XAF's Aggregated attribute was not considered by EF Core as it was for XPO ORM (and there might be exceptions in certain ListView scenarios).

Documentation

Bypass Security Permission Checks for Internal Business Logic

In addition, it is now possible to call the new SetPropertyValueWithSecurityBypass method from within your BaseObject descendants to bypass security checks for certain protected properties in your internal application logic (custom base classes are also supported).

This capability is especially valuable to XAF developers when you wish to set service properties like CreatedBy, ModifiedBy, CreatedOn, UpdatedOn, etc. - our Audit Trail and Model Difference modules operate using a similar mechanism. The SetPropertyValueWithBypassSecurity method can freely set protected properties on behalf of a restricted/regular user in code much like an application administrator - without having to know admin credentials (like impersonation for service tasks).

    ApplicationUser GetCurrentUser() {
        return ObjectSpace.GetObjectByKey<ApplicationUser>(
            ObjectSpace.ServiceProvider.GetRequiredService<ISecurityStrategyBase>().UserId);
    }

    public override void OnSaving() {
        base.OnSaving();
        if (ObjectSpace.IsNewObject(this)) {
            SetPropertyValueWithSecurityBypass(nameof(CreatedBy), GetCurrentUser());
        }
        else {
            SetPropertyValueWithSecurityBypass(nameof(UpdatedBy), GetCurrentUser());
            SetPropertyValueWithSecurityBypass(nameof(UpdatedOn), DateTime.Now);
        }
    }

As you probably know, this is a long-requested option for many XAFers - an option that prevented full migration from Integrated Mode to Middle Tier Security (because CreateNonsecuredObjectSpace and other workarounds were inconvenient). The SetPropertyValueWithBypassSecurity also includes certain limitations like calling this method is only supported from inside BaseObject.OnSaving (for the best security) or the bypassed property cannot update other protected properties internally. We are of the opinion that this new option will cover 80% of popular use-cases.

Enhanced Performance for Middle Tier Security for WinForms Apps

XAF WinForms with Middle Tier Security will execute much faster in v24.1. Two of our best engineers from the Core squad, Max and Pavel, boosted performance for both EF Core 8 and XPO ORM, as compared to v23.2 (XPO ORM results are even better - a 2.5x improvement). Folks have not finished relevant optimizations, so we will share final numbers close to the official release in June).

The graphs below show the current duration of batch of performance tests and also individual tests in 24.1 vs v23.2 for EF Core 8.

Along with associated performance enhancements, this was the last step before we could enable Middle Tier Security in XAF WinForms apps in the Solution Wizard by default. Hopefully, XAF developers will find these new capabilities sufficient to switch to Middle Tier Security as well.

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 (from "c:\Users\Public\Documents\DevExpress Demos 24.1\Components\XAF\"). You can also test the EAP build with your real app, but please remember that this build is not ready for production code. We hope to keep you posted about remaining features from our June 2024.1 roadmap as  we get closer to official release (set for June 2024). 

We realize alpha/beta-testing is a time-consuming process and we are grateful to those who invest time with our EAP builds. Find the current implementation lacking flexibility? Feel we've overlooked a valuable usage scenario? Does our current implementation fail to address your business requirements?

Please post your thoughts in our roadmap survey below OR create a Support Center ticket. We will happily follow up and do what we can to extend the capabilities of our new products/features.

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



Viewing all articles
Browse latest Browse all 148

Trending Articles