# Finding the right abstraction (when working with Strings)

DevFeed: [Finding the right abstraction (when working with Strings)](<https://devfeed.tech/articles/finding-the-right-abstraction-when-working-with-strings-25436.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/abstraction-text-resource/>)

Author: Hannes Dorfmann

Published: 2021-01-22T09:00:00Z

Content type: tutorial

Language: en

Sources: [Hannes Dorfmann](<https://devfeed.tech/sources/hannes-dorfmann.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [unit test](<https://devfeed.tech/topics/unit-test.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [ui](<https://devfeed.tech/tags/ui.md>), [unit-test](<https://devfeed.tech/tags/unit-test.md>)

## AI overview

A tutorial on introducing an abstraction layer for Android string resources. It explains how to handle simple, formatted, translated, and backend-provided text consistently, while keeping implementation details out of business logic and making ViewModels easier to test.

## Source excerpt

Finding the right abstraction is hard. In this blog post, I would like to share a technique that works well for us (my android teammates and me) when dealing with String resources on android. An abstraction layer for Strings? Why do we even need an abstraction to simply work with Strings on Android?