Home / books / learning-larc / diagrams / 12-traditional-vs-larc

Traditional Frameworks vs LARC

Development Workflow Comparison

graph TB
    subgraph Traditional["Traditional Framework (React/Vue/Angular)"]
        T1[Write JSX/Vue Templates]
        T2[Configure webpack/Vite]
        T3[Install dependencies<br/>~300MB node_modules]
        T4[Transpile with Babel]
        T5[Bundle with Webpack]
        T6[Wait for build<br/>30-60 seconds]
        T7[Test in Browser]
        T8[Make Changes]

        T1 --> T2 --> T3 --> T4 --> T5 --> T6 --> T7
        T7 --> T8 --> T4
    end

    Divider[" "]

    subgraph LARC["LARC"]
        L1[Write Web Components]
        L2[Add Import Map]
        L3[Open in Browser<br/>Instant]
        L4[Make Changes]
        L5[Refresh Browser<br/>Instant]

        L1 --> L2 --> L3
        L3 --> L4 --> L5 --> L3
    end

    Traditional --> Divider
    Divider --> LARC

    style T6 fill:#f56565,color:#fff
    style L3 fill:#48bb78,color:#fff
    style L5 fill:#48bb78,color:#fff
    style Divider fill:none,stroke:none

Architecture Complexity

graph TB
    subgraph "Traditional Stack"
        TR1[React/Vue/Angular]
        TR2[Redux/Vuex/NgRx]
        TR3[React Router/Vue Router]
        TR4[Webpack/Vite]
        TR5[Babel]
        TR6[ESLint/Prettier]
        TR7[Testing Library]
        TR8[Build Scripts]

        TR1 --> TR2 & TR3
        TR2 & TR3 --> TR4
        TR4 --> TR5 & TR6
        TR5 --> TR8
        TR7 --> TR8
    end

    subgraph "LARC Stack"
        LC1[Web Components<br/>Browser Native]
        LC2[PAN Bus<br/>~5KB]
        LC3[pan-router<br/>~3KB]
        LC4[Browser<br/>No build tools needed]

        LC1 --> LC2 & LC3
        LC2 & LC3 --> LC4
    end

    style TR1 fill:#f59e42,color:#fff
    style TR4 fill:#f56565,color:#fff
    style LC1 fill:#48bb78,color:#fff
    style LC4 fill:#48bb78,color:#fff

Bundle Size Comparison

graph LR
    subgraph "Framework Bundle Sizes"
        React["React<br/>~45 KB"]
        Redux["+ Redux<br/>~5 KB"]
        Router["+ React Router<br/>~10 KB"]
        Total1["= 60 KB<br/>(before your code)"]

        React --> Redux --> Router --> Total1
    end

    subgraph "LARC Bundle Sizes"
        Core["LARC Core<br/>~5 KB"]
        Pan["PAN Bus<br/>included"]
        Router2["pan-router<br/>~3 KB"]
        Total2["= 8 KB<br/>(before your code)"]

        Core --> Pan --> Router2 --> Total2
    end

    style Total1 fill:#f59e42,color:#fff
    style Total2 fill:#48bb78,color:#fff

Component Syntax Comparison

React Component

graph TB
    RC["React Component"]

    RC --> JSX["JSX Syntax<br/>Needs transpilation"]
    RC --> Hooks["useState, useEffect<br/>Framework-specific"]
    RC --> Props["Props drilling"]
    RC --> VirtualDOM["Virtual DOM<br/>Reconciliation overhead"]

    style JSX fill:#f59e42,color:#fff
    style VirtualDOM fill:#f59e42,color:#fff

LARC Component

graph TB
    LC["LARC Component"]

    LC --> Templates["Template Literals<br/>Native JavaScript"]
    LC --> Lifecycle["Lifecycle Callbacks<br/>Web Standards"]
    LC --> PAN["PAN Bus<br/>Decoupled"]
    LC --> RealDOM["Real DOM<br/>Direct manipulation"]

    style Templates fill:#48bb78,color:#fff
    style Lifecycle fill:#48bb78,color:#fff
    style PAN fill:#48bb78,color:#fff

Learning Curve

graph LR
    subgraph "React Learning Path"
        R1[HTML/CSS/JS] --> R2[JSX]
        R2 --> R3[React Components]
        R3 --> R4[Hooks]
        R4 --> R5[State Management]
        R5 --> R6[Webpack Config]
        R6 --> R7[Build Tools]
        R7 --> R8[Productive]

        R1 -.6-8 weeks.-> R8
    end

    subgraph "LARC Learning Path"
        L1[HTML/CSS/JS] --> L2[Web Components]
        L2 --> L3[PAN Bus]
        L3 --> L4[Productive]

        L1 -.1-2 weeks.-> L4
    end

    style R8 fill:#f59e42,color:#fff
    style L4 fill:#48bb78,color:#fff

State Management Comparison

graph TB
    subgraph "Redux (React)"
        RD1[Actions]
        RD2[Reducers]
        RD3[Store]
        RD4[Connect/useSelector]
        RD5[Middleware]
        RD6[DevTools]

        RD1 --> RD2 --> RD3
        RD3 --> RD4
        RD3 --> RD5
        RD3 --> RD6

        style RD1 fill:#f59e42,color:#fff
        style RD2 fill:#f59e42,color:#fff
        style RD5 fill:#f59e42,color:#fff
    end

    subgraph "LARC State"
        LS1[Local State<br/>Instance properties]
        LS2[Shared State<br/>PAN Bus or pan-store]
        LS3[Persistent<br/>localStorage/IndexedDB]

        style LS1 fill:#48bb78,color:#fff
        style LS2 fill:#48bb78,color:#fff
        style LS3 fill:#48bb78,color:#fff
    end

Tooling Requirements

graph TB
    subgraph "Traditional Requirements"
        TR["Development"]

        TR --> N1[Node.js Required]
        TR --> N2[npm/yarn Required]
        TR --> N3[Webpack/Vite Required]
        TR --> N4[Babel Required]
        TR --> N5[~300MB dependencies]
        TR --> N6[Complex config files]

        style N1 fill:#f59e42,color:#fff
        style N5 fill:#f56565,color:#fff
        style N6 fill:#f56565,color:#fff
    end

    subgraph "LARC Requirements"
        LR["Development"]

        LR --> L1[Browser Only]
        LR --> L2[Text Editor]
        LR --> L3[Local Server<br/>Optional]
        LR --> L4[No dependencies]
        LR --> L5[No configuration]

        style L1 fill:#48bb78,color:#fff
        style L4 fill:#48bb78,color:#fff
        style L5 fill:#48bb78,color:#fff
    end

Performance Characteristics

graph LR
    subgraph "Metrics"
        FCP[First Contentful Paint]
        TTI[Time to Interactive]
        Bundle[Bundle Size]
        Memory[Memory Usage]
    end

    subgraph "React SPA"
        RFCP[~2.5s]
        RTTI[~4.5s]
        RBundle[200-500KB]
        RMem[~50MB]
    end

    subgraph "LARC App"
        LFCP[~1.2s]
        LTTI[~2.0s]
        LBundle[50-150KB]
        LMem[~20MB]
    end

    FCP -.React.-> RFCP
    FCP -.LARC.-> LFCP

    TTI -.React.-> RTTI
    TTI -.LARC.-> LTTI

    Bundle -.React.-> RBundle
    Bundle -.LARC.-> LBundle

    Memory -.React.-> RMem
    Memory -.LARC.-> LMem

    style LFCP fill:#48bb78,color:#fff
    style LTTI fill:#48bb78,color:#fff
    style LBundle fill:#48bb78,color:#fff
    style LMem fill:#48bb78,color:#fff

    style RFCP fill:#f59e42,color:#fff
    style RTTI fill:#f59e42,color:#fff
    style RBundle fill:#f56565,color:#fff

Code Portability

graph TB
    subgraph "React Code"
        RC[React Component]

        RC -.locked to.-> React2[React Ecosystem]
        React2 -.-x Other1[Can't use in Vue]
        React2 -.-x Other2[Can't use in Angular]
        React2 -.-x Other3[Can't use in Vanilla JS]

        style React2 fill:#f56565,color:#fff
    end

    subgraph "LARC Code"
        LC[Web Component]

        LC -.works in.-> React3[React]
        LC -.works in.-> Vue[Vue]
        LC -.works in.-> Angular[Angular]
        LC -.works in.-> Vanilla[Vanilla JS]

        style React3 fill:#48bb78,color:#fff
        style Vue fill:#48bb78,color:#fff
        style Angular fill:#48bb78,color:#fff
        style Vanilla fill:#48bb78,color:#fff
    end

Debugging Experience

graph TB
    subgraph "React Debugging"
        RD1[Source Maps Required]
        RD2[Framework DevTools]
        RD3[Transpiled Code]
        RD4[Virtual DOM State]
        RD5[Difficult Stack Traces]

        style RD1 fill:#f59e42,color:#fff
        style RD3 fill:#f59e42,color:#fff
        style RD5 fill:#f56565,color:#fff
    end

    subgraph "LARC Debugging"
        LD1[No Source Maps Needed]
        LD2[Browser DevTools]
        LD3[Your Actual Code]
        LD4[Real DOM State]
        LD5[Clear Stack Traces]

        style LD1 fill:#48bb78,color:#fff
        style LD2 fill:#48bb78,color:#fff
        style LD3 fill:#48bb78,color:#fff
        style LD5 fill:#48bb78,color:#fff
    end

Project Longevity

timeline
    title Code Longevity
    2020 : React 16 code : Needs updates
    2021 : React 17 changes : More updates
    2022 : React 18 breaking : Major refactor
    2023 : Still needs maintenance : Dependencies outdated
    2024 : Framework fatigue

    section LARC
    2020 : Web Components : Still works
    2021 : No changes needed : Still works
    2022 : No changes needed : Still works
    2023 : No changes needed : Still works
    2024 : Still works today : Based on standards

When to Choose Each

graph TB
    Choice{Choose<br/>Technology}

    Choice -->|Large team<br/>Existing React expertise| React
    Choice -->|Rapid prototyping<br/>Small team<br/>Long-term maintenance| LARC
    Choice -->|Complex state<br/>Heavy computation| React
    Choice -->|Simple/Medium complexity<br/>Fast performance| LARC
    Choice -->|Rich ecosystem needed| React
    Choice -->|Standards-first<br/>No build step| LARC

    React[React/Vue/Angular]
    LARC[LARC]

    style React fill:#667eea,color:#fff
    style LARC fill:#48bb78,color:#fff

Migration Path

graph LR
    Current[Existing React App]

    Current --> Gradual{Migration<br/>Strategy}

    Gradual --> Wrap[Wrap React in<br/>Web Components]
    Gradual --> Rewrite[Rewrite Components<br/>One by one]
    Gradual --> Parallel[Build new features<br/>in LARC]

    Wrap --> Mixed[Mixed App<br/>React + LARC]
    Rewrite --> Mixed
    Parallel --> Mixed

    Mixed --> Complete[Full LARC App]

    style Current fill:#667eea,color:#fff
    style Mixed fill:#f59e42,color:#fff
    style Complete fill:#48bb78,color:#fff