Skip to content

Releases: OpenRIAServices/OpenRiaServices

5.1.0-preview3

15 Oct 05:14
0b8f072
Compare
Choose a tag to compare
5.1.0-preview3 Pre-release
Pre-release
  • Fix bug in 5.1.0-preview2 where server project had wrong assembly version (#320, #321)

v5.1.0-preview2

13 Oct 13:28
665ac49
Compare
Choose a tag to compare
v5.1.0-preview2 Pre-release
Pre-release

5.1.0-preview2

  • BinaryHttpDomainClientFactory improvements and bug fixes
    • Serialize parameters based on contact's parameterType #318
      This fixes a number of potential issues, such as passing "non-serialisable" enumerables such as result of LINQ Select
      as method parameters
    • Properly handle nullable parameters for EntityActions #311
    • Make fault handling more tolerant to different variants of Faults #310
    • Add ServiceBaseUri to BinaryHttpDomainClientFactory construktor
DomainContext.DomainClientFactory = new OpenRiaServices.Client.DomainClients.BinaryHttpDomainClientFactory(new Uri("https://YOUR_SERVER_URI"), () => createHttpClient());
  • Add .netstandard 2.0 build of server project #314
    This is intended to unblock development of newer code generation and hosting layers on .Net 6

 v5.1.0-preview.1

30 Sep 07:27
c5d3c84
Compare
Choose a tag to compare
 v5.1.0-preview.1 Pre-release
Pre-release
  • New HttpClient based DomainClient - BinaryHttpDomainClientFactory (#290, #
  • BREAKING CHANGE Changes to wire format in order to fix serialization of DateTime (nullable and on complex objects) (#289, #75)
    • 5.1 Clients need a 5.1 Server
    • Server is backwards compatible so that it can be upgraded safly first
  • Potential BREAKING change: Complex Objects/Typs (classes/structs which are not entities) parameters will now always be validated (#303,
    • Previously they were only validated when calling entity actions and not Invoke methods

BinaryHttpDomainClientFactory

Add a new cross platform (Including Blazor wasm) more easily extensible DomainClient for the binary protocol.

  • Enable binary endpoint to be use on other clients than .Net Framework
  • Adds support for blazor wasm where the wcf soap based client has problems
  • Enable easier extensibility such as oath, client side caching, compression etc using standard HttpClient middleware (HttpMessageHandler)
  • Can support HTTP2 and other more advanced networking features
HttpMessageHandler httpMessageHandler = new HttpClientHandler() { ... };
DomainContext.DomainClientFactory = new OpenRiaServices.Client.DomainClients.BinaryHttpDomainClientFactory(httpMessageHandler)
            {
                ServerBaseUri = "https://YOUR_SERVER_URI"
            };

Or if you want to use factory for your HttpClients you can pass in a function as callback

DomainContext.DomainClientFactory = new OpenRiaServices.Client.DomainClients.BinaryHttpDomainClientFactory(() => createHttpClient())
            {
                ServerBaseUri = "https://YOUR_SERVER_URI"
            };

5.0.1

10 Sep 09:51
a4d17cb
Compare
Choose a tag to compare
  • IMPORTANT: Fix a potential security vulnerability where entity parameters are not validated when calling invoke methods (#292)
    • The issue occurs if there are nothing else to validate so if there were validation attributes on the method,
      any parameters or it contained any "complex objects" then validation happened as expected.
      Thanks to @ehsangfl for finding and helping to find the cause of the issue
  • Allow nullable parameters to GET methods to be sent using same format as non-nullable parameters
    This enables the "HttpClient" based sample DomainClient for Xamarin etc. to work, and prepares for the upcoming official version (#290)
  • Make it clear that DomainClientFactory must be set at startup (#301)
    Throws exception instead of trying to create a instance which does not work

Update dependencies

  • Mono.Cecil 0.11.3 -> 0.11.4
  • System.ServiceModel.Http 4.8.0 -> 4.8.1

5.0

18 Dec 09:49
bdfb74d
Compare
Choose a tag to compare
5.0

TODO: Write release notes ..

Se Changelog in the meantime
Also preview release notes might contain some small additional details

v5.0.0 RC1

16 Nov 08:03
6f3b8de
Compare
Choose a tag to compare

Whats new since preview 3

  • "DomainServices" dropped from all namespaces, filenames as well as nugets and DLLs. #234
    • IMPORTANT Search and Replace OpenRiaServices.DomainServices with OpenRiaServices in all files when upgrading
  • Namespace OpenRiaServices.Client.ApplicationServices has been replaced with OpenRiaServices.Client.Authentication
    search and replace is needed on upgrading #248
  • OpenRiaServices.Hosting has been moved to a separate nuget OpenRiaServices.Hosting.Wcf #251
    • IMPORTANT You must add a reference to OpenRiaServices.Hosting.Wcf nuget in your web application
    • IMPORTANT Search and Replace OpenRiaServices.Hosting with OpenRiaServices.Hosting.Wcf in all files when upgrading
    • IMPORTANT web.config files needs to be changed (unless packages.config is used for nuget packages), see upgrade instructions in changelog
      • OpenRiaServices.Hosting.DomainServicesSection renamed to OpenRiaServices.Hosting.Wcf.Configuration.DomainServicesSection
  • Updated required version of .Net Framework to 4.7.2 (#241)
  • Updated dependencies including EntityFramework to latests availible versions #240

Client

  • IgnoreDataMemberAttribute can now be used on the client to prevent client properties from beeing included/overwritten when loading data using MergeIntoCurrent or the state manipulating methods ApplyState, ExtractState etc. #249
    • MergeAttribute which has a similar usage area has been moved to OpenRiaServices.Client.Internal and might be removed in future releases.

Code Generation

  • Suppress generation of DebuggerStepThroughAttribute from async methods
  • New handling of shared files #229
    Instead of copying all ".shared" files to the Generated_Code folder the server version is referenced instead
    • This should build faster builds and allows find all references, refactoring etc to work for shared files
    • It is possible to opt out of the new behaviour by adding <OpenRiaSharedFilesMode>Copy</OpenRiaSharedFilesMode> in the project file
    • The tooling is updated with a new option
  • Load Mono.Cecil exclicitly in code generation #255 to fix issue such as #247 without having to do a workaround

Server

  • Create, Update and Delete methods on server can now return Task #226
  • The CancellationToken passed to SubmitAsync and InvokeAsync now supports cancellation on client disconnect #250
  • OpenRiaServices.Hosting has been moved to a separate nuget OpenRiaServices.Hosting.Wcf #251
  • Security: Don't include stack traces for errors by default #256
  • Dont use HTTP status code "200 OK" for exceptions (will use 500 Internal Server Error by default) #257
    • It is free for library consumers to change the handling of returned HTTP response codes status such as using a "SilverlightFaultBehavior" or similar
  • OpenRiaServices.Hosting has been moved to a separate nuget package OpenRiaServices.Hosting.Wcf #251
    1. You must add a reference to OpenRiaServices.Hosting.Wcf nuget in your web application
    2. Search and Replace OpenRiaServices.Hosting with OpenRiaServices.Hosting.Wcf

Unit Testing

  • DomainServiceTestHost has received an number of new methods and overloads to help with unit testing async code. (#245)
    • Added async methods for DomainServiceTestHost
      • UpdateAsync
      • InsertAsync
      • InvokeAsync
      • QueryAsync
      • SubmitAsync
    • Added overloads to Invoke for methods returning Task to fix the following issues
      • Fixed bug when TResult was a Task and returned null (could await null)
      • Fixed bug when TResult was a Task and returned Task

v5.0.0 Preview 3

04 Dec 14:23
c651bd0
Compare
Choose a tag to compare

5.0.0 Preview 3

Client

  • Complete Load/Invoke/Submit and Authentication operations on the ´SynchronizationContext` of the caller instead of saving the SynchronizationContext (#211, #209 for submit, #216, #212)
    • This is a behavioral change which might break applications.
      This means that operations should be started on the UI thread if any data of the DomainContext or returned Operaitons are bound to the UI before completion.
  • Base SubmitChanges on SubmitChangesAsync (#209)
    • Submit operation will now cancel only if the web request is cancelled (and then after cancellation)
      Update cancellation behavior to be the same as for Load and Invoke (Follow up on #203 and #162)
    • Changed extension point for SubmitChangesAsync to a new method called by both SubmitChanges and SubmitChangesAsync
      protected virtual Task<SubmitResult> SubmitChangesAsync(EntityChangeSet changeSet, CancellationToken cancellationToken)
    • Changed extension point for InvokeOperationAsync to a new protected method.
  • Base DomainContext.Invoke on DomainContext.InvokeAsync (#203)
    • Invoke operation will now cancel only if the web request is cancelled (and then after cancellation)
  • Ensure Completed event is always called when Load/Invoke/SubmitOperation finishes (#206)
  • AuthenticationService is rewritten to use TPM (Task based methods) instead of APM for the methods implementing the actual authentication operations (#212, #214, #216)
  • Pass in endpoint name in WcfDomainClientFactory to make it easier to derive from it (#218)
  • Hosting - new "PubInternal" types
    • behaviors for easy creation endpoints based on standard wcf (non REST) transports

Bugfix

  • Handle early cancellation (Cancellation before actual request has been sent) in WebDomainClient (#210)
    • In earlier previews an exception was thrown instead of the operation beeing Cancelled

Server

  • Hosting - Endpoint changes (#218)
    • Reuse the same ContractDescription for multiple endpoints (endpoint name is not longer added)
    • Dont add SilverlightFaultBehaviour by default to DomainServices
    • new "PubInternal" types
      • behaviors for easy creation endpoints based on standard wcf (non REST) transports
  • Trigger cancellation on client disconnect (#222)

Server

  • EntityFramework: Target IDbSet instead of DbSet with AttachAsModified extension methods (#215)

Infrastructure

  • Improved test execution times by reducing waiting delays (parts in #212. 213)

v5.0.0 preview 2

30 Oct 13:28
bc49ee9
Compare
Choose a tag to compare

This release should be considered to be production quality but it is still a preview since some more breaking changes might be done before final release

This is mostly a performance and feature update.
It does not contain any new breaking changes since preiew 1
Please provide feedback, both good and bad to #178

Largest performance improvements are when returning larger responses and for the first operation using a a new DomainContext and invoking a single load

Below are E2E benchmarks for creating a DomainContext and returning a number of different entities across different releases
image

Feedback

Please provide feedback, both good and bad to #178

Client

  • Cache ChannelFactories for large performance improvements (#184)

Code generation

  • Code generation now works for netstandard and netcoreapp (#199, #201)
  • Fix error messages about incompatible Target frameworks when TargetFramework differs between client and server. (#188)

Server

  • Significant performance and memory usage improvemens for serialization (#189)
  • Improve Perf for Query and Invoke where validation is not required (#186)
  • Reduce per request allocations (#197)
  • Small improvements in Task To APM wrapper for async completing operations
  • Fix potential race condition when configuring endpoint authentication. (#196)

Other

  • Readme updates

Following contains the same numbers but where the same DomainContext is reused for each load
image

v5.0.0-preview1

01 Sep 21:11
8b6a53d
Compare
Choose a tag to compare
v5.0.0-preview1 Pre-release
Pre-release

Overview

  1. Server is now asynronous which allows it to handles burst in load much better and generally better performance (latency/CPU/memory) under load.
  2. Client networking API the DomainClient is now based on Task instead of using the APM pattern with Begin/End methods
  3. Supported TargetFrameworks has changed
  4. AspNetMembership authentication (AuthenticationBase and related classes) are moved to a new namespace and nuget package
  • Add a reference to *penRIAServices.Server.Authenication.AspNetMembership nuget if you use it

Upgrade instructions

  1. Update both all client anor/or server nuget packages to the new version, dont't mix with v4 in the same project.
  2. If you have been using AuthenticationBase or other classes in the OpenRiaServices.DomainServices.Server.ApplicationServices namespace in your server project
    1. add the OpenRiaServices.Server.Authentication.AspNetMembership nuget package to it
    2. Replace OpenRiaServices.DomainServices.Server.ApplicationServices with OpenRiaServices.DomainServices.Server.Authentication
    3. Add using for OpenRiaServices.DomainServices.Server.Authentication.AspNetMembership in file which uses AuthenicationBase
  3. If you have compilation problems in your DomainServices because it overrides methods which do not exist
    then try to overridde the method with the same name but with "Async" as postfix, method signature will be different.
    Eg. replace override of Invoke with override of InvokeAsync.
  4. Fix any additional compilation errors, use changes below for guidance about replacements.
  5. If you are using OpenRiaServices.EntityFramework the framework will now only call the SaveChangesAsync and not SaveChanges so if you are overriding SaveChanges make sure you do the same for SaveChangesAsync

For better scalability (can be done afterwards):

  1. Update your Query and Invoke methods so that they use async/await where relevant.
    E.g if you are using EF6, other ORM frameworks or do network or file access.

Client

Most of the changes are Breaking changes, even if many of them will only require changes in a small percentage of applications.

1 Change DomainClient contract to Task based async methods (#153)
* Performing multiple loads and waiting for the result is now faster
* Any custom DomainClient or code which interact with DomainClient will no longer compile.
2. Remove old target frameworks

  • Remove netstandard13 (#160)
  • Remove portable class library TargetFramework (#164)
  • Remove Silverlight (#174, #175 and more commits)
  • .Net Framework 4.5 requirement is replaced by 4.6 (will be 4.6.1+)
  1. Move EntityList and QueryBuilder from OpenRiaServices...Data namespace to OpenRiaServices...Client namespace (#182)
  2. Dont allocate PropertyChangedEventArgs if not needed (#155)
    • remove sevaral OnPropertyChanged methods and only keep RaisePropertyChanged
      • If your code does not compile override RaisePropertyChanged instead
    • Memory usage during Load etc is much lighter
  3. Make DomainClientResult internal so it can be removed in the future
  4. Have EntityContainer.LoadEntities return IEnumerable<Entity> instead of IEnumerable
  5. Make WebDomainClient non sealed (#166) non breaking
    Make CallServiceOperation virtual so that the invoke behaviour can be modified in derived classes.
    This should simplify adding bearer based authentication
  6. Change from IEnumerable to IReadOnlyCollection in a few places (#183)
  • Mostly ValidationErrors properties and for IEntityCollection

Behaviour changes

  1. Base DomainContext.Load on DomainContext.LoadAsync instead of other way around
  • The generic Load<TEntity> can be overridden but it will only be called when any of the "Load" methods are called
  1. DomainContext.IsLoading is no longer set to false directly on cancellation.
    Instead a load is only considered done until after it has been cancelled (or completed)

Server

  1. DomainServices are now async #159 and many methods have been renamed with Async suffic
  2. Move aspnet authentication to separate namespace, assembly and nuget package (#173)
    Move Authenication related code from ..Server.ApplicationServices to
  • ..Server.Authentication
  • and ..Server.Authentication.AspNetMembership (AuthenticationBase, UserBase ..)

Other

  • Fixed a number of flaky tests (#161, #172, .. and more commits)
  • use VS2019 for azure pipelines (#148)
  • Have client test start webserver if not already running (#169)
  • Changed folder structure by placing code in src folder (#176)
  • net45 dependency replaced with net46 dependency
    • With slightly better less allocations as a result
  • Removed code market as obsolete (#170)
  • Some modernisation of codebase via refactoring via code analyzers

API Diff

To view difference in API the excellent fuget site is recommended:

Feedback

Please provide feedback, both good and bad to #178

v4.6.3: Fix exception preventing Silverlight from saving changes (#168)

15 Aug 18:16
Compare
Choose a tag to compare
  • Fixed exception when saving new entities in Silverlight (#167) by @rkone