Размышления о том, что нужны разные классы для API, DB и UI данных.
#architecture #data #model
https://blog.danlew.net/2022/08/15/domain-specific-models/
#architecture #data #model
https://blog.danlew.net/2022/08/15/domain-specific-models/
Dan Lew Codes
Domain-Specific Models
For a long time at Trello Android, we used the same class for parsing API calls (via Gson), making DB transactions (via OrmLite), and displaying data in the UI.
Here’s a pseudo-code-y example of a board:
@DatabaseTable(tableName = "boards")
data class Board(…
Here’s a pseudo-code-y example of a board:
@DatabaseTable(tableName = "boards")
data class Board(…