Oqtane 2.1 Is Now Database Agnostic
By: Shaun Walker
Hot on the heels of Microsoft BUILD 2021 we are pleased to announce the official release of Oqtane 2.1, a new major release of the popular modular application framework for Blazor, adding multi-database support to its growing list of framework capabilities.
The Oqtane framework was engineered from the ground up to take advantage of the benefits of .NET Core, the next generation development platform from Microsoft, allowing you to create powerful cross platform applications that run on Windows, Linux, or MacOS. That being said, the Oqtane framework requires a database as a foundational infrastructure component for its many APIs, and prior to the 2.1 release the only supported database was SQL Server. This limitation did not align with Oqtane 's Philosophy of Flexibility and was clearly a hurdle to cross platform adoption as well as usage of Oqtane on cost optimized infrastructures.
In this regard, Oqtane 2.1 is a game changer... as it now offers native support for all of the most popular relational database platforms including SQL Server (and LocalDB), SQLite, MySQL, and PostgreSQL - each of which are highly mature and reliable, and have massive and loyal user bases on their respective operating system platforms. This new feature was made possible by utilizing the native capabilities of EF Core, Microsoft 's preferred ORM technology which was completely rebuilt for .NET Core. In particular, an abstraction was created over top of EF Core 's native Migration capability to enable a seamless installation and upgrade of database schemas for each type of database using a single generic interface. It is important to note that the new Migration capability is fully integrated with Oqtane 's multi-tenant infrastructure which supports both shared and isolated data tenancy models. And staying true to Oqtane 's modular nature, each database provider is packaged and installed independently so that you only provision what you need.
And on the topic of modular architecture, multiple database support would offer minimal value if it was only implemented in the core framework itself. The true benefit of Oqtane is in the ability for developers to extend the core functionality with their own custom modules. So it makes perfect sense that new framework methods have been included in the 2.1 release to enable developers to leverage the multi-database capability in their own creations as well. Modules which utilize the new approach will be able to support multiple databases without having to write specific logic for each.
I would like to personally thank Charles Nurse (@cnurse), former Chief Architect of DNN Corp, for his efforts in bringing this powerful new capability to Oqtane. I would also like to thank Pedro Cancela (@pcancela) for submitting a proof of concept for MySQL support which offered some great inspiration for the final implementation.
The 2.1 release has also added support for a new folder type classified as Public which allows you to manage static file assets in an accessible location (ie. the wwwroot folder). It is important to understand that files stored in this location are not protected by any form of application security - access is granted to anyone who has the direct Url link to a file. The is obviously different than Oqtane 's other natively supported folder type of Private where file assets are in a protected location and cannot be accessed without explicit authorization. Public folders do provide a variety of benefits in scenarios where files do not require protection, as they offer human friendly Urls and improved performance characteristics.
The 2.1 release contains a variety of other new features as well including multi-tenancy optimizations, consolidation of Nuget package installation and uninstall, the ability to install satellite assemblies in language packages at run-time, and Blazor pre-rendering support. To date, the open source repository has attracted 841 pull requests and 2051 commits from 26 contributors and has published 12 official releases, which ranks it among the most active open source projects within the .NET Foundation.
The Oqtane framework continues to evolve at a rapid pace to meet the needs of .NET developers. The 2.1.0 release is available for download on Github and I encourage the community to visit the repo often to keep abreast of the latest developments.