# Hannes Dorfmann

Recent content on Hannes Dorfmann

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Instantiate test data with Instantiator

DevFeed: [Instantiate test data with Instantiator](<https://devfeed.tech/articles/instantiate-test-data-with-instantiator-25469.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/instantiator/>)

Author: Hannes Dorfmann

Published: 2022-08-05T09:00:00Z

Content type: tutorial

Language: en

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

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [unit test](<https://devfeed.tech/topics/unit-test.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>), [data](<https://devfeed.tech/topics/data.md>), [Library](<https://devfeed.tech/topics/library.md>), [Tool](<https://devfeed.tech/topics/tool.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [data](<https://devfeed.tech/tags/data.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [library](<https://devfeed.tech/tags/library.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tool](<https://devfeed.tech/tags/tool.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

### AI overview

The article introduces Instantiator, a Kotlin library that uses reflection to fill objects with random test data. It is presented as a way to reduce the effort of creating test data for unit tests involving transformed backend data, pagination, and nested data classes.

### Source excerpt

I have noticed that most of the unit tests I write are testing how my code transforms data or business logic. My class or business logic just needs data as input (thus I need some test data to write unit tests). For example, most of my android apps load a list of items from the backend and then the android app is transforming that data into some state object or front-end specific domain objects.

## Perfectionism vs. Excellence

DevFeed: [Perfectionism vs. Excellence](<https://devfeed.tech/articles/perfectionism-vs-excellence-25470.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/perfectionism-vs-excellence/>)

Author: Hannes Dorfmann

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

Content type: article

Language: en

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

Topics: [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [engineering-culture](<https://devfeed.tech/topics/engineering-culture.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [blog-post](<https://devfeed.tech/tags/blog-post.md>), [code-reviews](<https://devfeed.tech/tags/code-reviews.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>)

### AI overview

The article distinguishes perfectionism from striving for excellence and examines the difference through the practical example of software engineering code reviews. It describes perfectionism as pursuit of subjective, unattainable ideals driven by approval and perception, and notes reported associations with poorer achievement and psychological difficulties.

### Source excerpt

Perfectionism is not the same thing as striving for excellence. How does one differentiate from the other and why does it matter? How does it related to software engineering? These are the questions that I want to answer by looking at a very concrete example from the world of software engineering: Code Reviews.

## 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?

## Flowing in the Deep - Event Streams in Kotlin

DevFeed: [Flowing in the Deep - Event Streams in Kotlin](<https://devfeed.tech/articles/flowing-in-the-deep-event-streams-in-kotlin-25478.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/presentations/2019-07-02-flowing-in-the-deep/>)

Author: Hannes Dorfmann

Published: 2019-07-02T00:00:00Z

Content type: tutorial

Language: en

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

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [RxJava](<https://devfeed.tech/topics/rxjava.md>), [Streams](<https://devfeed.tech/topics/streams.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [backpressure](<https://devfeed.tech/tags/backpressure.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [deep-dive](<https://devfeed.tech/tags/deep-dive.md>), [event](<https://devfeed.tech/tags/event.md>), [flow](<https://devfeed.tech/tags/flow.md>), [flowable](<https://devfeed.tech/tags/flowable.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [presentation](<https://devfeed.tech/tags/presentation.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>), [scopes](<https://devfeed.tech/tags/scopes.md>), [streams](<https://devfeed.tech/tags/streams.md>), [video](<https://devfeed.tech/tags/video.md>)

### AI overview

This presentation introduces Kotlin Flow, compares it with RxJava Observable and Flowable, and explains its relationship to coroutines. It also covers implementation details, custom operators, coroutine channels, backpressure, and coroutine scopes for use in Android apps.

### Source excerpt

The Kotlin team introduced a new type called Flow which looks similar to RxJava's Observable or Flowable. Have you ever wondered what's the difference between Flow and RxJava? How does Flow work under the hood? How is it connected to Coroutines? How do you write your own operator? What about Kotlin Coroutine Channels?

## Testing By Design

DevFeed: [Testing By Design](<https://devfeed.tech/articles/testing-by-design-25477.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/presentations/2019-05-22-testing-by-design/>)

Author: Hannes Dorfmann

Published: 2019-05-22T00:00:00Z

Content type: article

Language: en

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

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Android](<https://devfeed.tech/topics/android.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [mvvm](<https://devfeed.tech/tags/mvvm.md>), [presentation](<https://devfeed.tech/tags/presentation.md>), [testing](<https://devfeed.tech/tags/testing.md>), [video](<https://devfeed.tech/tags/video.md>)

### AI overview

A presentation about designing Android app architectures for efficient and maintainable testing. It discusses how MVP and MVVM improve testability and presents testing-first architecture, including MVI, as a way to write and maintain resilient tests with less code.

### Source excerpt

Together with my friend Kostiantyn Tarasenko we talked about testing android apps. Building an efficient and maintainable test suite for an app is challenging. Design patterns like MVP or MVVM help decouple responsibilities so that it becomes easier to write testable code. What is the next level though? How can we get more out of our tests?

## Advanced Model-View-Intent: The Missing Guide

DevFeed: [Advanced Model-View-Intent: The Missing Guide](<https://devfeed.tech/articles/advanced-model-view-intent-the-missing-guide-25475.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/presentations/2018-06-26-advanced-mvi-guide/>)

Author: Hannes Dorfmann

Published: 2018-06-26T00:00:00Z

Content type: article

Language: en

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

Topics: [RxJava](<https://devfeed.tech/topics/rxjava.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [guide](<https://devfeed.tech/tags/guide.md>), [library](<https://devfeed.tech/tags/library.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>)

### AI overview

A presentation about Model-View-Intent (MVI) shares practical tips and introduces RxRedux, a library for building state machines with RxJava.

### Source excerpt

Together with my friend Kostiantyn Tarasenko we talked about Model-View-Intent (MVI) and were sharing some tips that worked well for us. We also introduced a library to help us build state machines with RxJava called RxRedux

## Reactive Apps with Model-View-Intent - Part 8: Navigation

DevFeed: [Reactive Apps with Model-View-Intent - Part 8: Navigation](<https://devfeed.tech/articles/reactive-apps-with-model-view-intent-part-8-navigation-25461.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/mosby3-mvi-8/>)

Author: Hannes Dorfmann

Published: 2018-05-06T09:00:00Z

Content type: tutorial

Language: en

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

Topics: [navigation](<https://devfeed.tech/topics/navigation.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [RxJava](<https://devfeed.tech/topics/rxjava.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [callback](<https://devfeed.tech/tags/callback.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>)

### AI overview

This tutorial explains how to apply the Coordinator pattern to navigation in an Android Model-View-Intent architecture. It describes passing a navigation callback into MviBasePresenter and reusing the state-rendering observable with an RxJava operator to trigger navigation when a particular state is reached.

### Source excerpt

In my previous blog post we discussed how the Coordinator pattern can be applied on Android. This time I would like to show how this can be used in Model-View-Intent. If you don't know yet what the Coordinator pattern is I highly recommend to go back and read the introdcution.

## In-App Navigation with Coordinators

DevFeed: [In-App Navigation with Coordinators](<https://devfeed.tech/articles/in-app-navigation-with-coordinators-25441.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/coordinators-android/>)

Author: Hannes Dorfmann

Published: 2018-05-05T09: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>), [navigation](<https://devfeed.tech/topics/navigation.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [mvvm](<https://devfeed.tech/tags/mvvm.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [patterns](<https://devfeed.tech/tags/patterns.md>)

### AI overview

This article examines the Coordinator pattern for organizing in-app navigation in Android applications. It discusses how navigation logic can become tightly coupled to activities or fragments and considers how coordinators can separate navigation flow logic from those UI components.

### Source excerpt

Over the last years we have established best practices for writing android apps: clean architecture, architectural patterns like MVP, MVVM, MVI, Repository pattern and so on. But what about in-app navigation? In this blog post I would like to talk about the Coordinator pattern and how we could apply this pattern in android development to organize our in-app navigation code.

## Reactive State Management with Model-View-Intent

DevFeed: [Reactive State Management with Model-View-Intent](<https://devfeed.tech/articles/reactive-state-management-with-model-view-intent-25476.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/presentations/2018-10-22-reactive-statemanagement-mvi/>)

Author: Hannes Dorfmann

Published: 2017-10-05T00:00:00Z

Content type: tutorial

Language: en

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

Topics: [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Android](<https://devfeed.tech/topics/android.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [RxJava](<https://devfeed.tech/topics/rxjava.md>), [Redux](<https://devfeed.tech/topics/redux.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [flow](<https://devfeed.tech/tags/flow.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>), [state-management](<https://devfeed.tech/tags/state-management.md>)

### AI overview

A presentation explains Model-View-Intent (MVI) as an architectural pattern for managing application state on Android. It covers synchronous and asynchronous data, component lifecycles, navigation, process death, comparisons with Flux and Redux, and unidirectional data flow with RxJava.

### Source excerpt

Managing application state is not a simple topic especially on Android with a synchronous and asynchronous source of data, components having different lifecycles, back stack navigation and process death. Model-View-Intent (MVI) is an architectural design pattern to separate the View from the Model. In this talk, we will discuss the idea behind MVI and how this pattern compares to other architectural patterns like Flux, Redux, Model-View-Presenter or Model-View-ViewModel.

## Reactive Apps with Model-View-Intent - Part 7: Timing (SingleLiveEvent problem)

DevFeed: [Reactive Apps with Model-View-Intent - Part 7: Timing (SingleLiveEvent problem)](<https://devfeed.tech/articles/reactive-apps-with-model-view-intent-part-7-timing-singleliveevent-problem-25460.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/mosby3-mvi-7/>)

Author: Hannes Dorfmann

Published: 2017-09-13T09:00:00Z

Content type: tutorial

Language: en

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

Topics: [reactive](<https://devfeed.tech/topics/reactive.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [display](<https://devfeed.tech/tags/display.md>), [livedata](<https://devfeed.tech/tags/livedata.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [screen](<https://devfeed.tech/tags/screen.md>), [state](<https://devfeed.tech/tags/state.md>), [state-management](<https://devfeed.tech/tags/state-management.md>), [viewmodel](<https://devfeed.tech/tags/viewmodel.md>)

### AI overview

This article explains how Model-View-Intent and proper state management can address the recurring Snackbar problem associated with SingleLiveEvent when Android views are recreated or revisited. It presents immutable view state and unidirectional data flow as the proposed approach.

### Source excerpt

In my previous blog post we discussed the importance of proper state management and why I think introducing a SingleLiveEvent as discussed in Google's Architecture Components GitHub repo is not a good idea because it just hides the real underlying problem: state management. In this blog post I would like to discuss how the problem SingleLiveEvent claims to solve can be solved with Model-View-Intent and proper state management.

## ViewModel and LiveData: State-Management Pitfalls in Google's Architecture Components Samples

DevFeed: [ViewModel and LiveData: State-Management Pitfalls in Google's Architecture Components Samples](<https://devfeed.tech/articles/architecture-components-i-m-not-a-purist-but-25440.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/arch-components-purist/>)

Author: Hannes Dorfmann

Published: 2017-06-25T09:00:00Z

Content type: opinion

Language: en

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

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [Google](<https://devfeed.tech/topics/google.md>), [RxJava](<https://devfeed.tech/topics/rxjava.md>), [GitHub](<https://devfeed.tech/topics/github.md>), [REST API](<https://devfeed.tech/topics/rest-api.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [google](<https://devfeed.tech/tags/google.md>), [livedata](<https://devfeed.tech/tags/livedata.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [mvvm](<https://devfeed.tech/tags/mvvm.md>), [pitfalls](<https://devfeed.tech/tags/pitfalls.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [reactive-programming](<https://devfeed.tech/tags/reactive-programming.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>), [state-management](<https://devfeed.tech/tags/state-management.md>), [viewmodel](<https://devfeed.tech/tags/viewmodel.md>)

### AI overview

An opinionated review of ViewModel and LiveData in Google's Architecture Components samples, focusing on state management, pagination, lifecycle awareness, and differences from RxJava.

### Source excerpt

At I/O 2017 Google surprised us with a new initiative: Architecture Components. I really appreciate this initiative. In this blog post I would like to share my thoughts about ViewModel and some pitfalls you might stumble upon when using ViewModel and LiveData by taking a look at the official Google samples.

## Reactive Apps with Model-View-Intent - Part 6: Restoring State

DevFeed: [Reactive Apps with Model-View-Intent - Part 6: Restoring State](<https://devfeed.tech/articles/reactive-apps-with-model-view-intent-part-6-restoring-state-25459.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/mosby3-mvi-6/>)

Author: Hannes Dorfmann

Published: 2017-05-02T09:00:00Z

Content type: tutorial

Language: en

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

Topics: [reactive](<https://devfeed.tech/topics/reactive.md>), [RxJava](<https://devfeed.tech/topics/rxjava.md>), [Android](<https://devfeed.tech/topics/android.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [navigation](<https://devfeed.tech/topics/navigation.md>), [push-notification](<https://devfeed.tech/topics/push-notification.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [process](<https://devfeed.tech/tags/process.md>), [push-notification](<https://devfeed.tech/tags/push-notification.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>)

### AI overview

This article explains how Model-View-Intent and unidirectional data flow can support state restoration in Android applications. It covers restoring in-memory state across view lifecycle events such as orientation changes and back-stack navigation, as well as persistent state across process death. The examples discuss Mosby, RxJava streams, presenters, and push-notification updates.

### Source excerpt

In the previous blog posts we have discussed Model-View-Intent (MVI) and the importance of unidirectional data flow. That simplifies state restoration a lot. How and why? We will discuss that in this blog post. There are two scenarios we will focus on in this blog post: Restoring state "in memory" (for example during screen orientation change) and restoring a "persistent state" (for example from Bundle previously saved in Activity.

## Reactive Apps with Model-View-Intent - Part 5: Debugging with ease

DevFeed: [Reactive Apps with Model-View-Intent - Part 5: Debugging with ease](<https://devfeed.tech/articles/reactive-apps-with-model-view-intent-part-5-debugging-with-ease-25458.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/mosby3-mvi-5/>)

Author: Hannes Dorfmann

Published: 2017-03-17T09:00:00Z

Content type: tutorial

Language: en

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

Topics: [debugging](<https://devfeed.tech/topics/debugging.md>), [Logging](<https://devfeed.tech/topics/logging.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [Crashlytics](<https://devfeed.tech/topics/crashlytics.md>), [RxJava](<https://devfeed.tech/topics/rxjava.md>), [JSON](<https://devfeed.tech/topics/json.md>)

Tags: [crashlytics](<https://devfeed.tech/tags/crashlytics.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [json](<https://devfeed.tech/tags/json.md>), [logging](<https://devfeed.tech/tags/logging.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>)

### AI overview

This tutorial explains how the Model-View-Intent pattern and unidirectional data flow can simplify debugging unreproducible crashes. It shows how to log user intents and rendered view state, serialize the state as JSON, and include these logs in crash reports using Crashlytics or another crash-reporting tool.

### Source excerpt

In the previous blog posts we have discussed the Model-View-Intent (MVI) pattern and it's characteristics. In part 1 we have talked about the importance of an unidirectional data flow and application state that is driven by the "business logic". In this blog post we will see how this pays off when it comes to debugging to simplify the life of developers.

## Reactive Apps with Model-View-Intent - Part 4: Independent UI Components

DevFeed: [Reactive Apps with Model-View-Intent - Part 4: Independent UI Components](<https://devfeed.tech/articles/reactive-apps-with-model-view-intent-part-4-independent-ui-components-25457.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/mosby3-mvi-4/>)

Author: Hannes Dorfmann

Published: 2017-02-25T09:00:00Z

Content type: tutorial

Language: en

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

Topics: [reactive](<https://devfeed.tech/topics/reactive.md>), [ui](<https://devfeed.tech/topics/ui.md>), [App](<https://devfeed.tech/topics/app.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [design-patterns](<https://devfeed.tech/tags/design-patterns.md>), [flow](<https://devfeed.tech/tags/flow.md>), [recyclerview](<https://devfeed.tech/tags/recyclerview.md>), [shopping](<https://devfeed.tech/tags/shopping.md>), [toolbar](<https://devfeed.tech/tags/toolbar.md>), [ui-components](<https://devfeed.tech/tags/ui-components.md>), [viewmodel](<https://devfeed.tech/tags/viewmodel.md>)

### AI overview

This blog post discusses building independent, reusable UI components in reactive application architectures such as Model-View-Intent, Model-View-Presenter, and Model-View-ViewModel. It argues that presenters should communicate indirectly by observing shared business logic and describes this approach using a shopping-basket example.

### Source excerpt

In this blog post we will discuss how to build independent UI components and clarify why Parent-Child relations are a code smell in my opinion. Furthermore, we will discuss why I think such relations are needless. One question that arises from time to time with architectural design patterns such as Model-View-Intent, Model-View-Presenter or Model-View-ViewModel is how do Presenters (or ViewModels) communicate with each other?

## Reactive Apps with Model-View-Intent - Part 3: State Reducer

DevFeed: [Reactive Apps with Model-View-Intent - Part 3: State Reducer](<https://devfeed.tech/articles/reactive-apps-with-model-view-intent-part-3-state-reducer-25456.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/mosby3-mvi-3/>)

Author: Hannes Dorfmann

Published: 2017-01-19T09:00:00Z

Content type: tutorial

Language: en

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

Topics: [reactive](<https://devfeed.tech/topics/reactive.md>), [App](<https://devfeed.tech/topics/app.md>), [Code](<https://devfeed.tech/topics/code.md>), [ui](<https://devfeed.tech/topics/ui.md>), [implementation](<https://devfeed.tech/topics/implementation.md>)

Tags: [3](<https://devfeed.tech/tags/3.md>), [apps](<https://devfeed.tech/tags/apps.md>), [blog](<https://devfeed.tech/tags/blog.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [build](<https://devfeed.tech/tags/build.md>), [code](<https://devfeed.tech/tags/code.md>), [component](<https://devfeed.tech/tags/component.md>), [data](<https://devfeed.tech/tags/data.md>), [flow](<https://devfeed.tech/tags/flow.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [implement](<https://devfeed.tech/tags/implement.md>), [interface](<https://devfeed.tech/tags/interface.md>), [load](<https://devfeed.tech/tags/load.md>), [merge](<https://devfeed.tech/tags/merge.md>), [model](<https://devfeed.tech/tags/model.md>), [model-view-intent](<https://devfeed.tech/tags/model-view-intent.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [screen](<https://devfeed.tech/tags/screen.md>), [state](<https://devfeed.tech/tags/state.md>)

### AI overview

Part 3 of a tutorial on Reactive Apps with Model-View-Intent explains how to build a more complex MVI screen using a state reducer and unidirectional data flow. The example includes categorized product lists, loading more items, pull-to-refresh, pagination, concurrent actions, failures, and presenter logic.

### Source excerpt

In the previous part we have discussed how to implement a simple screen with the Model-View-Intent pattern with an unidirectional data flow. In this blog post we are going to build a more complex screen with MVI with the help of a state reducer. If you haven't read part 2 yet, you should read that before continue with this blog post, because there is described how we connect the View via Presenter with the business logic and how data flows unidirectional.

## Reactive Apps with Model-View-Intent - Part 2: View and Intent

DevFeed: [Reactive Apps with Model-View-Intent - Part 2: View and Intent](<https://devfeed.tech/articles/reactive-apps-with-model-view-intent-part-2-view-and-intent-25455.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/mosby3-mvi-2/>)

Author: Hannes Dorfmann

Published: 2017-01-17T09:00:00Z

Content type: article

Language: en

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

Topics: [reactive](<https://devfeed.tech/topics/reactive.md>), [Development](<https://devfeed.tech/topics/development.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [immutability](<https://devfeed.tech/tags/immutability.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

This second-part article introduces the Model-View-Intent pattern for building reactive Android applications. It explains how user intents produce model changes, how business logic returns a new immutable model, and how the view renders that model.

### Source excerpt

In the first part we have discussed what a Model actually is, the relation to State and how a well defined Model can solve some common issues in android development. In this blog post we continue our journey towards "Reactive Apps" by introducing the Model-View-Intent pattern to build Reactive Apps.

## Reactive Apps with Model-View-Intent - Part 1: Model

DevFeed: [Reactive Apps with Model-View-Intent - Part 1: Model](<https://devfeed.tech/articles/reactive-apps-with-model-view-intent-part-1-model-25454.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/mosby3-mvi-1/>)

Author: Hannes Dorfmann

Published: 2017-01-09T09:00:00Z

Content type: tutorial

Language: en

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

Topics: [RxJava](<https://devfeed.tech/topics/rxjava.md>), [android-development](<https://devfeed.tech/topics/android-development.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [mvc](<https://devfeed.tech/topics/mvc.md>)

Tags: [android-development](<https://devfeed.tech/tags/android-development.md>), [immutability](<https://devfeed.tech/tags/immutability.md>), [mvc](<https://devfeed.tech/tags/mvc.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [mvvm](<https://devfeed.tech/tags/mvvm.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [process](<https://devfeed.tech/tags/process.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>)

### AI overview

This first part of a blog series explains why a well-defined Model matters in Android applications using Reactive Apps, RxJava, and Model-View-Intent (MVI). It contrasts this approach with MVC, MVP, and MVVM, and connects a Model to issues such as state, configuration changes, navigation, process death, and immutability.

### Source excerpt

Once I have figured out that I have modeled my Model classes wrong all the time, a lot of issues and headache I previously had with some Android platform related topics are gone. Moreover, finally I was able to build Reactive Apps using RxJava and Model-View-Intent (MVI) as I never was able before although the apps I have built so far are reactive too but not on the same level of reactiveness as I'm going to describe in this blog post series.

## Why a library developer should use abstract class instead of interface

DevFeed: [Why a library developer should use abstract class instead of interface](<https://devfeed.tech/articles/why-a-library-developer-should-use-abstract-class-instead-of-interface-25450.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/library-abstract-class/>)

Author: Hannes Dorfmann

Published: 2016-10-13T09:00:00Z

Content type: opinion

Language: en

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

Topics: [Library](<https://devfeed.tech/topics/library.md>), [Development](<https://devfeed.tech/topics/development.md>), [Java](<https://devfeed.tech/topics/java.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [abstract-class](<https://devfeed.tech/tags/abstract-class.md>), [android](<https://devfeed.tech/tags/android.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interface](<https://devfeed.tech/tags/interface.md>), [java](<https://devfeed.tech/tags/java.md>), [library](<https://devfeed.tech/tags/library.md>)

### AI overview

The article explains why the author switched AdapterDelegates 3.0 from an interface to an abstract base class in an Android library. It compares interfaces and abstract classes, focusing on flexibility, shared behavior, state, and inheritance risks.

### Source excerpt

Use interfaces for java development they said. It will be more flexible they said. Well, that all might be true but for library projects that doesn't necessarily has to be true as well. In this post I will explain you why I have switched from interface to an abstract class as base class in one of my library projects called AdapterDelegates 3.

## The Repository Pattern: History, Abstraction, and Android Use Cases

DevFeed: [The Repository Pattern: History, Abstraction, and Android Use Cases](<https://devfeed.tech/articles/the-evolution-of-the-repository-pattern-be-aware-of-over-abstraction-25444.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/evolution-of-the-repository-pattern/>)

Author: Hannes Dorfmann

Published: 2016-07-17T09:00:00Z

Content type: article

Language: en

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

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [android-development](<https://devfeed.tech/topics/android-development.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [abstraction](<https://devfeed.tech/tags/abstraction.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [blog](<https://devfeed.tech/tags/blog.md>), [clean-architecture](<https://devfeed.tech/tags/clean-architecture.md>), [opinion](<https://devfeed.tech/tags/opinion.md>)

### AI overview

This article traces how the Repository Pattern is defined in different contexts and programming languages. It argues that the original definition can introduce unnecessary abstraction and overengineering, especially in Android, while discussing a more practical interpretation for common use cases.

### Source excerpt

A listener from our podcast, The Context, that Artem Zinnatullin and I run asked me, if I can give him an example of the Repository Pattern. So I googled around and stumbled upon some blog posts and found out that the term Repository Pattern is used and described in many different ways.

## Refactoring Plaid App - A reactive MVP approach

DevFeed: [Refactoring Plaid App - A reactive MVP approach](<https://devfeed.tech/articles/refactoring-plaid-app-a-reactive-mvp-approach-25473.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/presentations/2016-06-16-refactoring-plaid/>)

Author: Hannes Dorfmann

Published: 2016-06-16T00:00:00Z

Content type: article

Language: en

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

Topics: [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [software-architecture](<https://devfeed.tech/topics/software-architecture.md>), [Android](<https://devfeed.tech/topics/android.md>), [Material Design](<https://devfeed.tech/topics/material-design.md>), [RxJava](<https://devfeed.tech/topics/rxjava.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Code quality](<https://devfeed.tech/topics/code-quality.md>), [Google](<https://devfeed.tech/topics/google.md>), [App](<https://devfeed.tech/topics/app.md>), [Code](<https://devfeed.tech/topics/code.md>), [reactive](<https://devfeed.tech/topics/reactive.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [code](<https://devfeed.tech/tags/code.md>), [code-quality](<https://devfeed.tech/tags/code-quality.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [google](<https://devfeed.tech/tags/google.md>), [material-design](<https://devfeed.tech/tags/material-design.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>), [software](<https://devfeed.tech/tags/software.md>), [software-architecture](<https://devfeed.tech/tags/software-architecture.md>), [tdd](<https://devfeed.tech/tags/tdd.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

A presentation about refactoring the open-source Android app Plaid from a traditional architecture toward a modular, decoupled Model-View-Presenter architecture. It covers RxJava, dependency injection, testing with Test-Driven Development, code quality, and the meaning of "reactive" in this context.

### Source excerpt

Nick Butcher, developer advocate at Google, has open sourced an android app called Plaid with an outstanding UI, meaningful animations and a lot of others material design goodies. However, from the software architecture's point of view, the architecture of this app more "traditional" so that both, beginners and expert developers, can understand the source code easily.

## Android Software Architecutre by Example

DevFeed: [Android Software Architecutre by Example](<https://devfeed.tech/articles/android-software-architecutre-by-example-25472.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/presentations/2016-06-02-android-architecture-by-example/>)

Author: Hannes Dorfmann

Published: 2016-06-02T00:00:00Z

Content type: comparison

Language: en

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

Topics: [Android](<https://devfeed.tech/topics/android.md>), [flux](<https://devfeed.tech/topics/flux.md>), [mvc](<https://devfeed.tech/topics/mvc.md>), [Redux](<https://devfeed.tech/topics/redux.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [flux](<https://devfeed.tech/tags/flux.md>), [mvc](<https://devfeed.tech/tags/mvc.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [redux](<https://devfeed.tech/tags/redux.md>), [video](<https://devfeed.tech/tags/video.md>)

### AI overview

A video presentation comparing MVC, MVP, MVVM, Redux, Flux, and MVI architectural patterns and their application to existing open-source Android applications.

### Source excerpt

Comparing some architectural design patterns like MVC, MVP, MVVM, Redux, Flux, MVI and how they could be applied on existing open source applications.

## Building Reusable Components for Similar Android and iOS Apps

DevFeed: [Building Reusable Components for Similar Android and iOS Apps](<https://devfeed.tech/articles/from-prefab-house-to-lego-house-25447.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/from-prefabricated-house-to-lego-house/>)

Author: Hannes Dorfmann

Published: 2016-05-13T09:00:00Z

Content type: article

Language: en

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

Topics: [App](<https://devfeed.tech/topics/app.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [navigation](<https://devfeed.tech/topics/navigation.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [building](<https://devfeed.tech/tags/building.md>), [components](<https://devfeed.tech/tags/components.md>), [design](<https://devfeed.tech/tags/design.md>), [ios](<https://devfeed.tech/tags/ios.md>)

### AI overview

This blog post shares lessons learned from building reusable components for similar Android and iOS football apps with overlapping UI and functionality.

### Source excerpt

Before joining my current employer I have worked for an app agency and one thing I have noticed is that we were building every app entirely new from scratch even if we were building a similar app for the same customer with similar UI. We hadn't reusable components. In this blog post I want to share some thoughts and lessons learned while building such reusable components.

## Mixins as an alternative to inheritance in Java 8

DevFeed: [Mixins as an alternative to inheritance in Java 8](<https://devfeed.tech/articles/mixins-as-an-alternative-to-inheritance-in-java-8-25448.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/java-mixins/>)

Author: Hannes Dorfmann

Published: 2016-04-26T09:00:00Z

Content type: tutorial

Language: en

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

Topics: [Java](<https://devfeed.tech/topics/java.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>), [Scala](<https://devfeed.tech/topics/scala.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>)

Tags: [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [java](<https://devfeed.tech/tags/java.md>), [java-8](<https://devfeed.tech/tags/java-8.md>), [programming](<https://devfeed.tech/tags/programming.md>), [programming-language](<https://devfeed.tech/tags/programming-language.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [scala](<https://devfeed.tech/tags/scala.md>)

### AI overview

This tutorial explains how Java 8 default methods in interfaces can be used to compose reusable behavior as mixins, providing an alternative to inheritance. It contrasts this approach with delegation and with mixins or traits in Ruby and Scala.

### Source excerpt

Starting in Android N Google has added some java 8 language features. One of those features is the ability to add default methods to interfaces. Surprisingly (since java 8 has already been released 2 years ago) I haven't found good articles describing the advantage of default methods for interfaces: Mixins!

## Presenters don't need lifecycle events

DevFeed: [Presenters don't need lifecycle events](<https://devfeed.tech/articles/presenters-don-t-need-lifecycle-events-25465.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/presenters-dont-need-lifecycle/>)

Author: Hannes Dorfmann

Published: 2016-03-24T09:00:00Z

Content type: opinion

Language: en

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

Topics: [mvc](<https://devfeed.tech/topics/mvc.md>), [Library](<https://devfeed.tech/topics/library.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [components](<https://devfeed.tech/tags/components.md>), [library](<https://devfeed.tech/tags/library.md>)

### AI overview

The article argues that MVP Presenters in Mosby do not need Android lifecycle callback methods. It says Presenters should coordinate the view, transform model data for presentation, and bridge to business logic, while only tracking whether a view is attached. It discusses LightCycle as a way to delegate lifecycle logic into smaller components, but cautions that adding lifecycle methods to Presenters can merely relocate complex code.

### Source excerpt

I have been asked several times why Presenters in Mosby (MVP library) don't have lifecycle callback methods like onCreate(Bundle), onResume() etc. Also the awesome guys over at SoundCloud have published a library called LightCycle that helps break logic out of Activity or Fragments into smaller containers bound to the parents Activity's or Fragment's lifecycle.

[Next page](<https://devfeed.tech/sources/hannes-dorfmann.md?cursor=WyIyMDE2LTAzLTI0VDA5OjAwOjAwKzAwOjAwIiwgIjRlYzJmOWZlLTIzZDAtNGI5Ni04MDRiLWJhOTEwYWM0ZmVhMSJd>)