Mobile Development 7 min read

Fair 2.0: An Open‑Source Dynamic Logic Framework for Flutter – Overview and Architecture

Fair 2.0 is an open‑source Flutter dynamic framework that enhances logic dynamicization, offering a compiler to transform Dart files into DSL and JS, with detailed architecture, comparisons to MXFlutter and Kraken, and a series of upcoming technical articles.

58 Tech
58 Tech
58 Tech
Fair 2.0: An Open‑Source Dynamic Logic Framework for Flutter – Overview and Architecture

Project Name: Fair 2.0

GitHub: https://github.com/wuba/fair

Fair is a dynamic framework designed for Flutter. Fair 2.0 addresses the insufficient logic‑dynamic capabilities of Fair 1.0 by providing a Fair Compiler that converts Dart source files into layout DSL and logic JS, enabling runtime widget updates without a full app release.

Series Announcement

Detailed design and principle articles will be released twice a week (Tuesday and Thursday). Planned titles include:

《Fair 逻辑动态化架构设计与实现》

《Fair 逻辑动态化通信实现》

《Fair 下发产物-布局DSL生成原理》

《Fair 下发产物-逻辑JS生成原理》

《Fair 逻辑语法糖设计与实现》

《Fair 2.0 在安居拍房App落地实践》

《Fair 热更新设计与实现》

《Flutter 动态化项目评测》

Logic Dynamicization Background

Fair provides a low‑cost solution for Flutter dynamic updates. The project extracts layout‑related DSL and logic‑related JS from Dart files; the DSL is built dynamically as in Fair 1.0, while the JS runs in JScore and returns results to the Dart side for data binding.

Architecture Comparison

Compared with MXFlutter and Kraken, which build a JS‑centric widget and engine layer, Fair’s architecture consists of two parts: the same runtime environment as Kraken/MXFlutter, and the Fair Compiler that produces DSL and JS artifacts.

In Fair, widget construction, data binding, and basic logic (if, List, Map, etc.) remain in the Dart domain; the JS side only handles primitive data types, calculations, and method calls.

Logical Capability Composition

Fair uses its own syntax sugar and layout helper methods to provide basic logical processing on the Dart side. The logical capability diagram is illustrated in the accompanying images.

Project Information

Promoter: 58 Technology Committee Open‑Source Team, driving open‑source culture across 58 Group.

Members: Liu Yang, Wang Haijun, Lin Leyang, Bu Jie, Luo Zhenglong, Ke Chao, Shan Pengtao, Li Hao, Zhao Qian, Chen Youyu, Liu Chao, Xie Xiongliang, Sun Zhe.

Community & Interaction

Join the Fair 2.0 WeChat group or contact the 58 Tech Assistant (WeChat ID: jishu-58) for more information, discussions, and giveaways.

For any questions or feedback, leave a comment; selected comments may receive prizes.

FlutterMobile DevelopmentOpen SourceDynamic FrameworkFAIRLogic Dynamicization
58 Tech
Written by

58 Tech

Official tech channel of 58, a platform for tech innovation, sharing, and communication.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.