pulsar-edit / package-backend

Pulsar Server Backend for Packages
https://api.pulsar-edit.dev
MIT License
12 stars 11 forks source link

Begin Implementing a Builder Pattern #86

Closed confused-Techie closed 1 year ago

confused-Techie commented 1 year ago

Requirements

Description of the Change

This PR starts small and simple with a new goal for the backend.

In short, "Stop writing Objects". Littered throughout the backend there are hardcoded objects written, checked, and modified from the Server Status Objects, to Package Object Shorts, and Package Object Fulls. This leads to confusion on what types MUST look like, and allows considerable freedom in individual functions on how to structure this data.

The goal to reduce this, and find a unified object configuration is by using an Object Builder Pattern. Which this PR begins by creating on for the Server Status Object, and using it within a few smaller modules.

This allows us to abstract away from actual object structures, having a known good configuration, and reduce internal knowledge needed to work on the project.