DEV Community

Cover image for Design Pattern: The Compound Pattern
Daniel Lee
Daniel Lee

Posted on

 

Design Pattern: The Compound Pattern

The Compound Pattern, as its name already tells, is a collection of patterns. Patterns are often used together and combined within the same design solution. For instance, MVC architecture can be dissected into patterns.

  1. Model: Observer Pattern
    • The model keeps interested objects updated when state change occurs
  2. View: Composite Pattern
    • The view consists of a nested set of windows, panels, buttons, etc.
  3. Controller: Strategy pattern
    • The view is an object that is configured with a strategy. The controller provides the strategy and the view is concerned with visual aspects of an application.

Top comments (0)

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.