- Project description
This project includes several widely used libraries and shows how to deal with them in connection.
Project created as multilayer project with domain, presentation and repository layer. Why different layers:
- We can split the logic of the app
- We can do tasks of the same feature in parallel
- We can unbind network and presentation layers
- Code became more testable
- Different layers can be put in separate modules
- Easier to inject objects
Project uses Hilt as dependency injection tool. Why Hilt:
- Recommended by Google
- Extension of well-known Dagger
- Easier in testing
- Can catch errors on build step
Project uses navigation for transitions between the fragments. Why navigation:
- Easier way to manage transitions between fragments
- Easier way to pass parameters between fragments
- More predictable behavior base on visualization
- Navigation controller can be found in any place(for example it's possible to navigate from the ViewModel)
Project uses Coil for image presentation. Why Coil:
- Written on Kotlin and based on coroutines
- Adds to final build less methods
- Takes care about caching of images
- Has reach image-transformation possibilities and another functionality
To provide access to the view inside fragments and activity was used view binding. Why view binding:
- Easy to get access to any view
- Works faster then findViewById()
- Reducing the number of internal variables inside classes
All this allow me to create clean and transparent code where easy to find any logic and write tests for any part of code. Click event flow implemented with custom solution, probably already exist recommended way (needs to be investigated). Couple of places still have to be changed:
- Not implemented possibility to put in DiffUtils parameter to sort items in the list.
- Not finished instrumentation tests to check network use-cases and some UI use-cases.
- Would be nice to scroll to last clicked position after user returns from details fragments.