docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
This commit is contained in:
@@ -0,0 +1,219 @@
|
||||
---
|
||||
id: wiki-2026-0508-크로스-플랫폼-기술-cross-platform-techno
|
||||
title: 크로스 플랫폼 기술(Cross-Platform Technology)
|
||||
category: 10_Wiki/Topics
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [Cross-Platform, Multi-platform Development]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [cross-platform, mobile, desktop, architecture]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: TypeScript / Kotlin / Dart
|
||||
framework: React Native / Flutter / KMP / Tauri
|
||||
---
|
||||
|
||||
# 크로스 플랫폼 기술(Cross-Platform Technology)
|
||||
|
||||
## 매 한 줄
|
||||
> **"매 single codebase 의 iOS + Android + Web + Desktop 의 ship — 매 native 의 90% performance, 매 dev cost 의 50%."**. 매 1990s Java 의 "Write Once Run Anywhere" 의 promise 부터 매 2026 의 mature stack — Flutter 4, React Native New Arch, KMP 의 stable, Tauri 2 — 의 production scale.
|
||||
|
||||
## 매 핵심
|
||||
|
||||
### 매 stack 분류
|
||||
- **Hybrid web**: Cordova, Ionic — 매 WebView 의 wrap (legacy).
|
||||
- **JS bridge**: React Native (Old Arch) — 매 message passing.
|
||||
- **Native bindings**: React Native New Arch (JSI), NativeScript — 매 direct call.
|
||||
- **Custom rendering**: Flutter (Skia / Impeller) — 매 framework 의 own pixel.
|
||||
- **Compile-to-native**: KMP, MAUI, Compose Multiplatform — 매 platform UI 의 native.
|
||||
- **Web-on-desktop**: Electron, Tauri — 매 web → desktop.
|
||||
|
||||
### 매 trade-off axis
|
||||
- **Performance**: 매 native > Flutter ≈ RN-NewArch > RN-OldArch > WebView.
|
||||
- **Bundle size**: 매 KMP / Tauri (small) << Flutter (15MB+) << Electron (100MB+).
|
||||
- **UI fidelity**: 매 native (perfect) > KMP-Compose > Flutter (custom) > RN (mixed) > Web (loose).
|
||||
- **Dev velocity**: 매 Flutter ≈ RN > KMP > native.
|
||||
- **Hot reload**: 매 Flutter / RN (instant) > KMP / Tauri (slow) > native (none).
|
||||
|
||||
### 매 응용
|
||||
1. **Mobile app**: 매 RN / Flutter 의 Instagram, Airbnb, BMW, Wonolo.
|
||||
2. **Desktop**: 매 Tauri 의 Spotify-class, Electron 의 VSCode.
|
||||
3. **Multi-target**: 매 KMP 의 shared business logic + native UI.
|
||||
|
||||
## 💻 패턴
|
||||
|
||||
### React Native (New Architecture)
|
||||
```tsx
|
||||
// 매 Fabric renderer + TurboModules
|
||||
import { TurboModuleRegistry } from 'react-native';
|
||||
|
||||
interface Spec {
|
||||
multiply(a: number, b: number): number;
|
||||
}
|
||||
|
||||
const NativeMath = TurboModuleRegistry.getEnforcing<Spec>('NativeMath');
|
||||
|
||||
export default function App() {
|
||||
return <Text>{NativeMath.multiply(3, 4)}</Text>;
|
||||
}
|
||||
```
|
||||
|
||||
### Flutter 4
|
||||
```dart
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text('Cross-platform')),
|
||||
body: const Center(child: Text('Hello')),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Kotlin Multiplatform (KMP)
|
||||
```kotlin
|
||||
// shared/src/commonMain/kotlin/Repository.kt
|
||||
class Repository {
|
||||
suspend fun fetchUser(id: String): User {
|
||||
return httpClient.get("https://api/users/$id").body()
|
||||
}
|
||||
}
|
||||
|
||||
// androidApp — 매 Compose
|
||||
@Composable
|
||||
fun UserScreen(repo: Repository) { /* ... */ }
|
||||
|
||||
// iosApp — 매 SwiftUI
|
||||
struct UserView: View {
|
||||
let repo: Repository
|
||||
var body: some View { /* ... */ }
|
||||
}
|
||||
```
|
||||
|
||||
### Tauri 2 (Rust + web)
|
||||
```rust
|
||||
// src-tauri/src/main.rs
|
||||
#[tauri::command]
|
||||
fn greet(name: &str) -> String {
|
||||
format!("Hello, {}!", name)
|
||||
}
|
||||
|
||||
fn main() {
|
||||
tauri::Builder::default()
|
||||
.invoke_handler(tauri::generate_handler![greet])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error");
|
||||
}
|
||||
```
|
||||
|
||||
```ts
|
||||
// src/App.tsx
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
|
||||
const msg = await invoke<string>('greet', { name: 'World' });
|
||||
```
|
||||
|
||||
### Compose Multiplatform
|
||||
```kotlin
|
||||
// commonMain
|
||||
@Composable
|
||||
fun App() {
|
||||
var count by remember { mutableStateOf(0) }
|
||||
Button(onClick = { count++ }) {
|
||||
Text("Clicked $count times")
|
||||
}
|
||||
}
|
||||
|
||||
// iOS, Android, Desktop, Web — 매 same code
|
||||
```
|
||||
|
||||
### Platform-specific code (RN)
|
||||
```tsx
|
||||
import { Platform } from 'react-native';
|
||||
|
||||
const styles = {
|
||||
shadow: Platform.select({
|
||||
ios: { shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.2 },
|
||||
android: { elevation: 4 },
|
||||
}),
|
||||
};
|
||||
```
|
||||
|
||||
### Capacitor (web → mobile)
|
||||
```ts
|
||||
import { Camera, CameraResultType } from '@capacitor/camera';
|
||||
|
||||
const photo = await Camera.getPhoto({
|
||||
quality: 90,
|
||||
allowEditing: false,
|
||||
resultType: CameraResultType.Uri,
|
||||
});
|
||||
```
|
||||
|
||||
### Expo Router (RN file-based)
|
||||
```tsx
|
||||
// app/(tabs)/home.tsx
|
||||
import { Stack } from 'expo-router';
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<>
|
||||
<Stack.Screen options={{ title: 'Home' }} />
|
||||
<View><Text>Hello</Text></View>
|
||||
</>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| 매 mobile-first startup | Expo (React Native) |
|
||||
| 매 design-heavy app | Flutter |
|
||||
| 매 native-feel + shared logic | Kotlin Multiplatform |
|
||||
| 매 desktop app | Tauri 2 (small) / Electron (legacy) |
|
||||
| 매 enterprise + Windows-first | .NET MAUI |
|
||||
| 매 web-existing → mobile | Capacitor |
|
||||
| 매 game | Unity / Unreal / Godot |
|
||||
|
||||
**기본값**: 매 mobile — Expo (RN). 매 design-heavy — Flutter. 매 desktop — Tauri 2.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Software Architecture]]
|
||||
- 변형: [[React Native]] · [[Flutter]] · [[Kotlin Multiplatform]] · [[Tauri]]
|
||||
- 응용: [[Mobile-First]]
|
||||
- Adjacent: [[Skia]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: 매 stack selection 의 trade-off 의 explanation, 매 platform-specific code 의 generation, 매 migration plan 의 brainstorm.
|
||||
**언제 X**: 매 perf-critical native API integration — 매 platform docs + native dev 의 우선.
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **One-size-fits-all UI**: 매 iOS 와 Android 의 동일 UX — 매 platform convention 의 ignore.
|
||||
- **WebView for everything**: 매 native feel 의 손실 — 매 60fps scroll 의 어려움.
|
||||
- **No platform testing**: 매 iOS 만 test — 매 Android 의 quirks 의 발견 누락.
|
||||
- **Bridge bloat (RN Old Arch)**: 매 high-frequency message — 매 New Arch (JSI) 의 migrate.
|
||||
- **Shared UI 의 over-share**: 매 Flutter 의 Cupertino + Material 의 mix — 매 either 의 commit.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Flutter 4 release, RN New Architecture docs, KMP stable announcement, Tauri 2 docs).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — cross-platform stack matrix + RN/Flutter/KMP/Tauri patterns |
|
||||
Reference in New Issue
Block a user