DEV Community

Cover image for Day 16. Feed
Kiolk
Kiolk

Posted on

Day 16. Feed

Before, I wondered why we need separate models and mappers for each layer (data, domain, presentation). Today, I saw that it is very useful, and the domain model (entity in Clean Architecture terminology) is essential for that. 

What I did:

Today, I worked on adapting the request call for getting feed of articles. I implemented an almost entirely new data model, which looks different from the regular article returned by the official API. But in essence, the data looks the same. Essentially, it shouldn't affect the rest of the application. I only need to add new mappers to domain models. It is the main benefit of the Clean Architecture approach, where changes to outside dependencies don't affect the rest of the logic.

On the other hand, the presentation model is so flexible and screen-specific that it should be separate from the domain. Additionally, it requires calculations, which should preferably be done during the mapping to avoid doing them on the main thread. 
I completed this update, and now reactions with icons and the number of comments are displayed on the article card. I only need to add the reading time to it. 
The current state of development

What I will do:

  • Add Detekt(a static code analysis tool) to the project.
  • Update README file with description of project.
  • Create a GitHub project to manage the tasks for future collaboration.

If you want to join the project, just leave a comment here, or write a message in LinkedIn.

What help I'm looking for:

Designer (create design of application in Figma)
Android/KMM developer
Any other help related to the project.

My timeline:

Day 1. Deep breath and dive
Day 2. Networking layer.
Day 3. Loading of articles.
Day 4. ArticleItem.
Day 5. Localization.
Day 6. Work on Sunday.
Day 7. First week.
Day 8. Enjoying coding.
Day 9. Expect/actual.
Day 10. TODOs.
Day 11. Friday evening.
Day 12. Frustration.
Day 13. Blocker
Day 14. Monday
Day 15. Reactions

You can buy coffee me here :+)

See you tomorrow. 

Top comments (0)