Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tech Debt: Code sharing between App and Infra #4955

Open
thiessenp-cds opened this issue Jan 10, 2025 · 0 comments
Open

Tech Debt: Code sharing between App and Infra #4955

thiessenp-cds opened this issue Jan 10, 2025 · 0 comments
Labels
App Core tech debt Includes: refactoring, documentation, organization, and dependency management. Does not include bugs

Comments

@thiessenp-cds
Copy link
Contributor

thiessenp-cds commented Jan 10, 2025

Work In Progress Ticket - please edit/add to it

There is similar code/logic between the submission translation for the vault (see buildFormDataObject.ts and related) and group history for the Review page (see formContext and group history related code). Also in the infra code for the lambda to send to dynamodb there is similar translation code (see dataLayer.ts and others probably).

The issue with this is it will be increasingly easy to make a mistake where a change made in one part of the code should also be made in another part of the code. An example of this is copy+pasting code between app code to infra code. It would be easy to make a change in either part of the code and forget to copy+paste to the other part of the code.

One idea to help to solve this would be create a new repository to hold shared code used by both the app and infra (core) e.g. forms-lib. This would become a shared library for forms. An advantage of this beyond reducing work by writing less code from code sharing is that more eyes would be on it and with that higher code quality for an important part of the code base.

@thiessenp-cds thiessenp-cds added tech debt Includes: refactoring, documentation, organization, and dependency management. Does not include bugs Core App labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Core tech debt Includes: refactoring, documentation, organization, and dependency management. Does not include bugs
Projects
None yet
Development

No branches or pull requests

1 participant