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

Open Table challenge #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

teresilla3
Copy link

@teresilla3 teresilla3 commented Aug 20, 2024

App architecture:
The app is divided in 3 different layers/packages

  1. Data: Where I placed a the retrofit services, dto's and entities. For this exercise I didn't add a room database, but an "In memory" component (in a Production app we should use database instead).
  2. Domain: Where the business rules of the application reside. I placed here the interactor. In more complex apps I would add a use case, and I will inject the use case in the presenter, instead of interactor itself.
  3. Presentation: I used MVP as requested. Because I was using this approach I decided to use xml / recycle view for the android UI. With a different type of pattern like MVVM I would use compose instead.

Libraries:
I added libraries to be able to use coroutines. II noticed in the project there where some rx java libs included but I didn't use them. I'm familiar with rx as well but I just thought using coroutines was a bit more modern.

Tests
I added a test to the presenter. In a real prod app I would add unit test to interceptors as well, and mapper functions, etc. But I didn't add it in this case, because of time constraints.

Dependency Injection
I used the regular Dagger library, since I was told this is the approach open table uses on the prod app. On a prod app I would have an app component and an activity sub component. In this case I just have the activity component for simplicity since we have only one activity.

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.

1 participant