Cadru 4.5

  • 6 minutes to read
  • edit

It’s hard to believe that just over seven years ago, I first released Cadru as an open-source framework. In that time, there have been a few updates, but none as ambitious as the 4.0 preview. The main goal of that release, which was about three years ago, was to add support for .NET Standard and split up the project into smaller, and more focused, packages.

It feels like the 4.0 release has been in perpetual preview mode, with changes made periodically over that time. The most significant changes, though, have been in this past week and support the new Cadru 4.5 release.

.NET Standard support

All of the projects, except one, have been updated to .NET Standard 2.1. This is a departure from the original idea of making Cadru support the broadest reach possible by targeting a “lowest common denominator” of portable APIs. With the upcoming November release of .NET 5, it was time to bring Cadru into a more modern code base and make other improvements that are only available with newer language features. These changes will also allow me to update to .NET 5 more easily.

As of right now, Cadru.Postal, is still on .NET 4.5. It’s due to be rewritten to support the Razor SDK, but until then, it has to stay behind.

C# 8.0 language features

Updating to .NET Standard also brought with it an update to using C# 8.0 language features. One of those improvements is nullable reference types, enabling developers to make meaningful statements about the nullability of a reference type:

By supporting nullable reference types now, the eventual update to .NET 5, where nullable reference types are the “new normal”, will be that much easier.

Some of the other language features that were adopted are:

New projects and retired old ones

There have been improvements in the project organization, including splitting things up into more projects, which also means that there are more NuGet packages. These are smaller, more focused packages that should allow for better flexibility in choosing what features you need.

While that’s a lot of packages, there are a few other changes to note:

What’s next for Cadru?

The most significant update planned will be support for .NET 5 when it releases in November. Until then, there are a handful of known tasks still left. See the Cadru 5.0 milestone for more details. There are only a few issues in there right now, but I will be adding more over time.

Comments