Android Architecture Components Ships as 1.0 Stable
- By David Ramel
- November 30, 2017
Google has shipped Architecture Components 1.0, a stable version of the guidance and libraries package for helping developers construct Android apps.
Launched as a preview at the Google I/O conference, the project provides a collection of libraries to help developers design robust, testable and maintainable apps.
Earlier this month, the Android team announced the Room and Lifecycle Architecture Components libraries have reached 1.0 stable status, targeting the management of UI component lifecycles and handling data persistence.
"These APIs are ready for production apps and libraries, and are our recommendation for developers looking for help with app architecture and local storage (although they're only recommended, not required.)," the team said in a blog post. "Lifecycles are now also integrated with the Support Library, so you can use them with standard classes like AppCompatActivity."
The goal of Architecture Components is to provide a simple, flexible and practical approach to help developers more easily handle some common problems so they can focus on coding great experiences, through the use of core building blocks tied together by guidance on app architecture, Google said.
The Lifecycles library allows for the creation of lifecycle-aware components that manage their own lifecycles -- such as Activities being started, stopped and destroyed -- reducing the possibility of leaks or crashes. It also serves as the base for other Architecture Components.
The Room library is described as a simple object-mapping layer designed to help developers leverage the built-in SQLite database store while writing less boilerplate code.
While those two have reached v1.0 stable status, other libraries in the works include LiveData -- "a lifecycle-aware observable that holds data and provides updates" -- and ViewModel, which "separates ownership of view data and logic from lifecycle-bound entities like Activities and Fragments."
The Android team also announced a Guide to App Architecture that codifies core principles reportedly applicable to every developer, along with specific guidance on using Architecture Components together.
About the Author
David Ramel is an editor and writer for Converge360.