Intro to Android

Chapter 3: Architecture

Now that you know why Android is such a compelling system, let's look at how the system is constructed. A lot of pain and suffering can be spared if we follow Android's conventions and loosely coupled model. Writing code this way makes it easier to write and maintain. We should strive not only to make beautiful code, but also engaging personal, and fast experiences for our users.

There are many layers of decoupling in the Android system. The applications are independent entities that can send messages, but never know too much about each other.

The model is abstracted away from the display of the data and accessed by content providers and other mechanisms.

Views are abstracted from the business logic and into XML files that make it easy to change the appearance of the view without changing the way that the view works.

Views are also decoupled from the resources that they use and the logic from choosing which view is right for the particular device it is running on.

Assets and other content are abstracted from the view and business logic so that the content can change without requiring an update in the code to support small copy changes.