What is ActivityPubSharp? #63
warriordog
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Great question!
Are you familiar with the Fediverse and ActivityPub? If not, then check out those links first. The rest of this post will assume you have a baseline knowledge of the Fediverse ("fedi" from here on) or at least an understanding of federated social media in general.
ActivityPubSharp is an ambitious project to create a modular, safe, and easy library for interacting with other fedi software over ActivityPub. I describe this as "ambitious" because ActivityPub (AP) and its underlying standards - ActivityStreams (AS) and JSON-LD - are all designed for use in dynamically-typed languages that support union types. C# has neither of those features, which makes AP remarkably difficult to model and implement in C#.
Despite the challenge, this project aims to develop a standards-compliant implementation that exposes an ergonomic and conventional API for use in .NET project. A key goal is to simultaneously support high-level and low-level uses cases with equally first-class APIs, and to include optional bindings for common frameworks like ASP.NET and Entity Framework. The end result will be a collection of small, focused packages that can implicitly compose to construct the ideal API for any project.
todo architecture diagram here
New and existing projects can integrate ActivityPubSharp through Dependency Injection, with pre-configured safe defaults and plenty of available customization. Wherever possible, internal components have been developed with public interfaces that can be replaced by library users to customize even deeply buried logic. Most default implementations accept configuration objects compatible with the Options Pattern.
A simple use case might look like this, utilizing C# top-level statements and the mid-level API:
We're not quite to that point yet, but progress is steady! Soon, ActivityPubSharp will be a viable base for microblogging platforms, federated blogs, bots, custom clients, and any other kind of fediverse application!
Beta Was this translation helpful? Give feedback.
All reactions