preface

Recently, I accidentally found a new cross-platform framework on Github — MLN. According to the project introduction, MLN is a high-performance, compact and easy-to-use mobile cross-platform development framework based on Lua language, and supports hot updates. One of my interests was the name Momo, and the other was the hot update (even Flutter doesn’t support hot anymore).

MLN Project Introduction (from Readme)

MLN is a mobile cross-platform development framework that lets developers build Android and iOS apps with a single set of code. MLN is close to native development, and the experience of client developers can be quickly transferred to MLN to easily build cross-platform mobile applications.

Mobile cross-platform development, Including Flutter, Weex and React Native, already has huge fans of their own. Why did MLN suddenly come in as a dark horse?

  • Designed for client developers.

  • Increase package volume is small, 1.2M

  • True native performance. Cross-platform often means performance suffers, and thanks to the high performance of the Lua VIRTUAL machine and MLN optimization, we have greatly reduced the impact of intermediate media, making the page load extremely fast even on low-end Android phones.

  • Hot update is supported.

Early adopters

Here’s how the Momo team was designed: Our initial goal with Lua Native was to let programmers leave work half an hour early

Personally, I love this phrase. As a programmer, I want to leave early too, but leaving on time seems like a luxury.

Set up the environment

Follow the ReadMe article to start the setup environment, MLN development environment setup, the official documentation has been quite detailed, I will not be verbose, personally experience. I tried and installed these development environments in a very short time, mainly by installing the IDEA development tool and two plug-ins on it.

Thermal overload

Hot reloading: Changes the code immediately, eliminating the compile wait phase.

Through the use of downloaded demo, and then enter the hot overload page, with USB or scan code to connect to the phone, you can carry out hot overload experience, it is very convenient to use, easy to understand the operation!

Open the automatic synchronization switch, more convenient, pro test available.

Designed for client developers

MLN is designed for client developers and is very easy for iOS and Android programmers to use. Using MLN does not require learning node.js, NPM, Vue, ES6 front-end technologies that are unfamiliar to client development, nor does it force the use of responsive frameworks. It’s easy to get started with a few hours of lua language and documentation, and the client developer’s entire technology stack comes into play here.

Regarding this, I did feel faster to pick up a Flutter than a FLUTTER when I was experiencing it, not to mention RN, and getting familiar with the documentation was pretty quick. After all, Lua is a development language that is fast and easy to use. Page layout uses the familiar FrameLayout, LinearLayout. It feels more android developer friendly, as these layouts are used a lot, but it’s not too hard for iOS developers.

Compare the installation package size and performance of each platform

Themselves want to try some of the most popular a few cross-platform framework on android and apple phones all aspects of the contrast, just came across a bosses have done this test, there is no try again, with the two test machine points increase the package size, the page loading speed, the page refresh frame rate (FPS), memory footprint was tested.

Therefore, compared with Weex, Flutter, and React Native apps, MLN apps have the smallest increase in package size, and are closer to Native apps in FPS and page loading speed.

Therefore, compared with Weex, React Native and Flutter, apps developed using MLN have the smallest package size increment, page loading speed and memory usage after being installed on the iOS platform.

Application scenarios

  1. Support the development of a complete APP, can obviously save manpower.

  2. Embedding it into existing development projects can significantly improve development efficiency.

A series of functions such as momo home page, live frames, part of more frames, nearby groups and werewolf circles were developed with MLN. The stability and performance of MLN has withstood momo’s test of over 100 million maUs in more than a year.

On the other hand, if you are going to apply it, you may want to consider embedding. Some pages will be very nice if they can be hot updated, which will be very helpful to the project.

About Hot Updates

Since it is developed in Lua, you just need to package the Lua file to the project. Of course, you can replace the Lua file by downloading it from the Internet.

As for whether the review will be rejected, Momo does this, but I haven’t tried it yet. How long you can use hot updates depends on Apple’s approval rules.

disadvantages

After analyzing and understanding a lot, I feel that all aspects are excellent, but in fact, the shortcomings are still very obvious.

  1. For now, it is mainly applied to Momo, lacking third-party verification.
  2. Future technical support and scalability are unknown.

conclusion

In fact, the birth of these cross-platform frameworks, have their own technical background. Only in the right setting can they be truly powerful, but MLN is worth a try!

Refer to the link

Github.com/momotech/ML…

zhuanlan.zhihu.com/p/97925879

Github.com/momotech/ML…