Shared Flashcard Set

Details

Design Patterns
Simple definitions for design patterns
30
Computer Science
Undergraduate 1
02/10/2017

Additional Computer Science Flashcards

 


 

Cards

Term
Adapter
Definition

Convert the interface of a class into another interface clients expect. It lets classes work together that couldn't otherwise because of incompatible interfaces.

Term
Bridge
Definition

 

 

Decouple an abstraction from its implementation so that the two can vary independently.

Term
Composite
Definition

 

Compose objects into tree structures to represent part-whole hierarchies. It lets clients treat individual objects and compositions of objects uniformly.

Term
Decorator
Definition

Attach additional responsibilities to an object dynamically. Provides a flexible alternative to subclassing for extending functionality.

Term
Facade
Definition

Provide a unified interface to a set of interfaces in a subsystem. Defines a higher-level interface that makes the subsystem easier to use.

Term
Flyweight
Definition

Use sharing to support large numbers of fine-grained objects efficiently

Term
Proxy
Definition

Provide a surrogate or placeholder for another object to control access to it.

Term
Abstract Factory
Definition

Provide an interface for creating families of related or dependent objects without specifying their concrete classes.

Term
Builder
Definition

Separate the construction of a complex object from its representation so that the same construction process can create different representations.

Term
Lazy Initialization
Definition

Tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed.

Term
Object Pool
Definition

Avoid expensive acquisition and release of resources by recycling objects that are no longer in use

Term
Prototype
Definition

Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.

Term
Singleton
Definition

Ensure a class only has one instance, and provide a global point of access to it.

Term
Utility
Definition

A class with a private constructor that contains only static methods.

Term
Chain of Responsibility
Definition

Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.

Term
Command
Definition

Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations.

Term
Interpreter
Definition

Given a language, define a representation for its grammar and uses the representation to interpret sentences in the language.

Term
Iterator
Definition

Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.

Term
Mediator
Definition

Define an object that encapsulates how a set of objects interact. Promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.

Term
Memento
Definition

Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later.

Term
Observer
Definition

Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.

Term
State
Definition

Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.

Term
Strategy
Definition

Define a family of algorithms, encapsulate each one, and make them interchangeable. It lets the algorithm vary independently from clients that use it.

Term
Template Method
Definition

Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. It lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.

Term
Vistor
Definition

Represent an operation to be performed on the elements of an object structure. It lets you define a new operation without changing the classes of the elements on which it operates.

Term
Sentinel
Definition
Pattern occurs when a unique value, outside the set of "domain" values, is used to communicate information to and/or from a function or subsystem.
Term
Filter
Definition
Enables developers to screen a set of objects using different criteria and chaining them in a decoupled way through logical operations.
Term
Null Object
Definition
Replaces check of NULL object instance. Instead of putting a check for a null value, it reflects a do nothing relationship. Can be used to provide default behaviour in case data is not available.
Term
Front Controller
Definition
Is used to provide a centralized request handling mechanism so that all requessts will be handled by a single handler.  This handler can do the authentication / authorization/ logging or tracking of request and then pass the requests to corresponding handlers.
Term
Transfer Object
Definition
Is used when we want to pass data with multiple attributes in one shot.  Its a simple POJO class having getter/setter methods and is serializable so that it can be transferred over the network. It does not have any behavior.
Supporting users have an ad free experience!