Design Patterns
Frontend design patterns and project architecture patterns
Frontend Patterns
Component Pattern
Build reusable UI components with consistent interfaces. Each component should be self-contained and follow single responsibility.
Module Pattern
Organize code into modules with clear boundaries. Use IIFE or ES6 modules to encapsulate functionality.
Observer Pattern
Implement event-driven communication between components. Useful for handling user interactions and state changes.
Factory Pattern
Create objects without specifying exact classes. Useful for generating similar components with variations.
Architecture Patterns
Progressive Enhancement
Start with basic HTML, add CSS for presentation, then JavaScript for enhanced functionality. Ensures content accessibility.
Progressive Web App
Build web applications that work offline, support push notifications, and provide native-like experiences.
JAMstack
JavaScript, APIs, and Markup architecture. Pre-built markup for performance, with dynamic content from APIs.
Micro-frontend
Decompose frontend into independent features. Each team can develop and deploy features independently.