Guests | in jia (heart)
Edit | Tina
Xianyu introduced Flutter in 2017, when Flutter was far from mature and there was no precedent in the industry for the development of Flutter into an existing engineering system.
Later, the team of less than 15 people made innovations in the engineering architecture, mixed stack call, package build, and collaborative mode to ensure that Flutter could be integrated into the existing client engineering system of Flutter. Between 2017 and 2019, Xianyu has also been working on Bug fixes to improve Flutter stability and synchronizing them with Google. In practice, xianyu has developed its own hybrid technology solution to open source the Flutter Boost engine.
In 2019, Xianyu began to land on a large scale, promoting the application of Flutter in Xianyu. By 2020, the main link on the idle fishing line has almost fully embraced Flutter. In the past two years, Flutter has also gradually landed in other enterprises, but at the same time, doubts have been raised constantly. There are even rumors that “Idle Fish’s new business has given up Flutter” and “it is believed that Idle Fish has encountered great problems”……
So, as a trailblazer and pathfinder of Flutter, has the Idle fish taken a wrong turn in his fumbling over the past few years? What kind of challenges are idle fish facing now? Will you abandon Flutter? What technology did the new business choose? What are the corresponding technology selection principles? In view of these questions, Yu Jia (Zongxin), the client manager of Xianyu Technology team, gave us answers one by one.
The first team in the country to introduce Flutter
InfoQ: What was the main problem that Xianyu was trying to solve when it introduced Flutter?
Yu Jia (Zongxin) : When Xianyu did research in 2017, the client team only had less than 15 people, and the business scene of Xianyu can be regarded as a “small Taobao”, which is relatively complex. In this scenario, the first thing we need to solve is the problem of multi-terminal manpower sharing. The benefit of having multiple people is not only that one person can work on both sides of the game, but also that it represents greater flexibility in allocating r&d resources (meaning that the team no longer needs to have a 1:1 ratio of iOS to Android, which has a much larger engineer base than iOS).
In addition, we hope that this technology is compatible with the mobile r&d technology stack, rather than the front-end technology stack. For RN and Weex, toolchain and r&d habits are quite different. Finally, we hope that the experience of this technology can be close to the original. Flutter under AOT basically meets our requirements at that time. In the actual testing process, Flutter also performs better than Native on low-end computers without in-depth optimization of the detail page. Therefore, Flutter was selected based on these three conditions.
The whole infrastructure and exploration came at a cost during the 2018 trial. In 2019, the team began to use Flutter in a large number of applications. Currently, 70% of the team’s commitments have come from Dart, which is basically what we had hoped for. In the actual research and development process, the goal of one client input can be basically completed.
InfoQ: Many people have questioned Dart as a niche language with issues such as multi-layer nesting. What do you think of the new language?
Yu Jia (Zongxin) : Language is one of the factors in our choice of technical solutions, but it is a relatively weak factor.
We’ll look at it from several angles:
-
Language background: From our perspective, Dart is developed by DACHang and has a long history.
-
Dart costs are relatively low in terms of grammar sugar and learning curve. First of all, Android students have a fast learning rate. In addition, iOS students who are familiar with Swift also get used to it quickly. Many features of modern languages are common. That’s part of its strength.
-
Other advantages of the language, such as AOT and JIT support for compiled products, are flexible. AOT has significant performance advantages.
-
The future of language. Dart’s Github Pull Request for THE fourth quarter of 2020 ranked 13th on the web, ahead of Kotlin (15th), Swift (16th), and Objective-C (18th). As a new language in mobile technology, the growth is very good.
Problems like multi-layer nesting, which can be solved by abstracting some control classes or methods further, are not particularly big.
InfoQ: What are the key innovations that Idle Fish has made since Flutter was introduced? What are the benefits of using Flutter?
Yu Jia (Zongxin) : Xianyu has made a lot of innovations in this part and has applied for many internal patents.
-
Our open source project, Flutter Boost, has completely changed some of Flutter’s official roadmaps. At present Add2ExistApp is the most mainstream research and development method in the industry. On the one hand, mixed development helps smooth business migration to the new technology stack; on the other hand, it can make better use of the existing Native capabilities and greatly reduce the work of repeated development.
-
The external texture solution for audio and video is also a common solution for major manufacturers in the industry. Under the external texture solution, the cache management of Native and Flutter side is unified, and the performance is also improved to some extent.
-
The Flutter APM, based on the performance and stability data collection and processing solutions of the Flutter technology stack, is currently jointly built with several BU within the Group to provide services for the large AliFlutter organization.
-
The dynamic template solution for Flutter, Flutter DX, is compatible with the group’s existing Native template, which ensures smooth business migration and provides some business dynamics for Flutter.
-
There are many others, including PowerScrollView, an internal high-performance long list container, Fish-Lottie animation framework, and Candy, a game engine. We now have some new directions on Flutter, and we have invested in Flutter based development processes and tools. In the future, if you are interested, please come to InfoQ’s industry conference to talk to us.
Have idle fish ever thought about giving up Flutter?
InfoQ: What are the biggest challenges you have faced with Flutter development in the last year or two? Is it the same as the original challenge with Flutter?
Yu Jia (Zongxin) : In the early years, xianyu was the pioneer of the whole industry, but the main challenge was that the whole technology ecology was too poor, so we had to do it ourselves. The other is that the stability of the early engine has a relatively big problem.
In recent years, with the in-depth use of the whole technology and the rapid development of Xianyu’s business in the past two years, more and more experience problems have been mentioned. Therefore, we have carried out a major revision of the whole product since last year. At the same time, the goal of the client is to comprehensively optimize and create a better user experience.
Therefore, as the ecosystem improves, our challenge is how to achieve a more refined user experience with Flutter. Last year, we did pay more attention to this part. Based on this proposition, we have also developed many detection tools based on Flutter in memory and caton. There are also some specific methods for memory optimization and caton optimization. However, it has to be said that all details of Flutter optimization are labor-intensive, and considerable efforts should be put into both Native and Flutter. Therefore, we are also recruiting clients from all industries. I hope students who are interested in exploring the Flutter field can contact me.
InfoQ: Under the hybrid development system, Xianyu also customizes the engine. What are the main issues with the official solution? Is mixed development too complex for the average small business?
Yu Jia (Zongxin) : In the early stage of Xianyu, there were a lot of actions to modify the engine. I have some reflections on that time. On the one hand, Flutter was not perfect enough. This also indirectly led to a lot of our engine customization modification is difficult to fit the main stem.
So what I want to say in this part is that the current official solution can solve 90% of the problems, if you have to say customization, there are still some problems in the performance side. For example, Flutter is still not used by Native on the homepage of Xianyu, because of the poor startup and loading experience after the replacement. In addition, we have been criticized for the lag in the long list. We have tried to solve part of the problem through the upper framework, and we may need the help of the underlying engine for optimization. Other issues, including inconsistent double-ended fonts and inconsistent input field experience, require official long-term optimization.
At present, we mainly want to follow the main branch and not change the Flutter code as much as possible. The Idle Fish team will reserve some experts on the engine side and also rely on the group AliFlutter ecosystem. In the whole AliFlutter organization, different BU are also good at different things. For example, UC students are better at engine customization, Xianyu team has a large number of upper application frameworks, and Taobao team provides relevant infrastructure based on construction. Most of the problems can be solved in large companies through internal open source communities.
For small and medium-sized enterprises, we should make clear the scene we are facing. If the early rapid iteration runs, we can compromise some details. Flutter is a relatively clear path. The environment we are in today is much more perfect than that of idle fish. It is recommended to use Flutter Boost for hybrid development. In some scenarios, when problems cannot be quickly responded, native can also be used for hybrid engineering. In terms of complexity, the overall complexity is average with the simple introduction of hybrid stack capability.
InfoQ: It is rumored that There is a new business of Idle Fish that does not adopt Flutter, which makes many people think that Idle Fish has abandoned Flutter. What factors have you considered in selecting the technology of the new business?
Yu Jia (Zongxin) : As a technical decision maker, we should avoid being kidnapped by a certain technology and producing fallacies in the landing process. Flutter, like any other technology, is ultimately designed to help teams achieve business value, and it is only a technology on mobile. Criticism and abuse are not appropriate. That’s why I especially don’t want to respond to this in public, because the technology itself depends on the scenario.
From the current idle fish scale of personnel and business scale. For architectural design, my philosophy is to pursue consistency and simplicity of architecture as much as possible.
The future of the entire client organization is Dart First from the perspective of language, minimizing the investment in dual-end R&D. The selection of other containers is mainly BASED on H5. In the future path, the access of other containers will be reduced as far as possible, so that the front-end development will return to the standard route.
There are two benefits:
-
Organization cost is the lowest, which includes students’ learning cost and collaboration cost, etc. Multiple technology stacks and containers will bring additional cost, which I do not want to see.
-
Consistency of architecture contributes to r&d performance and quality. For example, as business complexity increases, the memory surge and package size problems associated with multiple containers are deadly and almost unsolvable, requiring the architect to make decisions about what to kill and what to keep. When it comes to r&d efficiency, supporting tools and processes must be expanded around a kind of container and language. If there are too many solutions, additional supporting facilities need to be built in each direction, resulting in low cost and income and low happiness of R&D.
From this design point of view, we had a few clear choices:
-
Use Flutter as the preferred solution in default scenarios.
-
Use H5 as the preferred implementation scheme in launch activities, front desk shopping guide, very uncertain new business, and management background.
-
In rare scenarios, such as the complete SDK with UI support, such as live broadcasting, and the future TV shooting function, SDK also has its OWN UI part. If you want to switch, Native has the lowest cost, so choose Native. In addition, Flutter currently has some performance problems when loading on the home page, so Native is still used. In the long run, it may be directly changed to Flutter with the revision to some extent.
About Future Development
InfoQ: Looking back now after years of using Flutter, which companies and scenarios do you think fit Flutter?
Yu Jia (Zongxin) : At present, it seems that there are several typical scenarios suitable:
-
From the perspective of the organizations of big companies, Ali, Toutiao and Meituan all have relatively perfect Flutter organizations or internal technical communities that can provide some basic services, ensuring that the cost of Flutter infrastructure can be evenly distributed in the initial investment process. In the future implementation process, The business team can focus more on business development and worry less about the cost of potholes filling in the process.
-
Startups of small and medium-sized enterprises can use Flutter to develop their apps if they have insufficient human resources and want to get through the process of online verification first. This situation is also typical in my actual interviews and industry exchanges. This approach can avoid excessive investment in the initial cost and be more flexible in personnel allocation.
-
The other idea is that it hasn’t been tested yet, but logically it should work. In the future, Flutter can be used by some apps that target internal process tools for enterprises and government departments with strong tool attributes. As far as I know, there are many apps with ToB (Meituan merchant side) and ToD (Ele. me rider side) scenarios in the enterprise side. Horizontally, the scenarios are similar, which means that more mid and long tail applications are likely to be the main scenarios for Flutter technology.
InfoQ: What do you think should be urgently improved about Flutter in the future?
Yu Jia (Zongxin) : From my conversations with some front-line developers since The release of Flutter 2.0, Flutter still needs to optimize its cross-end performance and detailed experience. Flutter has done well in the past year in a big strategic direction (across terminals), building on both the PC and Web side, and working with car companies and OS vendors. But there’s still a lot of way to go back to the product experience and developer experience, and a lot of times for a tough business, the experience down to fonts and controls can be a reason not to use the technology. This section hopes the open source community as a whole will see some progress in the New Year. Our students inside AliFlutter, led by the UC kernel team, had a lot of accumulation and PR in this aspect, and a lot of experience improvement in internal engine development. In the future, in AliFlutter, we will not only improve the infrastructure of the whole company, but also pay more attention to the detailed experience and accumulate some best practices for other development students. You will see our latest book in 2 months, welcome to exchange.
InfoQ: Flutter2.0 is coming, will Flutter become the mainstream choice?
Yu Jia (Zongxin) : Can you tell me my judgment about the future of Flutter? On the one hand, Flutter will have a good development in the scenario of multi-terminal operating system fragmentation in the future. Cross-platform itself has a great cost appeal for enterprises, especially Internet companies. But historically, Flutter is just a rendering engine. Even in today’s game development, with the development of game engines and supporting tools, some functional modules (such as community/livestream functions) are still hybrid frameworks, so hybrid development must always exist in the end. I can’t give an answer on whether it will become the mainstream of the whole mobile research and development in the future, but I can be sure that it will become another common technology choice of client research and development in a certain historical stage after the ecosystem is more perfect.
Guest Introduction:
Yu Jia, flower name Zongxin, client leader of Xianyu Technology team. I joined Alibaba after graduation in 2012, and experienced the important period of the group’s wireless transformation. I have participated in the design and development of several heavyweight apps and mobile middleware of the Group, and have been a veteran of client for many years. In 2014, I participated in the iOS client architecture upgrade of Mobile Taobao, which supported the parallel development of a hundred-person team for the first time. In the same year, I led the integration of mobile Tmall client infrastructure and transaction link to Mobile Taobao architecture, laying a solid foundation for mobile Taobao as the wireless center of the future group. In 2015, I joined the Client team of Xianyu in charge of terminal architecture and team construction. During my work, I completed the overall architecture design of Xianyu client based on the hybrid architecture of Flutter, and improved the continuous integration of Flutter and the support of high availability system in engineering system. At the same time, the Flutter of idle fish main link service is promoted. The future will continue to pay attention to the evolution of terminal technology and development trends.