WindowsAppCommunity / WinAppCommunity.Sdk

Manage your membership in the Windows App Community.
MIT License
1 stars 1 forks source link

API Review and Refactor Nov 30, 2024 #2

Open Arlodotexe opened 4 days ago

Arlodotexe commented 4 days ago

Background

With the recent batch of updates to the various OwlCore libraries I've been incubating to support our new community infrastructure, we're ready to move forward with our implementation.

Just to recap from this thread on Discord:

Here be owls! Updates have arrived, full release notes linked

This concludes ~2 months of research and planning largely centered around container ownership and operations. With the changes fully validated on a working implementation, now we know exactly what to do and how to do it in the new community infra.

Problem

Our API is outdated and full of leaks and holes. Using insights learned from the various libraries we've built we can identify several potential pitfalls and shortcomings in our current setup.

Before we can move forward with the implementation, we must review and refactor our API surface for both Models (serialized objects) and AppModels (interfaces).  

Solution

We've performed a full analysis of the API and have identified additions/removals/changes that need to happen to both models and AppModels simultaneously.

We've split this analysis into two sections: Lists and properties. Each section lists what's extra and what's missing for each of the three types.


Lists:

Current setup

Publisher

Project

User


Changes to make:

[What's extra]:

Publisher doesn't need:

Project doesn't need:

User doesn't need:

[What's missing]:

Publisher is missing:

Project is missing:

User is missing:


Properties:

Current setup

Publisher

Project

User


Changes to make:

[What's extra]:

Publisher doesn't need:

Project doesn't need:

User doesn't need:

[What's missing]:

Publisher is missing:

Project is missing:

User is missing:


These changes need to be applied to:

  1. Both models and AppModels
  2. For both properties and lists
  3. For all three types (User, Publisher, Project)

Ignore any build errors for now, we have no implementations but changing things might affect our event entry records. The work within each task can be split up at each order, descending. We'll PR any concurrent work into the PR for order n+1. e.g., Two PRs A and B merge 1) into main, four PRs A1-A2 and B1-B2 merge into A and B (respectively), and so on as needed.

Once all the above is completed, we can adjust our event stream entry records and serializer and begin the implementation of the AppModels using the models we've just refined.

I'll create sub-issues to elaborate on the exact requirements for these tasks a bit more.

### Tasks
- [ ] https://github.com/WindowsAppCommunity/WinAppCommunity.Sdk/issues/3
- [ ] https://github.com/WindowsAppCommunity/WinAppCommunity.Sdk/issues/4
- [ ] https://github.com/WindowsAppCommunity/WinAppCommunity.Sdk/issues/7