Modern Android architecture by using View Model
A bridge of elegant design in T.O. In 2018, Google released Android Jetpack, a suite of code library, tools and guidelines that included the APIs of architecture components. The APIs are designed to help building common tasks faster and more reliable, and at the same time conforming to the architectural guidelines recommended. An Android app consists of one or more user-interface controllers. There are already a lot of codes in this area. It is not a good approach to have the codes, for example, written for managing Web Service and database I/O included in the U.I. Controller component. Good design puts codes in the right places to reduce complexity, and enables collaboration among teams. A U.I. Controller consists of one or more Activities. Each Activity uses zero, one or more Fragments. Each Fragment uses other classes. While a U.I. defines how the data is displayed and collected on the screen, a Repository manages the incoming and outgoing data....