Android Modular Development with the Spider Framework
The article presents an in‑depth technical overview of Qunar's Spider framework for Android modular development, describing its component model, architecture, development workflow, performance benefits, comparison with other dynamic‑loading solutions, and step‑by‑step guidance for building and releasing Spider‑based apps.
The Qunar Technical Carnival introduced the Spider framework, an Android modular development solution originally created to solve dynamic loading and now serving as a comprehensive toolbox for client development.
Spider organizes each functional unit as an "Atom" managed by an AtomManager; each Atom contains a custom ClassLoader for loading its dex files and a ResourcesManager for handling its resources such as layouts and themes.
Atoms are classified as business components or library components, enabling complete decoupling through scheme‑based communication and allowing reusable code to be accessed directly, while both component types can depend on standard JAR or AAR packages.
The SpiderApp architecture consists of layers including Android Runtime, Spider Runtime, optional base libraries, library Atoms, and reusable business Atoms, illustrating how components can be mixed (e.g., a hotel client can embed a ticket‑booking Atom).
Adopting Spider brings several workflow advantages: teams gain independent development and release cycles, a train‑style release model speeds up builds (10× faster development, 4× faster release), and code and release permissions are fully separated.
A comparison with other dynamic‑loading frameworks highlights Spider's on‑demand loading, dependency chain support, and distinct handling of library versus business component dependencies.
Key benefits of Spider's dynamic loading include automatic loading upon class or URI usage and flexible dependency specifications for both library and business components.
Practical examples include the Qunar bus‑ticket and train‑ticket apps, with download links provided, demonstrating that a single developer can create a feature‑rich client in roughly three days.
The quick‑start guide outlines three steps: obtain a template project and set the launch URL, select required library and business components, and trigger a cloud build to generate the APK; developers can then create custom components following standard Android conventions.
Additional resources such as QR codes and the official WeChat public account are offered for deeper exploration of the Spider framework.
Ctrip Technology
Official Ctrip Technology account, sharing and discussing growth.
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.