Skip to content
Apostolis Bekiaris edited this page Sep 13, 2019 · 70 revisions

GitHub issues GitHub close issues

About

The Reactive module can be used to create XAF DSL implementations in a Reactive/Functional style.

Versioning

The module is not bound to DevExpress versioning, which means you can use the latest version with your old DevExpress projects Read more.

The module follows the Nuget Version Basics.

Dependencies

.NetFramework:

DevExpress.ExpressApp Any
System.Interactive 4.0.0-preview.8.build.9
System.Reactive 4.1.6
Xpand.VersionConverter 1.0.34

Issues-Debugging-Troubleshooting

To Step in the source code you need to enable Source Server support in your Visual Studio/Tools/Options/Debugging/Enable Source Server Support. See also How to boost your DevExpress Debugging Experience.

If the package is installed in a way that you do not have access to uninstall it, then you can unload it with the next call when XafApplication.SetupComplete.

((Xpand.XAF.Modules.ReactiveModule) Application.Modules.FindModule(typeof(Xpand.XAF.Modules.ReactiveModule))).Unload();

Details

The module does not use controllers but only the existing or new XAF events where they are modeled as in observable with the prefix When.

Observables are nothing more than a Type however that provides operators/methods to combine,merge, zip, observeOn(Scheduler) using LINQ style syntax.

For example to get the first Customer ListView created since your application start you may write.

ListView listView=await application.WhenListViewCreated().ToListView().When(typeof(Customer))

To get the first new Customer created you can write:

Customer listView=await application.NewObject<Customer>()

To add that customer to the first view created collectionsource you can write:

var listView = application.WhenListViewCreated().ToListView().When(typeof(Customer));
var newCustomer = application.NewObject<Customer>();
await newCustomer.CombineLatest(listView, (customer, view) => {
    view.CollectionSource.Add(customer);
    return customer;
})

And so on, the sky is the limit here as you can write custom operators just like a common c# extension method that extends and returns an IObservable<T>

Tests

The module is tested on Azure for each build with these tests

Examples

All Xpand.XAF.Modules that reference this package are developed the RX way.

image

image


Custom badge

Star the project if you think it deserves it.

GitHub stars

Fork the project to extend and contribute.

GitHub forks

Clone this wiki locally