Android mobile application development architecture, cross-platform technology evolution

> Development Zatan: A Brief History of Android Mobile Application Architecture Development - https://mp.weixin.qq.com/s/a5PfzO5qh_1P1TcCwdWonQ
  framework: once formed its own set of framework, you can use long-term, or even the entire company to become a set of development standards, greatly improving the efficiency of the latter part of the development project to the new project can be used directly in a new project, but the main focus on the realization of business functions.
  A core idea: that "calling more convenient, more secure, lower degree of coupling between code", which is a good software eternal pursuit of the goal.

--4-generation architecture

1st generation: its standard MVC architecture workflow:
1.View accepting user interaction request
2.View forwards the request to the Controller
3.Controller data updating operation Model
4. After the data update, Model View data change notification
5. View display data after update

Generation 2: MVP work flow chart:
1.View accepting user interaction request
2.View the request to the Presenter
3.Presenter database update operation Model
4. After the data update, Model Presenter notification data changes
5.Presenter update View The data

3rd generation: MVVM workflow:
1.View use DataBinding event of the Command to bind and respond to events, network requests trigger
method 2.ViewModel analysis and processing, calls the Model to request data
request 3.Model parameter will receive packages and other information, the network requests call library
4. the server returns data to other network Retrofit library, and then returns to the Model layer
entity class object 5.ViewModel receive callback returned
6. because xml entity class object implements two-way tie set, update entity class, such that UI updates

4th generation: four generations of component-based architecture MVP +:
 top android development of these three items commonly used in architecture, no matter what kind of architecture, it is always a single structure projects, or traditional package names between the various modules to distinguish which each module is a strong coupling, the natural component of the program arises, there is the development of components and sub-mode release modes, in each business development mode is an independent module is apk , packaged in release mode, when each business module into a separate component library, which carried out a thorough decoupling between the various modules.

1. Integrated mode: all business components are "app housing project" rely, to form a complete APP;
2. Component mode: business components can be developed independently, each business component is a APP;
3.app housing project: responsible for managing each service component, and packaged APK, no specific business functions;
4 service components: the specific business company formed independently of a project;
5. functional components: the development of APP provide certain basic features, such as the printing log, drop-down refresh and other controls;
6.Main components: belonging to a business component, designated APP start page, the main interface;
7.Common components: belongs to the basic functional components, supporting business components, business components provide the functionality most needed

  Whether MVC, MVP or MVVM, they all belong to the coding structure of the project, and component-based architecture is engineering the whole project, its main significance is that for each module to distinguish the original package in order to be completely decoupled, but regardless of the technology how how upgrading, but will never change is the core idea of ​​a "calling more convenient, more secure, lower degree of coupling between code", which is a good software eternal pursuit of the goal.

> Cross-platform development of mobile technology evolution - https://mp.weixin.qq.com/s/g44ql1hOMdsfgKMXGjUo6w
 classification is no standard answer cross-platform technology, where they are classified into five kinds, namely Web App, Hybrid App, language compiler switches, native rendering, self-painted UI.
 Web App refers to Web-based applications running on the network and a standard browser, the equivalent of a Web page and then add an App shell. 2014 HTML5 standard specifications finalized, Web App on the network public opinion has replaced the Native App momentum, but Web App has the disadvantage that it is always "the protagonist's heart, supporting life."

PWA (Progressive Web App) means the progressive enhancement Web application, it is not a technology, but a concept, using a variety of technologies to enhance Web App features:
 with Service Worker + HTTPS + Cache Api + indexedDB and a series of web technology for offline loading and caching
 to achieve a push and notifications
 can be added directly to the phone's desktop
 using the Service Worker may be background synchronization
to sum up, the main ability PWA is offline, push, desktop access, it can be said PWA given Web App native experience

In addition to the use of native and Web development App, it can also be used HTML5 + were born original mixed-use development, which is Hybrid.
  Hybrid technology has a lot of relevant, such as PhoneGap, Cordova, Ionic, VasSonic and so on.
  In 2011, Apache acquired Nitobi Software and its products PhoneGap, PhoneGap and be open source, when PhoneGap version 2.0, the product was renamed Apache Cordova. Cordova currently supported platforms are Android, iOS, Windows, Mac OS X, Electron.
  Ionic Framework is an open source UI toolkit, the first goal is to use HTML, CSS and JavaScript and other Web technologies to develop mobile applications. Because of this basic Web technology, Ionic can run anywhere on the network running, such as iOS, Android, browser, Electron, PWA and so on.
Currently, Ionic Framework has been officially integrated with Angular, but support for Vue and React is in development.
  VasSonic is a lightweight high performance hybrid framework developed by Tencent VAS team to accelerate H5 first screen that runs on Android and iOS platforms. VasSonic not only supports server presented a static or dynamic website, but also perfectly compatible with Web offline resources. VasSonic url connection using a custom network connection rather than the original request index html, so it can advance or in parallel in order to avoid waiting for the resource request to initialize the view.

  The main development language micro-channel applet is JavaScript, the development of small programs compared with ordinary web development has a great similarity.
Applet runtime environment into rendering and logical layers, the two layers are managed by two threads, rendering the interface layer is used for rendering WebView, JsCore thread runs using logical layer JS script. Communication both threads will do transit via WeChat client (Native) in JSBridage. Logical layer network request also via Native forward
  micro-channel applets and PWA are based on the difference between Web technologies, the principle is the applet similar Hybrid architecture, the WebView rendered basic web content, the higher the component of the rendering performance requirements by native components implementation, such as cameras, video, maps, etc., another traditional local capacity Web inaccessible, needs to be implemented by JS SDK, and PWA is the use of a variety of Web technologies to enhance the ability to achieve near native application experience.
  Small and micro-channel program itself App is not competition, is more of a marketing channel, it is more like a poster for promotion back quickly, while App is to promote the object. Disadvantage of small micro-channel program is clear, the experience can not be compared with the App, features rely on and subject to the micro-channel can not be expanded. It can be said small micro-channel program is the establishment of sub-ecology, the ecology of micro letter said the operator, other opponents of the development would be threatened.

  Language compiler converts refers directly to a language compiler for the next platform binaries. Xamarin framework is relatively well-known, although it is embedded in the Android platform Mono virtual machine to achieve, but in the AOT's iOS platform is compiled into a binary file, so it attributed to language compiler conversion type.
  Xamarin was founded in 2011, it was officially acquired by Microsoft in 2016. Xamarin is a branch of Mono project, an open source project based on cross-platform .NET implementation.
And PhoneGap framework, etc. The difference is that, Xamarin may be in the iOS and Android has just launched a new feature, the first time to call the appropriate API, while using PhoneGap will need to wait for a new function PhoneGap package before they can call the appropriate API.
  C # code written in Andriod application running in a virtual machine Mono, ART can be performed in the Mono C # code by ACWs (Andriod Callable Wrappers) way. C # code if they wish to call the system functions or the realization of Java class libraries, can be implemented by MCW (Managed Callable Wrapper) way. MCW is a JNI bridge, you can use managed code to call Andriod code.

 Native rendering in this article was developed by the middle finger by a native JavaScript and rendering controls, representing React Native, Weex, fast application.
 Since the painting of representatives Qt UI framework and Flutter. Flutter is Google's mobile UI framework, we can quickly build high-quality native user interface on Android and iOS, which is the predecessor pilot project Google Sky.

Guess you like

Origin blog.csdn.net/ShareUs/article/details/89704571
Recommended