Here is our first XAF Blazor (Server Side) demo: https://www.devexpress.com/go/XAF_Blazor_Demo.aspx
It demonstrates straightforward CRUD usage scenarios. Feel free to test its capabilities within a modern desktop or mobile browser.
For more information, see our online documentation.
How It Works
XAF automatically generates this simple UI and database based on the following ORM data model.
using System;
using DevExpress.Xpo;
using DevExpress.Xpo.Metadata;
using DevExpress.ExpressApp.DC;
using DevExpress.Persistent.Base;
using DevExpress.ExpressApp.Model;
using DevExpress.Persistent.BaseImpl;
namespace BlazorDemo.Module.BusinessObjects {
[DefaultClassOptions]
[XafDisplayName("Note")]
[XafDefaultProperty(nameof(Subject))]
public class DemoNote : BaseObject {
public DemoNote(Session session) : base(session) { }
private string _Subject;
public string Subject {
get { return _Subject; }
set { SetPropertyValue<string>(nameof(Subject), value); }
}
private DateTime _CreatedOn;
[ModelDefault(nameof(IModelCommonMemberViewItem.AllowEdit), "False")]
[ValueConverter(typeof(UtcDateTimeConverter))]
public DateTime CreatedOn {
get { return _CreatedOn; }
set { SetPropertyValue<DateTime>(nameof(CreatedOn), value); }
}
private DateTime _LastModified;
[ModelDefault(nameof(IModelCommonMemberViewItem.AllowEdit), "False")]
[ValueConverter(typeof(UtcDateTimeConverter))]
public DateTime? LastModified {
get { return _LastModified; }
set { SetPropertyValue<DateTime?>(nameof(LastModified), value); }
}
private string _Owner;
[ModelDefault(nameof(IModelCommonMemberViewItem.AllowEdit), "False")]
public string Owner {
get { return _Owner; }
set { SetPropertyValue<string>(nameof(Owner), value); }
}
private string _Description;
[Size(SizeAttribute.Unlimited)]
public string Description {
get { return _Description; }
set { SetPropertyValue<string>(nameof(Description), value); }
}
public override void AfterConstruction() {
base.AfterConstruction();
CreatedOn = DateTime.Now;
LastModified = DateTime.Now;
Owner = "BLAZOR Demo User";
}
protected override void OnSaving() {
base.OnSaving();
if(!Session.IsNewObject(this)) {
LastModified = DateTime.Now;
}
}
}
}
It uses eXpress Persistent Objects (XPO), but we will support Entity Framework in the future. For more information on how XAF works, refer to Getting Started.
Future Plans
By the end of 2020, we hope to give XAF users a stable platform on which to build Blazor-powered apps (with full CRUD capabilities and core modules like Security and Validation). As you’d expect, usage scenarios will be partly driven by the scope and breadth of the DevExpress Blazor product line. To help clarify our vision, we will build a Blazor demo inspired by its ASP.NET WebForms counterpart (MainDemo) - expect more updates from us in the coming months.
Blazor Server Today, Blazor WebAssembly is for the Future
As you know, our decision was relatively simple: Blazor Server is ready for production while Blazor WebAssembly is in preview (learn more from Microsoft). Blazor WebAssembly is also hampered by a few performance issues.
Scenario (Desktop / Mobile)
|
Server Side
|
WebAssembly
|
App Start
|
2 sec / 6 sec
|
6 sec / 46 sec
|
Open List View
|
< 0.5 sec / < 0.5 sec
|
2 sec / 7 sec
|
Open Detail View
|
< 0.5 sec / < 0.5 sec
|
1 sec / 7 sec
|
In addition to performance, Blazor WebAssembly involves more complicated development paradigms for existing XAF users. For instance, you need to consider client and server communications, use asynchronous APIs with IObjectSpaceAsync, ActionBase.ExecuteAsync, etc.
Anyway, we will certainly monitor the progress of Blazor WebAssembly and reconsider our strategy when necessary. So far, we have not done anything that would prevent a potential switch from one hosting mode to another.
Your Feedback Matters
To engage us and discuss XAF’s vision, roadmap and technical requirements, please use our private XAF discussion forum (exclusively for Universal customers). The forum also includes a known issues list for this pre-alpha release.
Feel free to comment below or email us at xafteam@devexpress.com for more information.
Free DevExpress Products - Get Your Copy Today
The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the
DevExpress Support Center at your convenience. We'll be happy to follow-up.