Advanced cross-platform application development (64): WeChat applet development technology stack native development VS cross-platform development

I. Introduction

When it comes to front-end development, you have to talk about cross-end development, because it can improve the efficiency of applications and reduce development costs. uni-appIt is a cross-platform development framework based on Vue.jsand can run on multiple platforms such as WeChat applets, Alipay applets, H5, etc. For developers, this means that they can use the same code base to build applications for multiple platforms, instead of developing different code bases.

I believe that everyone is familiar with mini-programs, which can be found in every aspect of life, such as: group buying in communities, shopping in malls, taxi travel, food ordering, health codes, mini-games, etc., are all shadows of mini-programs. The popularity of the app is mainly due to its unique advantages. It does not need to be installed, can be used on the go, and does not occupy additional memory. By the majority of developers and users of all ages.

So, if you plan to develop a small program, use native or uniapp? How to develop a small program? The following is a brief explanation of native development and cross-platform development.

2. Original development

The advantages of native development are as follows:

  • The official documentation is clear and clear, and it is closer to the underlying logic of mobile services. Developers can conduct in-depth development of small programs in a more targeted manner.

  • Using native development can closely follow the official version, and the update response speed is fast, so that the project can reach the optimal state.

Let’s take a look at the disadvantages again: Like front-end development, developing small programs under different platforms requires different development tools and syntax, such as WeChat developer tools, Ali development tools, ByteDance development tools, QQ development tools, etc. If the project Native is undoubtedly the best choice for only small programs on a single platform, but if you develop multi-platform small programs at the same time, you need to write multiple sets of code for the same project, which will require a lot of work and high costs for later maintenance.

3. uni-app development

uni-appThe advantages of the development are as follows:

  • A set of code can package 14 different types of platforms, and can generate various small programs H5 and APP applications. Developers do not need to switch various development tools back and forth, and use one HBuilderXeditor to get everything done.

  • It is easy to get started, vuethe syntax used is combined with the small program api, if you have vuea foundation, you can read the document directly to get started, and if you don't have a foundation, you can develop vueby uni-appmastering it. After all , it is the handle of the front-end development industry.vuevue

  • uni-appMulti-terminal support and better ecology, if the project requirements are not high, you can quickly create an application without writing too much code ( 低代码平台微搭也可以考虑).

Let's look at the disadvantages:

uni-appThe packaged applets may have platform compatibility issues. The same code may be different on different platforms. The official version is actively updated. I believe these issues will be resolved gradually.

uni-appThe following is a comparison of ecological differences between the original development of WeChat applets and the two forms of development:

3.1 UI component library

Many front-end students CSSare generally not very good, and the project style they make is very rustic. The UI component library allows us to quickly build a beautiful application. WeChat applets and both have uni-appofficial libraries and third-party libraries, and the uni-uicombined uViewfunctions are more and more All, you can compare and see for yourself.

weUI address

vant weapp address

uni-ui site

uView address

3.2 Plug-in Market

So far, there are 100+ plug-ins in the WeChat service market, and uni-app8K+ plug-ins in the plug-in market. It is obvious that uni-appdevelopers in the plug-in market are more active.

WeChat service market

DCloud plugin market

3.3 User system

The WeChat applet relies on WeChat’s one-click login is very convenient, uni-appnot only can use WeChat to log in, but also has its own user management system, combined with uniCloudalmost no need to write too much code, it can integrate a set of multi-platform, user login registration system.

3.4 Background management system

WeChat applets have their own content management system and uni-appa uni-adminbackground management system. From the perspective of ease of use, WeChat’s content management system is very simple and convenient, but the module cannot be expanded, and can only do some simple additions, deletions, modifications, and background management uni-admin. The system is actually a vueproject, and it is difficult to get started, but you can expand custom modules arbitrarily.

3.5 Cloud Development

Cloud development can transform front-end engineers into full-stack development engineers, so that front-end developers can operate the database by themselves. At present, Tencent Cloud, which Tencent Mini Program relies on, has started to charge. The monthly fee is 19.9. You can use Tencent Cloud or Alibaba Cloud. uni-appCurrently Alibaba Cloud is free, so you can go whoring for nothing.

3.6 Difficulty

If you are a novice, you can get started with any of them, and they are all essential front-end skills.

4. Extended reading

Guess you like

Origin blog.csdn.net/sunhuaqiang1/article/details/130740709