8
头图
Author: Jingzhuang

This article mainly talks about the thinking and practice of NetEase Cloud Music's large front-end team in the construction of a low-code system oriented to model R&D scenarios. This article will start from the current business R&D problems we are facing, talk about our thinking on building a low-code R&D system, and then introduce the online rapid R&D capabilities that we are building to support both LowCode and ProCode online R&D.

Business R&D Status

image.png

Let's take a look at the current state of our business. With the rapid development of the business, a large number of platform-based products have appeared, among which there are more than 40 platforms related to public technology, quality assurance, and data intelligence. and various web applications. And, this number is still increasing. On the other hand, both the CMS platform and the activity page show obvious pattern characteristics. This means that a large number of development needs faced by developers are actually repeated and similar.

image.png

And our research and development status quo is: The contradiction between a large number of business needs and inefficient research and development throughput. Let's take a look at some thoughts on the current state of R&D from different perspectives:

Product classmates often complain: just change a copy, but the front-end needs to be arranged for 2 weeks, and the combined requirements are released, how can it be so inefficient;
Back-end students often encounter: some internal system experience is not good, if you want to change the UI, you have to find front-end resources to schedule, but the front-end has no resources to do it;
The front-end students are faced with: there are many business needs, each of which is urgent, simple and repeated needs, without a design draft, it is difficult for me to grow technically!

Here I made a simple mathematical statistic. In the middle and back offices, the front-end supports 3.3 platforms per capita, and the average delivery time is about 2 weeks. The picture on the right is a list of requirements from the 20th issue of the Muse platform. You will find that a large number of requirements are trivial details such as "modifying the text" and "adding fields", but these problems require multi-party coordination and scheduling development.

Application Development Dilemma in Rapid Business Development

Why does such a problem occur? In my opinion, the application development dilemma in the rapid development of the business can be dismantled from four aspects:

  • The first is personnel . On the one hand, the mobility of personnel is unavoidable. On the other hand, full-stack developers are extremely scarce at present.
  • Followed by change , because the demand is always changing, and the iteration cycle is getting shorter and shorter.
  • The third is complex . On the one hand, the technical system has become more and more complex, and on the other hand, the R&D dependence has become more and more complex.
  • The fourth is the disconnection between and . On the one hand, it is the disconnection between requirements and development delivery, and on the other hand, it is the disconnection between long process and rapid delivery.

From focusing on application development to focusing on business delivery

How should we respond? My thinking is that the first-line developers need to "shift from the application development process to the business delivery process" .

image.png

traditional business development process I think is a linear application development process It needs to go through requirements communication, development and testing, and then release and deployment There is a high cost of communication and collaboration . And developers will pay too much attention to flexible and decentralized local development tools and complex web application architecture, thus ignoring the business delivery itself.

In my opinion, the ideal development process of should be non-linear, business changes can be responded quickly, and various R&D roles can be involved in the delivery process in a low-cost and low-code . And this relies on the rapid development capabilities of standardization and integration, as well as a more lightweight and controllable web application architecture.

Cloud Music Online Rapid R&D and Delivery System

Based on such thinking, agreed that we need to build a rapid R&D delivery system to deal with business . Through this system, we can effectively connect the company's existing design specifications, development models, development tools, and basic R&D facilities. Therefore, , we set up the "Tango Low Code" project in the Cloud Music Technology Center. Tango is an elegant two-person dance, which is a metaphor for the new experience we are committed to bringing to business R&D delivery.

The core advantages of the Cloud Music Tango low-code project include three aspects:

  • Visual construction capability based on source code : It provides a visual construction experience from source code to source code, does not rely on a specific DSL and has no private construction protocol, so it has nothing to do with the front-end framework, and supports LowCode & ProCode dual-mode online development ability.
  • seamlessly integrates with existing R&D facilities, providing one-click application creation and release deployment capabilities : It can deploy the front-end platform, connect to the version control system Gitlab, and completely reuse the existing material system.
  • Provides the ability to connect with contract coordination and model-driven. : Supports docking with the existing contract coordination mode of Cloud Music, provides automatic coordination capabilities in the designer, and builds an automated system with the application interface model information of the back-end metadata center. Page generation scheme.

image.png

Disadvantages of traditional low-code construction solutions

Before talking about the low-code technical solutions of cloud music, we might as well first analyze the problems existing in the traditional low-code construction solutions: most of the low-code solutions on the market can be described by the following picture. The core of is to convert the view logic into page description logic, build the node model and attribute model on this basis, and then modify the view logic by manipulating and changing the model.

The problem here is , the designer of the engine usually needs to define the page description protocol here first, usually in JSON format, limited by specific business scenarios and developers' personal preferences, the protocol design here exists A lot of uncertain factors can easily lead to protocol inconsistency and later maintenance problems. Due to the need for peer-to-peer mapping with programming languages, it is difficult to achieve Turing completeness for this kind of private protocol construction scheme.

image.png

To sum up briefly, I think this kind of traditional low-code construction scheme has three obvious drawbacks:

  • uses a private construction protocol, which leads to high protocol design costs, difficult long-term maintenance, and difficulty in achieving Turing completeness.
  • relies on a specific DSL scheme, so that the materials are limited to a specific construction scheme to a certain extent.
  • Due to the above two reasons, only has one-way transcoding capability. Once the source code is output, the process is no longer reversible.

Cloud Music's low-code solution based on source code

We need to rethink the protocol design problem of low-code construction. We expect that the new construction protocol needs to be general enough and easy to understand, easy to maintain, even free of maintenance, easy to manipulate, and able to be independent of the front-end framework. At this time, we thought of AST (Abstract Syntax Tree), which is the abstract syntax tree of programming language source code, which is used to represent the structured description of the source code structure. For the JavaScript language, Babel has provided the AST parsing and generation capabilities for the JS language. With the help of Babel's tool functions, it is easy to manipulate and change the source code nodes.

Therefore, in the visual construction model of the Tango low-code system, the core idea we take is: the source code into AST, further abstracts and establishes the file model and node model on the basis of AST, and configures the behavior by dragging and dropping the view. Turn into manipulation and modification of the AST, and then restore the changed AST back to the source code.

image.png

LowCode & ProCode dual mode real-time switching

Due to the use of a low-code construction solution based on source code, the low-code platform built inside Cloud Music can provide both LowCode and ProCode R&D modes, and the behavior of users in the two modes can be completely equal. The behavior in the design view will be synchronized to the source code in real time, and the changes of the source code can also be reflected in the design view in real time. With this dual-mode switching capability, a more flexible online R&D experience can be provided for some advanced scenarios, and source code projects created locally by users can also continue to be developed online in compatibility mode.

image.png

Seamless integration with existing R&D facilities

For the Tango low-code system of Cloud Music, based on the construction of the LowCode & ProCode hybrid R&D model, we pay more attention to the integration with the existing internal R&D facilities, thereby further accelerating the business R&D efficiency. The Tango platform provides the ability to integrate with Gitlab, and every time the user saves the operation, the source code will be written into the Gitlab warehouse; it provides the ability to integrate with the R&D platform, and can quickly create applications with one click, and can deploy and publish applications with one click ;Provide the ability to integrate with the material center, which can quickly consume two-party and three-party component packages in the team; Provide the ability to integrate with the data gateway, with the help of the contract joint debugging mode, can quickly generate pages online; Provided with D2C Integration capabilities, support one-click code generation from design drafts.

image.png

Contract co-ordination and model-driven capabilities

In the R&D system of Cloud Music, the R&D mode of contract joint debugging is established, which provides interface contract and its change management, interface automation Mock capability, and with the help of the basic metadata of the application provided by the code automation analysis center, it can provide Tango low-code platform with Powerful application data model and service support. At present, the Tango low-code platform of Cloud Music has initially built the online automatic joint debugging ability based on the contract joint debugging mode, and the automatic generation ability of the model page based on application metadata is also in the process of progress.

One More Thing: Source-based low-code engine

In the process of building the low-code system of Cloud Music Tango, we sank the core low-code capabilities, abstracted and built an ecosystem of low-code engines based on source code. On the one hand, it provides platform-side capabilities with more decoupling and easier The underlying solution for maintenance, on the other hand, cooperates with multiple teams to build a low-code ecosystem within the company.

With the help of the Tango low-code engine, when we restart a low-code project internally, we can easily complete the front-end implementation of the entire low-code project with only 30 lines of code, and developers can focus more on service integration and In terms of user functions, the internal trial and error costs are greatly reduced.

image.png

summary

Finally, a brief review of the low-code R&D system we are building at Cloud Music. In order to deal with the problems and challenges in the process of business R&D, combined with the current status of business R&D and technical system of Cloud Music, we believe that using a low-code approach to build rapid online R&D delivery capabilities can effectively deal with the problems in the model business R&D scenario. , and can simplify the front-end development process and empower a variety of business R&D roles. For this reason, we have built a cloud music Tango low-code R&D system, which is completely based on source code solutions, does not use private construction protocols, and does not rely on specific DSL solutions. It also supports seamless integration with existing internal R&D facilities to accelerate the efficiency of model-based business R&D.

In the follow-up, we will continue to bring further technical sharing on cloud music low-code capability building.

This article is published from the NetEase Cloud Music technical team, and any form of reprinting of the article is prohibited without authorization. We recruit various technical positions all year round. If you are ready to change jobs and happen to like cloud music, then join us at grp.music-fe(at)corp.netease.com!

云音乐技术团队
3.6k 声望3.5k 粉丝

网易云音乐技术团队