Author: Hungry gu Cheng

Why did we choose Quick app

For a long time, the original Ele. me app was a little expensive for new users and a little cumbersome for old users eager to order food. However, the Web version of Ele. me application cannot reach the level of the native application in terms of experience, speed and function support. Therefore, there is an urgent need for a platform with enough functions to support ele. me service experience and enough lightweight experience, and fast application just meets our needs.

  1. Because it is directly guided and promoted by the manufacturer (Xiaomi, etc.) and has sufficient support on the system platform, all kinds of system interfaces and services are perfect, it can easily realize the same functional logic as the native application.
  2. The lightweight, installation-free mode allows both new users who want to experience and old users who want to order quickly to quickly order in a very short period of time at a very low cost.
  3. The close integration with vendor platforms makes new applications an effective and reliable traffic channel in addition to native applications and Web applications.

New applications compare native applications and Web applications

In terms of development, the development process of new applications is closer to Web applications, but in terms of application architecture design, it should be closer to native applications.

  1. New application development process has chosen the Vue/Weex technology system, therefore familiar with this piece of technology developers can very easily into the development status, the grammar is clear, simple system interface is complete, the function is clear, and the internal architecture of the application service platform is also very tolerant, can according to the developers to implement of his thoughts to the greatest extent. Take ele. me application as an example, in the process of developing ele. me new application, many logic are directly reused the logic and code of the original Web application (vUe-based system), the process of migration and transformation is very smooth, and even some components are directly converted from the original Vue component, the development experience is very good. In the process of accessing various system services, the most needed services, such as data storage, geographic location, network services, message reminders and payment, are very complete, and the docking is very simple. The interface design conforms to the cognition of Web developers, and the docking process is basically no obstacle. Based on the above factors, it is a very easy and efficient process for a Web developer to complete the application development of a new application.

  2. Application Design As mentioned earlier, new applications are much closer to native applications in terms of application architecture design, which is very interesting and requires active thinking by developers.

  3. At the system level, various system functions and interfaces of the fast application platform are effectively utilized. For example, data storage is used to accelerate application initialization and cache user information, saving time for users. Use location services for more accurate user targeting.

  4. Component level, according to the design form of native applications to achieve component view layer, logic layer. Although the vUe-like template is inherited, the actual layout of the view layer should also have the correct layout idea. Take the stack component provided by the service as an example. For ordinary Web developers, it may be difficult to have the concept of layer, such as floating navigation bar. In Web development, we are used to using fixed, sticky global positioning properties to achieve, and when it is not necessary, for properties such as zIndex, It’s hard to realize the hierarchy of Web components. In fast applications, stack is used to achieve a similar layout, in fact, the rational use of component level is required. Similarly, there is the long List component List. In the long List scenario, the List component is preferred to achieve better performance and experience. In addition, in the process of implementing view and logic, it is also very important to consider the form of native application more, so that the user experience is closer to native application.

The problem for

In the development of fast application process, also encountered some problems, here are a few.

  1. In popover and other scenes, we need to realize a mask layer, and we tried absolute positioning, stack stack and other forms, encountered some model style abnormalities (absolute positioning), stack relationship abnormalities (STACK) and so on.

  2. The unified management of system service invocation is aimed at common system invocation such as positioning and network. In order to give consideration to the efficiency of development and the adaptation of actual business logic, the interface invocation is encapsulated to some extent. In the process of improving the encapsulation, problems such as the processing of error information and the sharing of call data of different components are also encountered.

  3. In the process of recording user status, some information needs to be shared globally. We also encounter the choice of storing it in the data system or mounting it to the $app object. Storage to the data system is more reliable, and can be offline, not affected by the user and application status, disadvantages are not flexible; Mounting to $app objects is inherently tied to the application life cycle, and is more suitable for data that is shared only within the current life cycle, and can be stored to the data system at any time combined with the lifecycle phases of the hook, making it more flexible.

summary

In general, after several iterations, I think fast application is an excellent alternative to native application and Web application, which gives consideration to the high performance and good experience of native application and the lightweight and low cost of Web application.