Junjie Dong

Lead of the Xiaomi Vela Native Framework

A senior C/C++ software engineer with 20 years of experience. Early in his career, he contributed to the development of the well-known Chinese open-source software MiniGUI. After joining Xiaomi, he was deeply involved in the development of MIUI, Quick Apps, and the Xiaomi Vela system. He has in-depth knowledge of popular GUI frameworks such as Flutter, LVGL, and MiniGUI, and has extensively studied virtual machine technologies including ART, V8, QuickJS, and WebAssembly.

Topic

The Application, Experience, and Prospects of C++ in Xiaomi Vela

This talk draws on practical experience with Quick Apps in Xiaomi Vela to share lessons learned, insights, and future perspectives on using C++ in Xiaomi Vela development. It focuses on two main points: first, the advantages and characteristics of C++ in design patterns and module abstraction, illustrating effective architecture design methods and techniques through the Quick Apps framework; second, the use of C++ smart pointers in conjunction with asynchronous programming to demonstrate how to write safe and maintainable C++ code. Additional topics include C++ coding styles, interoperability with C, and reflections on C++ and Rust development. Outline: 1. Use of C++ in Xiaomi Vela: versions, compilation, and constraints 2. Construction and destruction of static and global C++ objects in Xiaomi Vela 3. Common design patterns in Xiaomi Vela (Factory, Observer, Mediator, etc.) 4. Simplifying complexity: applying design patterns with Quick Apps package management (2–3 pages) 5. Effective use of smart pointers: techniques for safe C++ development 6. Using C++ shared_ptr with MessageLoop 7. Managing C++ object lifecycles with asynchronous programming: unique_ptr, raw pointers, and weak references 8. Interoperability with C: overlapping encapsulation of C and C++ code 9. Reflections on C++ coding style 10. C++ and Rust: personal perspectives on the future development of C++

© boolan.com 博览 版权所有

沪ICP备15014563号

沪公网安备31011502003949号