Search
Lessons (31)
- Object Relationships: Association, Aggregation and Composition
… an Order owns its OrderLine s, and a Document owns its Paragraph s. 💡 Composition (the relationship) and "composition …
- Composition over Inheritance
… Add a third formatter and you write one class, not two more. Inheritance vs composition Inheritance Composition --- --- --- Relationship …
- How Browsers Render a Page
… The critical rendering path (DOM, CSSOM, layout, paint, composite) and why it matters for fast, smooth pages. The …
- OOP Mistakes and Interview Questions
… Aggregation vs composition?</strong </summary Both are "has-a". In composition , the whole creates and owns its parts …
- Cross-Service Data: How to Join Without a Database JOIN
… API composition The caller, API gateway or backend-for-frontend calls both services and joins the responses in …
- Which Pattern Do I Need?
… Memento stores snapshots to restore. Composite vs Decorator Both wrap objects. Composite groups many children ; Decorator wraps exactly …
- Inheritance
… use composition Stack → Array A stack is not an array (you shouldn't insert in the middle) ❌ No …
- Clean Architecture
… req.body); res.status(201).json(result); }; 4. Composition root: wire everything together, once js // main.js — the …
- Structural Patterns: How to Connect Objects
Adapter, Decorator, Facade, Proxy, Composite, Bridge and Flyweight. How to plug incompatible pieces together and build big structures …
- Design System Operations
… Operating a design system means keeping that composition reliable as more teams use it: clear APIs, accessible behavior …
- Database Relations & Foreign Keys
… enrollments(student id, course id, enrolled at, status) PRIMARY KEY (student id, course id) The composite primary key …
- What Are Design Patterns?
… I connect objects into bigger structures? Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy 🗣️ Behavioral How do objects …
- Atomic Design & Component Libraries
… Atomic Design is a way to describe UI composition. Start with small, reusable building blocks and combine them …
- Normalization & Denormalization
… If I have a composite key, I move fields that depend on only part of it to reach …
- D — Dependency Inversion Principle
… main.js / composition root const orderService = new OrderService({ orderRepository: new PostgresOrderRepository(pool), mailer: new SesMailer(awsConfig), }); // Tests: plain …
- Database Indexing & Transactions
… 03 ms) Index Cond: (email = 'ana@mail.com') Composite indexes and the left-most rule An index on …
- Data in Microservices: Sagas & the Outbox Pattern
… Options: Approach How Trade-off --- --- --- API composition A BFF/gateway calls each service and joins in memory Simple …
- Neural Networks and Deep Learning
… The big idea A neural network is a composition of parameterized functions. Each layer transforms its input; training …
- Scalable Frontend Architecture
… Shared code must be genuinely reusable and domain-neutral. text app/orders/[id]/page.tsx route composition and …
- Clean Architecture in Depth
… the composition root ts // src/main.ts — the ONLY file that knows every concrete class const placeOrder = new …
- React vs Vue vs Angular
… Clicked {count} times (double: {double}) </button ); } Vue 3 (Composition API, single-file component) vue <script setup import { ref …
- L — Liskov Substitution Principle
… Prefer composition or separate types. - LSP is what makes polymorphism (and the Open/Closed Principle ) safe.
- What Is Object-Oriented Programming?
… can come from inheritance or, more often, from composition. - Team-friendly. Different people can own different classes without …
- Interfaces vs Abstract Classes
… Use an abstract class] Q2 -- No -- C[Interface + composition: put shared code in a helper object] Start with …
- Indexes, EXPLAIN & Query Plans
… One composite index covers all three: equality column first, then the range/sort column . sql CREATE INDEX CONCURRENTLY …
- Onion Architecture & Clean vs Hexagonal vs Onion
… Infrastructure → references Application, Domain └── Shop.Api → references everything (composition root) 💡 Separate projects/packages per ring let the compiler …
- Creational Patterns: How to Make Objects
… Prefer creating one instance in your composition root and injecting it (see Dependency Inversion ). --- Cheat sheet Pattern One …
- JavaScript Language Fundamentals
… public API, hide details Inheritance Prototypes / extends (prefer composition when in doubt) Polymorphism Any object with the right …
- Behavioral Patterns II: Chain, Template, Iterator, Mediator, Memento, Visitor
… as functions (Strategy) instead of subclassing, i.e. composition over inheritance. --- 3. Iterator 📺 Analogy: A TV remote's …
- Jenkins in Production: Deploys, Docker and Scaling
… lock() / disableConcurrentBuilds() concurrency: Reuse Shared library Reusable workflow / composite action Interview questions What is the difference between declarative …
- Go Fundamentals
… is required") } return &Account{Owner: owner}, nil } Embedding: composition instead of inheritance Go has no extends . Instead you …