Installation
Install the package with your preferred package manager
선호하는 패키지 매니저로 패키지를 설치하세요
Demo example
DEMO EXAMPLE
데모 예제
Architecture Overview
Understanding simple-boot-front's component-based SPA architecture
simple-boot-front의 컴포넌트 기반 SPA 아키텍처 이해하기
Core Architecture
Built on top of simple-boot and dom-render for enterprise-grade SPAs
엔터프라이즈급 SPA를 위해 simple-boot와 dom-render 위에 구축
graph TB A[SimpleBootFront] -->|Extends| B[SimpleApplication] A -->|Uses| C[DomRender] A -->|Manages| D[Router] B -->|DI Container| E[SimstanceManager] C -->|Reactivity| F[Proxy System] D -->|Navigation| G[PathRouter/HashRouter] H[Component] -->|Decorated with| I[Component Decorator] H -->|Extends| J[ComponentBase] J -->|Implements| K[Lifecycle Hooks] L[RouterComponent] -->|Extends| M[ComponentRouterBase] M -->|Route Config| N[Router Decorator] style A fill:#e1f5ff style B fill:#fff4e6 style C fill:#f3e8ff style D fill:#dcfce7 style H fill:#fef3c7 linkStyle default stroke:#aaaaaa,stroke-width:2px
Component Lifecycle
How components are created, rendered, and destroyed
컴포넌트가 생성, 렌더링, 파괴되는 방식
sequenceDiagram participant App as SimpleBootFront participant DI as DI Container participant Comp as Component participant DOM as DomRender participant UI as Browser DOM App->>DI: run() DI->>Comp: Create instance Comp->>Comp: constructor() Comp->>Comp: onInitRender() Comp->>DOM: Render template DOM->>DOM: Parse template DOM->>DOM: Apply reactivity DOM->>UI: Mount to DOM Comp->>Comp: onCreateRendered() Note over Comp,UI: Component Active App->>Comp: Route change Comp->>Comp: onDestroyRender() Comp->>DOM: Cleanup DOM->>UI: Remove from DOM
SPA Routing
Client-side routing with component-based navigation
컴포넌트 기반 내비게이션을 통한 클라이언트 사이드 라우팅
sequenceDiagram participant User participant Router participant RM as RouterManager participant RC as RouterComponent participant Page as PageComponent User->>Router: Navigate to /users Router->>RM: Match route pattern RM->>RC: Find route config RC->>Page: Load UserPageComponent Page->>Page: onInitRender() Page->>User: Render page User->>Router: Navigate to /users/123 Router->>RM: Extract params (:id) RM->>Page: Load with params Page->>Page: onRouting(params) Page->>User: Render with data
Component Tree
Hierarchical component structure and composition
계층적 컴포넌트 구조 및 구성
graph TD A[RouterComponent] --> B[HomePageComponent] A --> C[UserPageComponent] A --> D[AboutPageComponent] B --> E[HeaderComponent] B --> F[ItemComponent] B --> G[FooterComponent] C --> E C --> H[UserListComponent] C --> I[ProfileComponent] H --> J[UserCardComponent] H --> J H --> J style A fill:#e1f5ff style B fill:#dcfce7 style C fill:#dcfce7 style D fill:#dcfce7 style F fill:#fef3c7 linkStyle default stroke:#aaaaaa,stroke-width:2px
Getting Started
Quick start with basic application setup
기본 애플리케이션 설정으로 빠르게 시작하기
Basic Application Setup
Create a minimal SPA with router
라우터를 사용한 최소 SPA 생성
Router Component
Define routes and map paths to components
라우트를 정의하고 경로를 컴포넌트에 매핑
Router Configuration
Create root router with route definitions
라우트 정의로 루트 라우터 생성
Router Template
Template with navigation and route outlet
내비게이션과 라우트 아웃렛이 있는 템플릿
Page Components
Create page components for each route
각 라우트에 대한 페이지 컴포넌트 생성
Home Page Component
Simple page with lifecycle hooks and reactive data
생명주기 훅과 반응형 데이터가 있는 간단한 페이지
User Page with Router Params
Access route parameters in page component
페이지 컴포넌트에서 라우트 매개변수 접근
Reusable Components
Create custom reusable components with selectors
셀렉터로 재사용 가능한 커스텀 컴포넌트 생성
Item Component
Reusable component with custom selector
커스텀 셀렉터가 있는 재사용 가능 컴포넌트
Profile Component
Component with props and events
속성과 이벤트가 있는 컴포넌트
Component Registration
Register and share components across the application
애플리케이션 전체에서 컴포넌트 등록 및 공유
Using Components in Router
Register components for use in templates
템플릿에서 사용할 컴포넌트 등록
Services
Injectable services for business logic and state management
비즈니스 로직과 상태 관리를 위한 주입 가능한 서비스
User Service Example
Create and inject services in components
컴포넌트에서 서비스 생성 및 주입
URL Types
Choose between hash-based and path-based routing
해시 기반 및 경로 기반 라우팅 중 선택
Hash vs Path Routing
Configure URL strategy for your application
애플리케이션의 URL 전략 구성