I'm working on refactoring an older project of mine to follow the Clean Architecture paradigm (and loving it so far) and one of my components is causing me a bit of confusion in relation to whether or not it should exist as a UseCase.
Simple Example For instance, the requirement is there is a contact information screen, that will display previous answers, and give the users the ability to submit updates.
Do I have two use cases (1 user submits contact information, 1 view contact information).
Or is it just 1 UseCase (Edit contact information, with 2 functions to return previous and also submit)?
My Actual Example Bold is the use case i'm not sure about below if you want to skip to that.
The screen itself is a grid of 10 images that you user can select between to have that image featured elsewhere in the application. Nine of These images are resources in the project, one is a spot where a user can upload an image of their own, and the user's selection is stored in Shared Preferences.
Use Cases:
User Selects an Image
This is definitely a use case and the business logic behind it makes sense to me why. The user is taking an action in the view layer and i'll be updating my data layer (repository) with their selection. Perfect.
User Uploads their own image- This is a use case as well. User uploads their image and do some work to store it, as well as select it as their selection. So two pieces of functionality in one use case, which makes sense. It fits the whole requirement. Perfect
Display Options to User ? - This is the one that is throwing me for a loop. So when the user navigates to this screen, I need to start it by displaying the 10 options for the user to select between, as well as highlighting the previously selected image.So is it a separate use case for me to say Display options, or get options? Or instead, since 9 of these images are in resources, is this just part of my view set up? If thats the case, do I create just a Use Case for retrieving user's uploaded Image?
I know i've got a few other instances like this where there is like an initial data set up set.
Most of the time it comes from an API or the database and it is part of a more complete business rule that makes sense as a UseCase. I'm just a little unsure for cases like this, where maybe i'm reading from a file or loading from some existing resources.
Thanks for the advice!