跪拜 Guibai
← Back to the summary

How Six Major Platforms Differ Under the Hood: Android, iOS, Vue, React, Flutter, React Native

1. Android

Layer stacking: Linux kernel → HAL (hardware abstraction layer) → system runtime layer (ART, Bionic libc, OpenGL ES/Vulkan, Media) → application framework layer (AMS/PMS/WMS, View system, ContentProvider) → application layer.

Core mechanisms

Architecture paradigm: four components + Intent decoupling, MVVM/MVI + Repository + unidirectional data flow, Hilt/Koin injection, Coroutines/Flow for concurrency, Gradle multi-module + feature modules for physical isolation.

2. iOS

Layer stacking (official four layers): Core OS (Darwin/XNU, filesystem, security) → Core Services (Foundation, CoreFoundation, CoreLocation) → Media (Core Graphics, Core Animation, AVFoundation) → Cocoa Touch (UIKit, SwiftUI) → application layer.

Core mechanisms

Architecture paradigm: MVC is the historical main line; real projects commonly use MVVM / Coordinator / unidirectional data flow (Combine or AsyncSequence); modularization uses SPM / CocoaPods; SwiftUI is a declarative system based on value types and protocols, uses Environment for injection, and holds state hierarchically with @State/@StateObject.

3. Vue

Three layers: reactivity system (Reactivity) + runtime (Runtime) + compiler (Compiler). This is the fundamental division between Vue and React — Vue has a compiler participating in optimization, React relies on runtime scheduling.

Core mechanisms

Architecture paradigm: official family bucket with clear responsibilities — Vue handles views, Vue Router handles routing, Pinia handles state, Vite handles build, Nuxt handles server-side. Layering usually is view / business composables / data access, with provide-inject for cross-layer dependencies.

4. React

Three layers (React 18): Scheduler + Reconciler + Renderer. The renderer is pluggable (react-dom, react-native, custom renderers), which is why React can run one core across multiple targets.

Core mechanisms

Architecture paradigm: React only provides the core; everything else comes from the community — Router, state (Redux/Zustand), build (Vite), meta-frameworks (Next.js). Unidirectional data flow + immutable data, container/presentational separation, Suspense brings async data into the rendering flow.

5. Flutter

Three layers: Framework (Dart: Widgets / Material / Cupertino / Rendering / Animation / Painting) + Engine (C++: Skia or Impeller, Dart VM, text layout, platform channels) + Embedder (platform native shell handling window, lifecycle, input).

Core mechanisms

Architecture paradigm: official state management only offers InheritedWidget/Provider; community is split among Riverpod / Bloc / GetX; native interop goes through MethodChannel / EventChannel / FFI; layering usually is presentation / domain / data + Repository.

6. React Native

Core mechanisms: must be split into old and new architecture or conclusions go stale.

Old architecture (Bridge)

New architecture (stable now)

Architecture paradigm: component model is fully isomorphic with React (Hooks, unidirectional data flow); differences only lie in host components and native modules; projects typically pair React Navigation + Redux/Zustand, and still need Kotlin/Swift native modules as a fallback.

Side-by-side comparison

Dimension Android iOS Vue React Flutter RN (new arch)
Rendering ownership system View + SurfaceFlinger UIKit + separate Render Server browser DOM browser DOM (swappable renderer) self-drawn Skia/Impeller native views + Fabric
UI paradigm imperative → Compose declarative UIKit imperative / SwiftUI declarative declarative + reactive tracking declarative + Fiber scheduling declarative three trees declarative + React isomorphism
Update mechanism message loop per frame RunLoop + CA transactions Proxy dependency collection, microtask batch flush Lane priorities + interruptible rendering single-frame build + element reuse JS scheduling + Fabric commit
Layout two-pass Measure/Layout AutoLayout / manual frames CSS layout engine CSS layout engine single-pass constraint propagation Yoga single-pass Flexbox
Threads/IPC Binder + main thread Looper Mach/XPC + GCD queues single-thread event loop (Worker) same as left UI/Raster/IO + isolate JS/UI/native, JSI synchronous
Ecosystem concentration official framework + Jetpack official framework + SPM official family bucket core + community choice unified official SDK community-first, native fallback

One-line summary