1, the preface

After the previous ten articles, we learned the use of Weex, source code and architecture analysis, the advantages and disadvantages of Weex and core capabilities also have an understanding.

To make the big front end complete, let’s consider a question: How do YOU build a complete App using Weex? So the App is a shell, and the skeleton is Weex.

2, advantages

Let’s first think about the benefits of the next complete Weex built App. Of course, to a certain extent, we can put it in other words, it is usually the disadvantages of Native development:

  • Dynamic update capability, module modification or hotfix;
  • Simpler support for A/BTest;
  • Apk package is small, service modules can be downloaded on demand;
  • Reduce crash rate;

Just think, do we usually spend A lot of energy on thermal repair, A/BTest and unpacking scheme with A lot of Dex in Native development, and at the same time, we need to wait for A long time for approval and low user upgrade rate when releasing to the market?

3, the practice

Generally, for difficult or big problems, we will disassemble tasks first and break them down into several small problems one by one.

Let’s take a look at the various minor problems after disassembly:

  • Project link;
  • Cooperation mode;
  • Other optimization;

3.1 Project Link

Project link is the whole process of project development, testing, packaging, gray scale, release, etc. It is not very different from traditional Native development, and there are some points that need to be paid attention to.

For the development of version control warehouse we need two, one is Android code warehouse, the other is Weex development warehouse;

  • Android code warehouse is used to provide Native components, Weex module code built-in and shell App packaging;
  • Weex repository is Vue code version control;

Remark:

  • Weex using Vue code needs to be compiled, it is best to do a script tool to simplify steps;
  • For gray scale, depending on the release platform, it is best to have a visual operating interface;

3.2 Collaboration Mode

The way of collaboration is who is needed for a complete Weex App, and how can the division of labor maximize human efficiency?

First of all, for simple Weex use, Native RD can own handwritten Weex code. However, the whole App is constructed by Weex for better engineering, so it is better to have a clear division of labor:

  • Native students are only responsible for the infrastructure, providing various components for front-end students to call;
  • The business part is done by the front end students;

The advantage of this division of labor is that Native and front-end students are respectively responsible for their own good work content, which is conducive to the rapid development of business.

3.3 Other Optimizations

** This is essential for a complete Weex App. After all, for pure native development, there are plenty of experienced developers who have a clear path to Bug solving and tuning. However, once the Weex stack is fully adopted, the simple use of Weex is not enough, need to be very familiar with the Weex source code, when necessary to modify (THIS I think unavoidable). ** The following points are listed:

  • Basic skills need to be done by yourself;
  • Strengthening of test links, ensuring stability and performance;
  • Optimization of interface display speed;

Be sure to note: understand the source code, do not meet the time to modify.

4, summarize

This article summarizes the Weex development of the link, on the use of Weex, source code analysis, architecture design, advantages and disadvantages can refer to the previous series of articles.

Welcome to pay attention to wechat public number: regularly share Java, Android dry goods!