Why Alibaba Chooses Flutter: Core Principles, Industry Trends, and AliFlutter Deep Dives
Alibaba’s AliFlutter guide explains Flutter’s core principles—its aesthetic, efficiency, performance, and openness—details why Alibaba adopts it across diverse platforms, surveys its industry adoption, and showcases deep internal practices including custom engine services, private Pub repositories, optimization techniques, and future multi‑platform development strategies.
Introduction
Flutter is an open‑source UI toolkit that enables developers to build beautiful, high‑performance applications for mobile, web, desktop, and embedded platforms from a single codebase. Its widget‑based, reactive framework underpins the UI construction.
Flutter Principles
Beauty : Rich widget library (animations, gestures) and compositional API give developers pixel‑level control.
Efficiency : Similar to a lightweight Android system, Flutter runs on all platforms with hot‑reload in debug mode for rapid development.
Performance : Release builds are ahead‑of‑time compiled to native machine code.
Openness : Fully open source, with all work visible on GitHub.
The architecture sits on top of the OS. At the lowest level is the platform‑specific Embedder handling surface, threads, and the event loop. Above it is the Engine (Dart runtime, Skia graphics, text layout). The top layer is the Dart Framework , which developers use to create apps.
Why Alibaba Chooses Flutter
Alibaba’s e‑commerce ecosystem demands excellent user experience, high development efficiency, and consistency across many devices (iOS, Android, DingTalk desktop, IoT, large‑screen displays). Flutter’s high performance, rapid development, cross‑platform consistency, and expressive UI meet these needs, especially for interactive, game‑like experiences.
Industry Landscape
Within Alibaba, dozens of products across many business units (Taobao, Xianyu, UC, Youku) use Flutter. Externally, major companies such as Tencent (WeChat, Now Live), ByteDance (Xigua Video, Pipi Shrimp), Kuaishou (Kwai), Meituan (Rider, Delivery, Crowd‑source), and Baidu (Tieba) have also adopted Flutter.
Industry practice focuses on systematization (infrastructure), depth (engine size, memory, startup), frameworks (hybrid stack, state management, dynamic UI, AOP, plugins), and explorations beyond native Flutter (mini‑program rendering, front‑back integration).
AliFlutter Construction and Deep Practice
Business Practice
Typical scenarios include complex product‑detail pages with mixed text, images, and video, as well as game‑style pages (e.g., Hema’s game page). Flutter is used for main‑line and order pages across Alibaba applications.
Development Model
Flutter solves logic and UI but lacks native capabilities (network, push, gateway). Alibaba adds these via custom libraries, state‑management frameworks, game frameworks, dynamic UI, component libraries, and tooling (build, lint, Pub).
Engine Development Model
Custom engine work addresses platform‑specific issues (GPU crashes on iOS < 13, startup crashes on certain Android devices) and integrates Alibaba’s native libraries (image, network). Modifications are built, reviewed in GitLab CI, and deployed as services.
Infrastructure
Custom Engine Service : Developers set an environment variable to query the service for a matching engine artifact; if unavailable, the official engine is fetched. The service supports multi‑team namespace management.
Private Pub Service : Replaces Google‑cloud‑dependent Pub with an internal repository backed by Alibaba Cloud OSS and a metadata database for package storage, download tracking, and health monitoring.
Continuous Build : Scripts package Flutter code into Pods or Gradle artifacts for integration into apps without a full Flutter environment.
Deep Practices
Image Library Optimization : Modified Flutter’s image library to reduce memory and CPU usage, aligning with Alibaba’s internal image system for better performance and usability.
Engine Size Optimization : Trimmed unnecessary libraries, demonstrated by flame‑graph comparisons showing reduced engine size while preserving functionality.
Large‑Image GC Optimization : Provided a GC API (Shell → Engine → RuntimeController → Dart NotifyGC) to release memory of large images on app exit.
Flutter Canvas Practice : Exposed Skia’s Canvas APIs to Dart, enabling 2D/3D graphics similar to web pipelines; currently in gray‑scale testing with positive results.
AOP Framework (AspectD) : Built on Dart’s dill intermediate representation; wraps original app code with aspect logic, enabling annotation‑driven transformations at the dill level.
R&D Model Exploration
Focuses on cross‑platform capability (standardized APIs for multiple platforms), interaction ability (game‑engine‑style development), development efficiency (cloud‑based decoupled builds), and delivery efficiency (dynamic UI, Web‑on‑Flutter).
Future Outlook
Alibaba plans to enhance cross‑platform APIs, expand game‑like interactive features, streamline engineering workflows with cloud‑native integration, and improve dynamic UI delivery.
Conclusion
The article covered Flutter’s core principles, Alibaba’s motivations for adopting Flutter, the current industry landscape, AliFlutter’s construction and deep practices, and future R&D directions.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Alibaba Cloud Developer
Alibaba's official tech channel, featuring all of its technology innovations.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
