Basic Docker commands

  1. docker build -t friendlyname . # Create image using this directory's Dockerfile 2. docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80 3. docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode 4. docker container ls # List all running containers 5. docker container ls … Continue reading Basic Docker commands


Creational Patterns

Creational design patterns abstract the instantiation process. They help make a system independent of how its objecsts are created, composed and represented. A class creational pattern uses inheritance to vary the class that's instantiated, whereas an object creational pattern will delegate instantiation to another object.   Creational patterns become important as systems evolve to depend … Continue reading Creational Patterns

Command – Object Behavioral

Intent Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations. Also Known As Action, Transaction Motivation Sometime it's necessary to issue requests to objects without knowing anything about the operation being requested or the receiver of the request. Applicability Use command pattern … Continue reading Command – Object Behavioral

Abstract Factory – Object Creational

Intent Provide an iterface for creating families of related or dependent objects without specifying their concreate classes. Also Known As Kit Applicability Use the Abstract Factory pattern when, a System should be independent og how its products are created, composed and represented. a System should be configured with one of multiple families of products a … Continue reading Abstract Factory – Object Creational

Decotator Pattern – Object Structural

Intent Attach additional  responsibility to an object dynamically. Dcorators provide flexible alternative to subclassing for extending functionality. Also Know As : Wrapper Motivation Sometimes we want to add responsibilites to individual objects, not to an entire class. Applicability Use Decorator: To add responsibilties to individual objects dynamically and transparently, that is without affecting other objects. … Continue reading Decotator Pattern – Object Structural

Composite Pattern – Object Structural

Intent Compose object intot tree structures to represent part-whole hierachies. Composite lets client treat individual objects and compositions of objects uniformly.   Motivation Graphics application like drawing editors and schematic capture systems let user build complex  diagrams out of simple components. The user can group components to form larger components, which in turn can be grouped … Continue reading Composite Pattern – Object Structural

The Catalog of Design Patterns

Below we have listed 23 desgin patterns. Their names and intents are described. Abstract Factory Provide an interface for creating families of related or dependent objects without specifying their concrete classes. Adapter Convert the inteface of a class into another interface client excpect. Adapter lets classes work together that couldn't otherwise beacause of incompatible interfaces. Bridge Decouple … Continue reading The Catalog of Design Patterns