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

govukapp-1108 data storage modularization #266

Conversation

joshdubey
Copy link
Contributor

@joshdubey joshdubey commented Feb 17, 2025

Currently branched off the govukapp-1105 modulariation.

This PR demonstrates two ways that a contributor to the app might make use of local persistence: Either by creating their own core data store, or accessing a shared repository.

To facilitate this the CoreDataRepository and associated files were moved to GOVKit. This makes it easier for consumer to spin up their own store using the CoreDataRepository class.
Additionally, a dependency to Factory was added to GOVKit, along with the Container extensions for creating repositories. This was more of a convenience and would not necessarily have to be part of the final implementation.

A TestWidgetRepository was added that creates it's own persistent store, leveraging CoreDataRepository to make it easier. The TestViewController now demonstrates saving a simple object to that store
TestViewController also now makes use of Factory to get access to the ActivityRepository to access shared data.

@joshdubey joshdubey requested a review from a team as a code owner February 17, 2025 15:03
@joshdubey joshdubey force-pushed the feature/govukapp-1108-data-storage-modularization branch from c5b115d to af56034 Compare February 19, 2025 13:32
@joshdubey joshdubey force-pushed the feature/govukapp-1108-data-storage-modularization branch from 199bc70 to 7d41d3d Compare March 3, 2025 17:49
@batesyuk batesyuk closed this Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants