Comparisons
What sets Benno apart from other Solid libraries, you ask? Well, look no further.
@inrupt/solid-client
Section titled “@inrupt/solid-client”This first comparison is a bit of a bad one, because Benno extends solid-client, and uses it behind the scenes. In fact, I used to work on solid-client, and Benno is what I always hoped to evolve it to.
Whereas solid-client provides the raw primitives, Benno allows you to explicitly model the data you expect to read and write, and validates that the data matches that model. This saves a bunch of code that you’d otherwise have to write manually.
They go well together though, and you can easily start using Benno in an application that already uses solid-client.
Linked Data Objects
Section titled “Linked Data Objects”LDO is an excellent library, and philosophically perhaps most similar to Benno. It allows you to model what your expected data looks like, and provides type-safe access to data that matches that model.
The main difference lies in the fact that it uses a different language (ShEx) to define those models in, and requires you to run a separate command to generate TypeScript code from those models. It’s also focused on the wider RDF ecosystem, rather than just Solid.
Thus, it’s a great fit if you know what RDF is, and possibly even want to use it outside of Solid. On the other hand, if you prefer to stick to TypeScript, and your use case is limited to Solid apps, Benno might be the conceptually simpler choice for you.
Soukai
Section titled “Soukai”Soukai is an Active Record library that supports Solid. And actually, maybe this is the library most philosophically similar to Benno 🤔 It also allows you to define models of your expected data, and provides type-safe access to that data. It can even help you define how to traverse difference resources using Relations, just like Benno’s Trails. The main difference is that the model also holds the data that it fetches, so Soukai is for you if you like the Active Record pattern.
LDflex
Section titled “LDflex”LDflex is similar to Benno in that your code will interact with plain JavaScript objects representing data from a Solid Pod. It is very powerful, especially if you want to read RDF data that’s spread out over the web.
However, its abstraction is relatively leaky: you’ll need to know that, behind the scenes, a certain property represents a particular URL, defined in a JSON-LD context (also, you’ll need to know what those are), and when your data access will need to make requests and thus should be awaited. Benno is more verbose (especially if you already have ready-made JSON-LD contexts lying around), but it’s always explicit about what is going to happen.
Tripledoc
Section titled “Tripledoc”Well, first of all, Tripledoc is no longer maintained 😅 Tripledoc was a library I wrote before I got assigned to work on solid-client, and much of its ideas found their way into solid-client (and therefore Benno).
The main difference is that Tripledoc does not separate the data fetched from a Pod and the code to fetch it, which makes life harder in a number of situations.
But again, it’s not even maintained, just don’t use it.