RELEASE

Vendr 3.0.0 Release

21 September 2022

Our 3.0.0 release is the latest version of Vendr, which targets Umbraco v10+ and sets the baseline for future developments. Find out all you need to know about this release and how you can get your hands on it.

Vendr 3.0.0 Release

Two weeks ago we put out our Vendr v3 Release Candiate for people to test, for which we've had some great feedback. Today we are pleased to announce the official release of Vendr v3.

Vendr v3

Fundamentally, v3 does have a few API changes (we'll cover these shortly) but the main update is that it is now .NET Core only and we are closing the chapter on support for Umbraco v8 and the .NET Framework.

Our goal with v3 really is to get Vendr ready for the next stage of it's development and set a foundation we can continue that development on. Whilst maintaining v8 support was a worthwhile stepping stone, we think with Umbraco now on v10 LTS, and more and more people making the move to .NET Core, it's time to focus on the future.

Another goal of Vendr v3 was also to reduce some Umbraco dependencies around our persistence layer. Whilst building on top of Umbraco's APIs for this did aid our initial development, we felt it was important to regain control of our own implementations as we were finding more scenarios where the needs of an e-commerce system were different to that of a CMS and so different approaches were needed.

What's new in Vendr v3?

IVendrBuilder

Prior to v3, Vendr configuration was performed either against the Composer in v8 or the IUmbracoBuilder in v9+, however now that we no longer need to support Umbraco v8 it's allowed us to more easy define our own configuration API and so for this we now have an IVendrBuilder.

The IVendrBuilder interface can be accessed via a delegate function passed to the AddVendr extension used when registering Vendr explicitly.

public class Startup
{
    ...
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddUmbraco(_env, _config)
            .AddBackOffice()
            .AddWebsite()
            .AddVendr(vendrBuilder => {
                // Configure Vendr here
            })
            .AddComposers()
            .Build();
    }
    ...
}

The IVendrBuilder interface follows a very similar API to that of the IUmbracoBuilder having it's own Services, Configuration and WithCollectionBuilder methods. With this update, all extensions to Vendr should be moved to the IVendrBuilder instead of using the IUmbracoBuilder however this isn't a requirement so your existing code should continue to run without modification.

Unit of Work Changes

One of the most obvious API changes that has been made to Vendr v3 is around our unit of work pattern. Whilst our previous implementation had transient fault handling support, it was only handling faults at the individual command level and not at the work unit level. To resolve this we've introduced a new Execute method on the IUnitOfWorkProvider that accepts an action to encapsulate the unit of work.

Before:

using (var uow = _vendrApi.UoW.Create()) 
{
    // Your logic goes here
}

After:

_vendrApi.UoW.Execute(uow => {
    // Your logic goes here
});

By wrapping the work unit in an action like this it means we can rerun the entire unit if there is a fault, rather than just individual commands.

Vendr Specific Connection String

Another nice side effect of implementing our own persistence layer is that it has made it super easy to support a Vendr specific connection string, thus allowing you to store your Vendr data in a different database to that of your Umbraco content.

To configure a Vendr connection string, it's a case of adding a new connection string + provider name to your connection strings section in the app settings file with the key vendrDbDSN.

{
    ...
    "ConnectionStrings": {
        "umbracoDbDSN": "Server=umbracoServerAddress;Database=myUmbracoDb;User Id=myUsername;Password=myPassword;",
        "umbracoDbDSN_ProviderName": "Microsoft.Data.SqlClient",
        "vendrDbDSN": "Server=vendrServerAddress;Database=myVendrDb;User Id=myUsername;Password=myPassword;",
        "vendrDbDSN_ProviderName": "Microsoft.Data.SqlClient"
    },
    ...
}

Optional SQLite Support

Whilst Vendr v2 already supports SQLite, v3 moves this support into an optional package. During our performance testing it became clear that running Vendr on SQLite with the potential for concurrent cart sessions, SQLite is not a production suitable solution, so we decided to push the SQLite implementation to an optional package that you can install and configure for testing purposes.

You can install the SQLite NuGet package via the following command.

dotnet add package Vendr.Persistence.Sqlite

Once the NuGet package is installed, you'll then need to register SQLite support with Vendr via the IVendrBuilder interface.

...
.AddVendr(vendrBuilder => {
    vendrBuilder.AddSQLite();
})
...

Assuming Umbraco is running via a SQLite database, Vendr will now just connect to the same database to run. Alternatively you can register a separate connection using a custom connection string as mentioned above.

Other Updates

  • Optimistic concurrency checks when persisting an entity now ensures an entity can't be overwritten with stale state.
  • AsWritable now fetches the latest entity state from the database rather than just taking a snapshot of the given entities read only state.
  • Added DB indexes on orderId and storeId columns for better DB performance.
  • Added async support to payment forms via the new BeginPaymentFormAsync method.
  • Added support for bundle base price adjustments.
  • Introduced new BundleOrderLine and BundledOrderLine for strongly typed access to bundle specific features.
  • Add new IsBundle and GetBundles methods to make working with bundles easier.
  • Added default values support to payment provider / discount settings objects.

Bug Fixes

  • Reverting an order now only reverts finalized orders (carts should not get reverted).

Add-On Updates

When it comes to Vendr add-ons, all existing v2 payment providers should continue to work on v3 so there shouldn't be a need for these to be re-released. We've also recently released an update to Vendr Checkout to ensure this works on Umbraco v10.

We currently have an update for Vendr Deploy ready to go which will also be released shortly, and we'll be sure to speak with Kevin Jump about making sure the Vendr uSync package is also compatible.

Documentation Updates

With all of the updates to the APIs, we've also been through all the documentation and ensured these have been updated accordingley so you can rest assured, you'll be implementing things the recomended way.

Vendr v3 Docs

The Demo Store

As with all our updates, we've also ensured that the demo store has also been updated to run on Vendr v3 and to make use of all the latest API changes so that you can see all the changes in action.

Vendr Demo Store

How to get access to Vendr v3?

The Vendr 3.0.0 release is available now from the NuGet gallery

Frequently asked questions

Can I upgrade my Umbraco v9, Vendr v2 site to Vendr v3?

Yes you can.

Is there an upgrade fee for Vendr v3?

No. If you are within your licence 12 month upgrade window, you can upgrade to Vendr v3 for no extra charge. If you are outside of an upgrade window, you can purchase a standard upgrade licence which will give you a further 12 months of updates which will cover the ability to upgrade to v3.

Will you be adding new features to Vendr v2?

No. We released Vendr v2 as a bridge between Umbraco v8 and Umbraco v9. As those versions are now nearing the EOL, we are moving our focus to Umbraco v10 and the future.

Need help?

While Vendr v3 is ready to go, as ever, if you have any bugs or issues please feedback on our issue tracker

If developers have any questions on implementing the changes from Vendr v3, these should be asked on the Umbraco developer portal support forums.

Thank you

And with that we'd like to thank everyone who helped test out the RC and reported issues. We couldn't have done it without you.

Thanks for reading,

Team Vendr.