This is the 11th day of my participation in Gwen Challenge
Some time ago, to develop a small program, need to choose a cross-platform framework, so I did some research, here to record.
Currently, there are three types of cross-platform solutions, each with its own advantages and disadvantages.
Based on the situation of the project, I choose the third type of framework and focus on Taro and UNI-APP in combination with the requirement of supporting multiple platforms.
The framework | Technology stack | Wechat applets | H5 | App | Alipay/Baidu mini program |
---|---|---|---|---|---|
Taro | React/Vue | ✅ | ✅ | ✅ | ✅ |
uni-app | Vue | ✅ | ✅ | ✅ | ✅ |
WePY | Vue | ✅ | ❌ | ❌ | ❌ |
mpvue | Vue | ✅ | ✅ | ❌ | ❌ |
Taro
Developers:
jingdong
The advantages and disadvantages:
Taro uses the React Native rendering engine on the App side. The Native UI experience is good, but it is said that real-time interaction and highly responsive operations are not ideal.
Wechat small program, the degree of integration is not so smooth, there are some common functions or need to package.
The other is that the development environment is slightly more difficult, you need to build iOS and Android environment, for want to develop a fool operation everywhere, a little cumbersome.
Taro 3, however, supports React and Vue DSLS, which will appeal to a wider audience and have better support for fast apps.
Case study:
Learning Cost:
React, RN, Applets, XCode, Android Studio
uni-app
Developers:
DCloud
The advantages and disadvantages:
Uni-app provides a dual choice of native rendering engine and applet engine for APP rendering, plus some technical optimizations (RenderJS) of its own, for smoother performance and responsive scenes.
In addition, its overall development process is also very easy to use. For example, there is a rich market for plug-ins that are simple to use and support a wide range of common scenarios.
And its custom IDE, HBuilder, provides powerful integration capabilities. Before using HBuilder, I thought to myself, “I need to install another editor, how good is VS Code?” After use: “Really sweet!”
Although used to VS Code still has some pain points in comparison, it is too friendly for cross-platform development and the other disadvantages are tolerable. HBuilder support direct jump to wechat developer tools debugging, support real time preview, support direct packaging small programs and App, zero threshold start.
Uni-app is still not mature enough, however, and there are a few hiccups in development that require frequent visits to the forum community for answers.
Representative products:
Learning Cost:
Vue, applets
conclusion
At present, the cross-platform scheme is not perfect. It is suitable for small programs and H5, supplemented by native APP (RN), and does not involve too complicated interaction projects.
Uni-app is easy to develop, efficient for small projects, easy to get started and difficult to debug. It is not suitable for medium and large projects. Taro 3 development process is slightly more complex, but complex projects will be better supported. React and Vue will be connected in the future, but RN will not be supported in the new version for now.
- Considering that RN is not supported by Taro3, uni-app is the only option.
- Uni-app has its own IDE (HBuilderX), compilation, debugging and packaging integration, friendly to native APP development experience;
- Personal technology stack tends to Taro/React, but the project perspective uni-app/Vue is relatively short and fast, and the community is relatively active.