Android programming framework of the architecture program

Currently mobile terminal application market is already flourishing, many companies are Unicorn entrepreneurship developed by App, App now more abundant type, function more perfect, basically covering every corner of the various industries. In order to develop a more competitive App, not only on the need for innovative features, content also needs to be more diversified, so there have been relatively huge project. These projects add the code constantly, without a good infrastructure, all the code will be strongly coupled together, there will be a lot of dependencies between functions, then there will be a lot of problems, such as:

1, modify the function difficulties, led by a launch body. If a lot of places api badly written, not elegant packaging, then there will be a change where it is needed to change the call to a lot of places.
2, update the code to work iteratively redundant waste of resources caused by excessive elimination of redundant become very complex, and is likely to be a lot of bug.

In order to solve the above problems, after a long period of exploration and development, today has been quite mature programs to ensure as far as possible to avoid these problems. The architecture was born to do this concept, in the actual development architecture is divided into the code architecture and infrastructure projects. among them:

1, the code architecture is divided into three categories: MVC, MVP and MVVM.

2, the project architecture is divided into: single-mode projects, modular, component-based, plug-in technology.

as the picture shows:

The core idea of architecture: layered and communication .

1. dividing submodule

In addition to common common part of the flight and divide the service module is particularly important, compared to the architecture in the narrow sense, the focus divided subsystems in the broad sense, is the test of technical experience and understanding of the business.

2. Communication system

The modular communication system, is that the introduction of each other; the extracted common module, other modules to be introduced into the module using a natural
component of the communication system, and normally can be divided into multiple, and the mainstream is implicit route. Implicit in the presence of the decoupling and flexibility is greatly reduced, thus routing the mainstream.
Plug of communication, different plug-in itself is a different process. Therefore biased in favor communication between similar Binder interprocess communication mechanisms.

 

Guess you like

Origin www.cnblogs.com/renhui/p/11791672.html