4PointSolutions / 4PointSolutions/FormsFeeder

Create supporting framework for parsing plugin input parameters

Offen
#13 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
4
Forks
3
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Currently, the parsing of inputs to a plugin is always ad-hoc code. This leads to a lot of code duplication and is an impediment to easily creating plugins. It would be nice if there was a declarative approach that could be used instead.

I am thinking of a Builder pattern where one builds a list of input parameters that one expects. Each parameter would have a name, whether it repeats, whether it is optional and a class type. The result would be used by the framework code to decode the input parameters into a result object (the decoded InputParameters object).

Ideally the result object would ideally allow the user to access individual outputs in a strongly typed fashion, however in the worst case scenario, perhaps it could be a Map keyed in each input parameters name.

Another idea would be for the caller to pass in a Java record class that the parsing routine would examine using reflection and use it to get the Input parameters and populate the Record. Each field's name would be used to retrieve parameters. If the field was an Optional<> this would indicate that the parameter was optional. If the field was a Collection of some sort, that would indicate that the parameter could repeat.

A precursor to this is probably implementing issue #12 .

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

First, examine existing plugin implementations to understand the current ad-hoc parsing. Review issue #12 as a precursor. The goal is to design a builder pattern or reflection-based system for declarative input parameter parsing. Start by exploring the plugin interface and how inputs are currently passed. A successful implementation will reduce code duplication and be used by plugin authors.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
backend-api-design
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.