Releases: dsuryd/dotNetify
v5.4
Enhancements
- Portability to Amazon WebSocket API Gateway (documentation).
- Router compatibility with React 18. To use, import the following in your main entry js file:
import "dotnetify/react/v18-compatibility";
.
Sponsor Exclusives
- DotNetify-ResiliencyAddon: allows your dotNetify app server to be more resilient when serving as an HTTP integration backend to the Amazon WebSocket API gateway.
v5.3
Enhancements
- Minimal API as a lightweight alternative to base view model class inheritance (documentation).
Example:
appBuilder.MapVM("HelloWorld", () => new
{
Greetings = "Hello World",
ServerTime = Observable.Interval(TimeSpan.FromSeconds(1).Select(_ => DateTime.Now)
});
v5.2
v5.1
v5.0
Enhancements
- Vue version 3 compatibility.
- Message forwarding feature to support multi-server scale-out (#181, #257).
- Multicast push updates now use SignalR group send instead of individual connections.
Bug Fixes
- Fix a race condition that could cause
ObjectDisposedException
to get thrown from the view model factory method (#273). - Fix routing erroneously navigate to the "404" page on reconnection (#275).
- Fix exception from setting the "ItemKey" property in multicast view models that can occur on a high number of connections.
Breaking Changes
- The
Data
property value of the context object that is passed to middlewares and filters is no longer fixed to theJObject
type but depends on the type of SignalR serialization that is used (System.Text.Json, Newtonsoft.Json, or MessagePack). - The server will no longer attempt to create a view model instance if receiving client dispatches prior to the connect request.
- For projects with
System.Reactive
dependency, an upgrade to v5.0 is required.
Sponsor Exclusives
- DotNetify-Observer: a visualization dashboard that allows to see and inspect your client connections in real-time.
- DotNetify-LoadTester: performance testing tool to simulate a large number of concurrent client connections against your hub server. It allows you to build your own load profile, or choose from predefined ones: echo, broadcast, or chat room.
v.4.1.1
v4.1
This release provides improved support for asynchronous execution within a view model and allow the use of methods to express view model commands.
Features
- Add
OnCreatedAsync
virtual method inBaseVM
to allow asynchronous view model initialization (#110).
Example:
public class MyViewModel: BaseVM
{
...
public override async Task OnCreatedAsync()
{
MyPropertyValue = await SomeAsyncMethod();
}
}
- Support using method instead of
Action
property.
Example:
vm.$dispatch({Submit: {/*form data*/}});
public class MyForm : BaseVM
{
// OLD:
public Action<FormData> Submit
{
get => formData => SubmitForm(formData);
}
// NEW:
public void Submit(FormData formData) => SubmitForm(formData);
}
- Support asynchronous action methods. They are awaitable, which means you no longer need to call
PushUpdates
.
Example:
vm.$dispatch({Submit: {/*form data*/}});
public class MyAsyncForm : BaseVM
{
public string Message
{
get => Get<string>();
set => Set();
}
public async Task Submit(FormData formData)
{
await SubmitFormAsync(formData);
Message = "Submitted";
}
}
- Provide [ItemKey] attribute to specify list item keys for CRUD operations (#205).
Example:
// OLD:
public string Employees_itemKey => nameof(EmployeeInfo.Id);
public IEnumerable<EmployeeInfo> Employees { get; private set; }
// NEW:
[ItemKey(nameof(EmployeeInfo.Id)]
public IEnumerable<EmployeeInfo> Employees { get; private set; }
Bug Fixes
- Fix the middleware that extract headers so that the client can update the headers through dispatch (#251).
Notice
The library for ASP.NET Framework "DotNetify.SignalR.Owin" is no longer maintained, with v3.6.1 being the last published version. The source code was moved out the main repo and archived here. However, private support is possible with sponsorship.
v4.0
This release provides better Typescript support by migrating the majority of code to Typescript. Some type names have been renamed and will cause breaking changes if you're using type definitions from previous versions.
Bug fixes
v3.7.1
This release provides the much-needed enhancements to the React router, i.e. support for lazy-loading through integration with Webpack code splitting, 404 error handling, and server-side rendering.
Doc: https://dotnetify.net/core/api/routing
Features
- Support lazy-loaded routes by allowing
onRouteEnter
to return a promise object and defer the routing until the promise (which should be used to dynamically import the view components) is resolved. - Include
onRouteEnter
in theconnect
's options argument. - Add
enableSsr
(client-side) anduseSsr
(server-side) APIs to support server-side rendering. - Router will now request '/404.html' when the path cannot be resolved.
Note: to disable this feature, adddotnetify.react.router.notFound404Url = null
; - Allow the route template to accept wildcard (*) URL pattern to catch 404 errors.