Menu

One interface under a whole TV app: the content source as a black box
📰

One interface under a whole TV app: the content source as a black box

DEV Community: kotlin·Yonto Player·5 days ago
#cPDqbbW2
#devtokotlin#devto#dev#default#result
Reading 0:00
15s threshold

On 15 September 2026 the second commit in the Yonto Player repo was called "Add source-agnostic content layer with adapter pattern and unit tests". It came about an hour after the initial commit. Its message says the UI and view models depend only on a repository and the domain models, never on a concrete provider, and that a new integration is added by implementing the same interface. Seven weeks later that sentence is still true, and it is the rule the rest of the app leans on.

The first post in this series sketched the interface in three calls. This one goes underneath: what the models look like, how failure is spelled, what the interface costs, and how it makes the app easy to test.

What the screens are allowed to know

Everything above the interface works in a small set of plain Kotlin data classes: a category, a summary (a card), a detail (a title page), a playback option, a stream. None of them says where it came from. The shape of a card, simplified:

// Simplified sketch, not the real file.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.