visitor

layout: pattern title: Visitor folder: visitor permalink: /patterns/visitor/ categories: Behavioral tags: – Gang of Four Intent Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates. Class diagram Applicability Use the Visitor pattern when […]

value-object

layout: pattern title: Value Object folder: value-object permalink: /patterns/value-object/ categories: Creational tags: – Instantiation Intent Provide objects which follow value semantics rather than reference semantics. This means value objects’ equality are not based on identity. Two value objects are equal when they have the same value, not necessarily being the same object. Class diagram Applicability […]

update-method

layout: pattern title: Update Method folder: update-method permalink: /patterns/update-method/ categories: Behavioral tags: – Game programming Intent Update method pattern simulates a collection of independent objects by telling each to process one frame of behavior at a time. Explanation The game world maintains a collection of objects. Each object implements an update method that simulates one […]

unit-of-work

layout: pattern title: Unit Of Work folder: unit-of-work permalink: /patterns/unit-of-work/ categories: Architectural tags: – Data access Intent When a business transaction is completed, all the these updates are sent as one big unit of work to be persisted in a database in one go so as to minimize database trips. Class diagram Applicability Use the […]

typeobjectpattern

layout: pattern title: Type-Object folder: typeobjectpattern permalink: /patterns/typeobjectpattern/ categories: Behavioral tags: Game programming – Extensibility Intent As explained in the book Game Programming Patterns by Robert Nystrom, type object pattern helps in Allowing flexible creation of new “classes” by creating a single class, each instance of which represents a different type of object Explanation Say, […]

twin

layout: pattern title: Twin folder: twin permalink: /patterns/twin/ categories: Structural tags: – Extensibility Intent Twin pattern is a design pattern which provides a standard solution to simulate multiple inheritance in java Class diagram Applicability Use the Twin idiom when To simulate multiple inheritance in a language that does not support this feature. To avoid certain […]

trampoline

layout: pattern title: Trampoline folder: trampoline permalink: /patterns/trampoline/ categories: Behavioral tags: – Performance Intent Trampoline pattern is used for implementing algorithms recursively in Java without blowing the stack and to interleave the execution of functions without hard coding them together It is possible by representing a computation in one of 2 states : done | […]

tolerant-reader

layout: pattern title: Tolerant Reader folder: tolerant-reader permalink: /patterns/tolerant-reader/ categories: Integration tags: – Decoupling Intent Tolerant Reader is an integration pattern that helps creating robust communication systems. The idea is to be as tolerant as possible when reading data from another service. This way, when the communication schema changes, the readers must not break. Class […]

tls

layout: pattern title: Thread Local Storage folder: tls permalink: /patterns/tls/ categories: Idiom tags: – Performance Intent Securing variables global to a thread against being spoiled by other threads. That is needed if you use class variables or static variables in your Callable object or Runnable object that are not read-only. Class diagram Applicability Use the […]

throttling

layout: pattern title: Throttling folder: throttling permalink: /patterns/throttling/ categories: Behavioral tags: – Performance Intent Ensure that a given client is not able to access service resources more than the assigned limit. Class diagram Applicability The Throttling pattern should be used: When a service access needs to be restricted to not have high impacts on the […]

粤ICP备15017284号