Skip to content

Releases: dsuryd/dotNetify

v5.4

02 Jan 01:09
Compare
Choose a tag to compare

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

20 Jan 08:20
Compare
Choose a tag to compare

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) 
});
  • IDotNetifyConfiguration property CamelCaseSerialization for applying camel case naming when serializing view models.
  • Support dispatching to methods with multiple arguments (#314).
  • Support dispatching to methods with tuple argument type (#314).

v5.2

01 Oct 17:38
Compare
Choose a tag to compare

Enhancements

  • Switch SignalR client library from @aspnet/signalr to @microsoft/signalr.
  • Add configurable retry policy for .NET client.

Bug Fixes

  • Fix .NET client unable to recover from temporarily lost connection (#297).
  • Fix JSON exception on the browser when processing updates in Web API mode.

v5.1

05 Jul 18:19
Compare
Choose a tag to compare

Enhancements

  • Add setState to the object returned by useConnect.
  • Make the initial state parameter of useConnect optional.
  • Updating .NET client list items no longer raises the changed event on the entire list (#284).

v5.0

19 Mar 22:58
e1aeb1c
Compare
Choose a tag to compare

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 the JObject 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

24 Nov 02:22
a073015
Compare
Choose a tag to compare

Bug Fix

  • Fix Web API endpoint not responding when the client update does not yield any server response.
  • Fix Typescript typing issues (#255, #271).

NuGet symbol packages (.snupkg) are included to provide better debugging experience.

v4.1

30 Jun 01:36
Compare
Choose a tag to compare

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 in BaseVM 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

01 Jun 01:56
Compare
Choose a tag to compare

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

  • Add multi-instance support to MulticastVM (#248).
  • Fix routing check for React component (#245).
  • Fix routing to use React.hydrate only if SSR is enabled.

v3.7.1

14 May 18:38
74c212c
Compare
Choose a tag to compare

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 the connect's options argument.
  • Add enableSsr (client-side) and useSsr (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, add dotnetify.react.router.notFound404Url = null;
  • Allow the route template to accept wildcard (*) URL pattern to catch 404 errors.

Bug Fixes

  • Fix useConnect to merge the existing state with the new state instead of replacing it (#237).
  • Fix routing so it can match "/" paths.
  • Fix JObject.Parse exception in Update_VM when using System.Text.Json (#239).

v3.6.2

15 Mar 02:36
Compare
Choose a tag to compare

Bug Fixes

  • Fix Update_VM failing with MessagePack (#227).