# navigation-architecture

Published articles for navigation-architecture.

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

## Structural and navigation anti-patterns in modularized Android applications

DevFeed: [Structural and navigation anti-patterns in modularized Android applications](<https://devfeed.tech/articles/structural-and-navigation-anti-patterns-in-modularized-android-applications-25933.md>)

Original publisher: [Read original article](<https://proandroiddev.com/structural-and-navigation-anti-patterns-in-modularized-android-applications-a7d667e35cd6?source=rss-7a8d96da8cb6------2>)

Author: Gabor Varadi

Published: 2020-12-25T11:38:05Z

Content type: article

Language: en

Sources: [Stories by Gabor Varadi on Medium](<https://devfeed.tech/sources/stories-by-gabor-varadi-on-medium.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [modules](<https://devfeed.tech/topics/modules.md>), [navigation](<https://devfeed.tech/topics/navigation.md>), [Code](<https://devfeed.tech/topics/code.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [RxJava](<https://devfeed.tech/topics/rxjava.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [antipattern](<https://devfeed.tech/tags/antipattern.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [clean-architecture](<https://devfeed.tech/tags/clean-architecture.md>), [code](<https://devfeed.tech/tags/code.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dagger-2](<https://devfeed.tech/tags/dagger-2.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [domain-driven-design](<https://devfeed.tech/tags/domain-driven-design.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [modularization](<https://devfeed.tech/tags/modularization.md>), [modules](<https://devfeed.tech/tags/modules.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [navigation-architecture](<https://devfeed.tech/tags/navigation-architecture.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>)

### AI overview

This article examines structural and navigation anti-patterns in modularized Android applications. It traces the history of Android Clean Architecture and argues that organizing an application around top-level data, domain, and presentation modules can be problematic, particularly when the structure is adopted from educational examples rather than feature-based organization.

### Source excerpt

Structural and navigation anti-patterns in multi-module and modularized applications: The case against "Android Clean Architecture" and the "domain" moduleTop-level "domain" module is a code smell. Merry Christmas to all! The subject of this article is one that has been on my mind for a very long time. After all, "Clean Architecture" is often seen as the end goal, the hallmark of the finest of Android application code structure -- it is the best of the very best. The name itself, "Clean Architecture", signals that it's a good thing ~ after all, who wants to work with "messy" code in comparison? Of course, the title of this article shows that this isn't the conclusion we'll come to. The following tweet is closer to our final evaluation -- let us analyze why it might be accurate. Clean architecture + Android for us was like building a beautiful sailing boat in your backyard because someone on TV convinced you it's better for crossing the sea than an inflatable, while you live in the mountains and also your house is on fire. https://t.co/iGqy25wk7m The history of "Android Clean Architecture"The origins To understand "Clean Architecture" as done on Android, we must trace it back to its roots, and where/when it was made popular in the first place. As far as I'm aware, it dates back to 2014, the original proposition in "Fernando Cejas: Architecting Android... the clean way?". It was a highly influential article, as it revolutionized the structure of Android apps. Code that is actually separated across layers (back when Fragments were untrustworthy, and all code was in OS-level components), rather than just throwing everything into 2000+ line Activities? A pioneer of its time. One interesting decision however in the representative sample code was that in order to signify the strict separation of layers, these layers were each separated from one another using top-level Gradle modules, each labeled data, domain, and presentation. As we will see, this is the downfall of the sampl

## Back to basics: Plugging in the Activity

DevFeed: [Back to basics: Plugging in the Activity](<https://devfeed.tech/articles/back-to-basics-plugging-in-the-activity-26000.md>)

Original publisher: [Read original article](<https://medium.com/@nhaarman/back-to-basics-plugging-in-the-activity-cc1e6a7f0ea4?source=rss-fceb7a60a849------2>)

Author: Niek Haarman

Published: 2019-01-28T23:06:32Z

Content type: tutorial

Language: en

Sources: [Stories by Niek Haarman on Medium](<https://devfeed.tech/sources/stories-by-niek-haarman-on-medium.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [navigation](<https://devfeed.tech/topics/navigation.md>), [Application Development](<https://devfeed.tech/topics/application-development.md>), [Development](<https://devfeed.tech/topics/development.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Logging](<https://devfeed.tech/topics/logging.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [application-development](<https://devfeed.tech/tags/application-development.md>), [development](<https://devfeed.tech/tags/development.md>), [logging](<https://devfeed.tech/tags/logging.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [navigation-architecture](<https://devfeed.tech/tags/navigation-architecture.md>), [testing](<https://devfeed.tech/tags/testing.md>), [user-interface](<https://devfeed.tech/tags/user-interface.md>)

### AI overview

This tutorial explains how to use an Android Activity as a pluggable window for displaying screens managed by a composable navigator tree. It contrasts this approach with traditional multi-Activity applications, single-Activity applications using Fragments, and the Navigation Architecture Component.

### Source excerpt

...and wrapping up this series. In previous articles, I wrote about how you can create screens and navigators as composable building blocks for your application. Screens become little independent blocks of code that take input and produce an output, navigators tie these screens together by providing the input and listening for the output. Navigators in turn can be composable as well and accept input and provide output. In the end, you may end up with a tree of navigators with screens at their leafs. An example of navigation through an application where the user registers and enters the main application flow. See Back to basics: Navigation for more information. At the root of the tree, this leaves us with a stream of active screens which we can use for several things, like for testing, analytics or logging. But above all, this leaves us with a perfect hook to provide the user interface! Presenting screens In traditional Android application development, an Activity represented a single screen. To navigate to a different screen, you would start a new Activity and the OS would add it to a back stack for you. Activities have their own lifecycles and deal with their own layout. Unfortunately, the Activity class is a God class, and quickly leads to messy implementations. Over the years a lot of developers have switched to so called 'single Activity' applications, where the app would utilize a single Activity class to host the entire application flow. The most straightforward way to do this is using Fragments and the back stack in the FragmentManager. More recently, the Navigation Architecture Component provides another way to implement a single Activity application. Fragments however are just as messy as their Activity counter parts. In fact, Fragments are designed to be able to do everything an Activity can do! Displaying screens Instead, we can take our Activity instance and treat it as nothing more than a window that can display a user interface. It registers a listener w