Chuck Greb
1 min readNov 15, 2017

--

I find naming the interface of the activity the “View” to be problematic for two reasons:

  1. The activity already has sooo many responsibilities (lifecycle, system services, navigation, back stack, etc) that I find it helpful to think of the view as a separate entity (compound view, custom view, etc).
  2. There is already a large hierarchy of classes in the Android frameworks called views, so reasoning about the code base becomes more difficult.

If you are still not convinced, the documentation for the new Architecture Components even refers to activities and fragments as controllers.

The Android framework manages the lifecycles of UI controllers, such as activities and fragments. The framework may decide to destroy or re-create a UI controller in response to certain user actions or device events that are completely out of your control.

Naming is hard.

--

--

Chuck Greb
Chuck Greb

Written by Chuck Greb

Mission-driven engineering leader. Community organizer. Digital minimalist.

Responses (1)