Overview
Hoarder is the latest incarnation of the endless generations of application suites created since 1985 that manage the Nancy Street collections database, and mercifully, it may be the last one for some time. This suite took the revolutionary and highly productive step in January 2018 of discarding SQL Server and other relational databases and moves all data to Microsoft Azure Cosmos DB and Blob Storage .
For more information about the startling success of moving the collections database from SQL Server to Cosmos DB see the following Blog post:
Collections Database History
(a.k.a. Thinking outside the relational database box)
The Hoarder projects are effectively a huge playground for trying new languages, platforms and tools. And although Hoarder is a programmer's hobby project only intended for use within Nancy Street, the whole repository is public in case it contains useful sample code or techniques.
The Hoarder suite consists of eleven C# .NET 9 projects, which includes two unit test libraries, four applications, four libraries and a Sandcastle documentation project. The major projects are discussed in the following sections.
ℹ️ Seven T4 text transform templates are used in Hoarder projects to generate large amounts of boilerplate C# code. A single XML file defines the public API methods and their names, parameters, return types and code documentation. The templates read the XML file and create interfaces, classes and code stubs at different tier levels. The power of code generation templates should not be underestimated.
Hoarder Desktop
The desktop application is written using the WPF framework with classical command and data binding techniques. The screen sample below shows the Explorer view where titles in the collection can be filtered using a variety of conditions (title, contributor, location, media, tag, genre, etc). There are five other views for Pictures, Contributors, Search, Maintenance, and a special Spreadsheet view for browsing and comparing large amounts of title information.
Click to see the full image
Blazing Hoarder
As a keen proponent of Webassembly and Microsoft's client-side implementation called the Blazor platform , it was a natural step to create a Blazor application over the collections database. Visit Blazing Hoarder and notice how responsive the UI is thanks to the app running hosted inside the web browser. See blog entry Blazor Webassembly Notes .
Hoarder REST API
For a few years, a public API over the Hoarder database was implemented using Azure Functions . That exercise worked acceptably well and proved that Functions are easy to create, but with the arrival of .NET Core 6 it was a good time to drop the Functions and undertake a learning exercise to implement a fresh REST-style API using the latest Web API projects and libraries.
In March 2023 the project was converted to .NET 7 using the minimal API coding style. Fortunately, all the attributes that were available in .NET 6 controller coding style finally have equivalent extension methods in .NET 7. In December 2023 all projects were migrated to .NET 8, then in January 2025 up to .NET 9.
The Swagger generated help for the new web service API can be found here:
http://www.orthogonal.com.au/hoarderapi/swagger/
Hoarder Standard Library
It is a conventional courtesy for publishers of a service API to provide libraries so clients written in different languages can easily consume the API in a strongly-typed way. The Orthogonal.Hoarder.StdLib library contains a .NET client class HoarderServiceClient.cs and a set of classes that represent all request and response data. Library documentation generated by Sandcastle Help File Builder can be found here:
https://orthoprog.blob.core.windows.net/dochelp/hoarder-stdlib/index.html
A corresponding .chm (compiled HTML Help ) file is also generated for the standard library and can be downloaded from:
https://orthoprog.blob.core.windows.net/dochelp/hoarder-stdlib/hoarder-stdlib.chm
You may need to overcome some security restrictions to download and open the chm file.
The library project generates a conventional NuGet package, but it's not published because there are no public client consumers of the Hoarder web service.
Authorisation
As a technical exercise, the Web API implements standard authorisation flow using JWTs (JSON Web Tokens). The authorisation/login
endpoint takes an API Key (not User and Password credentials) and converts it into an encoded JWT string which contains the roles assigned to the key. Client apps can set the Token
property of the HoarderServiceClient.cs class, and a valid token with roles will unlock certain data and features of the API. Many endpoints perform data modification and an attempt to call them without the required token and roles will result in a 401 status response.
string jwt = await Client.Login("some-api-key");
Client.Token = jwt;
Visio Flowchart
Historical Reading
Agate
The suite that preceded Hoarder. Agate was based upon SQL Server, Entity Framework 6, WPF, Rackspace Cloud Files and Azure Blob Storage. The archived Agate Wiki page describes the long history of the technology that has been used over the decades in attempts to implement a collections database.
Nimbus
The suite that preceded Agate. Nimbus was based upon using Azure Table Storage like a relational database. The archived Nimbus Wiki page contains a technical description of how Table Storage was used, and how it basically worked but was eventually abandoned.