#1113 Link uml-reverse-mapper created class diagrams to readme, where needed

This commit is contained in:
Ilkka Seppälä 2019-12-07 20:01:13 +02:00
parent 0685a505d3
commit b09b100614
161 changed files with 246 additions and 64 deletions

View File

@ -12,6 +12,7 @@ tags:
## Intent
Achieve flexibility of untyped languages and keep the type-safety
## Class diagram
![alt text](./etc/abstract-document.png "Abstract Document Traits and Domain")

View File

@ -157,6 +157,9 @@ public static void main(String[] args) {
}
```
## Class diagram
![alt text](./etc/abstract-factory.urm.png "Abstract Factory class diagram")
## Applicability
Use the Abstract Factory pattern when

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@ -9,11 +9,12 @@ tags:
- Difficulty-Intermediate
---
![alt text](./etc/acyclic-visitor.png "Acyclic Visitor")
## Intent
Allow new functions to be added to existing class hierarchies without affecting those hierarchies, and without creating the troublesome dependency cycles that are inherent to the GOF VISITOR Pattern.
## Class diagram
![alt text](./etc/acyclic-visitor.png "Acyclic Visitor")
## Applicability
This pattern can be used:
* When you need to add a new function to an existing hierarchy without the need to alter or affect that hierarchy.

View File

@ -97,6 +97,9 @@ var captain = new Captain(new FishingBoatAdapter());
captain.row();
```
## Class diagram
![alt text](./etc/adapter.urm.png "Adapter class diagram")
## Applicability
Use the Adapter pattern when

BIN
adapter/etc/adapter.urm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -18,6 +18,8 @@ More variations of the aggregator are:
- Chained Microservice Design Pattern: In this case each microservice is dependent/ chained to a series
of other microservices.
## Class diagram
![alt text](./etc/aggregator-microservice.png "Aggregator Microservice")
## Applicability

View File

@ -150,6 +150,9 @@ public class App {
}
```
## Class diagram
![alt text](./etc/ambassador.urm.png "Ambassador class diagram")
## Applicability
Ambassador is applicable when working with a legacy remote service that cannot
be modified or would be extremely difficult to modify. Connectivity features can

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -15,6 +15,7 @@ tags:
Aggregate calls to microservices in a single location: the API Gateway. The user makes a single
call to the API Gateway, and the API Gateway then calls each relevant microservice.
## Class diagram
![alt text](./etc/api-gateway.png "API Gateway")
## Applicability

View File

@ -17,6 +17,7 @@ is not blocked while waiting results of tasks. The pattern provides parallel
processing of multiple independent tasks and retrieving the results via
callbacks or waiting until everything is done.
# Class diagram
![alt text](./etc/async-method-invocation.png "Async Method Invocation")
## Applicability

View File

@ -13,6 +13,7 @@ tags:
Balking Pattern is used to prevent an object from executing certain code if it is an
incomplete or inappropriate state
## Class diagram
![alt text](./etc/balking.png "Balking")
## Applicability

View File

@ -179,6 +179,9 @@ hammer.unwield();
// The item's glow fades.
```
## Class diagram
![alt text](./etc/bridge.urm.png "Bridge class diagram")
## Applicability
Use the Bridge pattern when

BIN
bridge/etc/bridge.urm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -113,6 +113,9 @@ And then it can be used as:
var mage = new Hero.Builder(Profession.MAGE, "Riobard").withHairColor(HairColor.BLACK).withWeapon(Weapon.DAGGER).build();
```
## Class diagram
![alt text](./etc/builder.urm.png "Builder class diagram")
## Applicability
Use the Builder pattern when

BIN
builder/etc/builder.urm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

View File

@ -15,6 +15,7 @@ presentation and business tiers. By using the pattern we gain loose coupling
between the tiers and encapsulate knowledge about how to locate, connect to,
and interact with the business objects that make up the application.
## Class diagram
![alt text](./etc/business-delegate.png "Business Delegate")
## Applicability

View File

@ -12,6 +12,9 @@ tags:
## Intent
Allows to encode behaviour as instructions for virtual machine.
## Class diagram
![alt text](./etc/bytecode.urm.png "Bytecode class diagram")
## Applicability
Use the Bytecode pattern when you have a lot of behavior you need to define and your
games implementation language isnt a good fit because:

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -15,6 +15,7 @@ To avoid expensive re-acquisition of resources by not releasing
the resources immediately after their use. The resources retain their identity, are kept in some
fast-access storage, and are re-used to avoid having to acquire them again.
## Class diagram
![alt text](./etc/caching.png "Caching")
## Applicability

View File

@ -16,6 +16,7 @@ Callback is a piece of executable code that is passed as an
argument to other code, which is expected to call back (execute) the argument
at some convenient time.
## Class diagram
![alt text](./etc/callback.png "Callback")
## Applicability

View File

@ -141,6 +141,9 @@ king.makeRequest(new Request(RequestType.TORTURE_PRISONER, "torture prisoner"));
king.makeRequest(new Request(RequestType.COLLECT_TAX, "collect tax")); // Orc soldier handling request "collect tax"
```
## Class diagram
![alt text](./etc/chain.urm.png "Chain of Responsibility class diagram")
## Applicability
Use Chain of Responsibility when

BIN
chain/etc/chain.urm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -165,6 +165,8 @@ How does the above pattern prevent failures? Let's understand via this finite st
- If the number of failures cross a certain threshold, we move to the **open** state, which acts just like an open circuit and prevents remote service calls from being made, thus saving resources. (Here, we return the response called ```stale response from API```)
- Once we exceed the retry timeout period, we move to the **half-open** state and make another call to the remote service again to check if the service is working so that we can serve fresh content. A *failure* sets it back to **open** state and another attempt is made after retry timeout period, while a *success* sets it to **closed** state so that everything starts working normally again.
## Class diagram
![alt text](./etc/circuit-breaker.urm.png "Circuit Breaker class diagram")
## Applicability
Use the Circuit Breaker pattern when

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -14,6 +14,7 @@ tags:
Collection Pipeline introduces Function Composition and Collection Pipeline, two functional-style patterns that you can combine to iterate collections in your code.
In functional programming, it's common to sequence complex operations through a series of smaller modular functions or operations. The series is called a composition of functions, or a function composition. When a collection of data flows through a function composition, it becomes a collection pipeline. Function Composition and Collection Pipeline are two design patterns frequently used in functional-style programming.
## Class diagram
![alt text](./etc/collection-pipeline.png "Collection Pipeline")
## Applicability

View File

@ -18,6 +18,8 @@ The functional pattern representing a style of organizing libraries centered aro
Putting it simply, there is some type T, some functions for constructing "primitive" values of type T,
and some "combinators" which can combine values of type T in various ways to build up more complex values of type T.
## Class diagram
![alt text](./etc/combinator.urm.png "Combinator class diagram")
## Applicability
Use the combinator pattern when:

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -19,6 +19,7 @@ Encapsulate a request as an object, thereby letting you
parameterize clients with different requests, queue or log requests, and
support undoable operations.
## Class diagram
![alt text](./etc/command.png "Command")
## Applicability

View File

@ -13,6 +13,9 @@ tags:
> Used to handle all problems that can be encountered when doing distributed transactions.
## Class diagram
![alt text](./etc/commander.urm.png "Commander class diagram")
## Applicability
This pattern can be used when we need to make commits into 2 (or more) databases to complete transaction, which cannot be done atomically and can thereby create problems.

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

View File

@ -154,6 +154,9 @@ var elfMessage = new Messenger().messageFromElves();
elfMessage.print(); // Much wind pours from your mouth.
```
## Class diagram
![alt text](./etc/composite.urm.png "Composite class diagram")
## Applicability
Use the Composite pattern when

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -15,8 +15,6 @@ conversion between corresponding types, allowing a clean implementation in which
need to be aware of each other. Moreover, the Converter Pattern introduces bidirectional collection
mapping, reducing a boilerplate code to minimum.
![alt text](./etc/converter.png "Converter Pattern")
## Explanation
Real world example
@ -82,6 +80,9 @@ UserDto dtoUser = new UserDto("John", "Doe", true, "whatever[at]wherever.com");
User user = userConverter.convertFromDto(dtoUser);
```
## Class diagram
![alt text](./etc/converter.png "Converter Pattern")
## Applicability
Use the Converter Pattern in the following situations:

View File

@ -12,6 +12,7 @@ tags:
## Intent
CQRS Command Query Responsibility Segregation - Separate the query side from the command side.
## Class diagram
![alt text](./etc/cqrs.png "CQRS")
## Applicability

View File

@ -13,6 +13,7 @@ tags:
Object provides an abstract interface to some type of database or
other persistence mechanism.
## Class diagram
![alt text](./etc/dao.png "Data Access Object")
## Applicability

View File

@ -16,6 +16,7 @@ Allows send of messages/events between components of an application
without them needing to know about each other. They only need to know
about the type of the message/event being sent.
## Class diagram
![data bus pattern uml diagram](./etc/data-bus.urm.png "Data Bus pattern")
## Applicability

View File

@ -15,6 +15,8 @@ Accelerate memory access by arranging data to take advantage of CPU caching.
Modern CPUs have caches to speed up memory access. These can access memory adjacent to recently accessed memory much quicker. Take advantage of that to improve performance by increasing data locality keeping data in contiguous memory in the order that you process it.
## Class diagram
![alt text](./etc/data-locality.urm.png "Data Locality pattern class diagram")
## Applicability

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -12,6 +12,7 @@ tags:
## Intent
A layer of mappers that moves data between objects and a database while keeping them independent of each other and the mapper itself
## Class diagram
![alt text](./etc/data-mapper.png "Data Mapper")
## Applicability

View File

@ -15,6 +15,7 @@ tags:
Pass data with multiple attributes in one shot from client to server,
to avoid multiple calls to remote server.
## Class diagram
![alt text](./etc/data-transfer-object.urm.png "data-transfer-object")
## Applicability

View File

@ -109,6 +109,9 @@ clubbedTroll.attack(); // The troll tries to grab you! The troll swings at you w
clubbedTroll.fleeBattle(); // The troll shrieks in horror and runs away!
```
## Class diagram
![alt text](./etc/decorator.urm.png "Decorator pattern class diagram")
## Applicability
Use Decorator

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -16,6 +16,7 @@ Proxy Pattern
It is a technique where an object expresses certain behavior to the outside but in
reality delegates responsibility for implementing that behaviour to an associated object.
## Class diagram
![alt text](./etc/delegation.png "Delegate")
## Applicability

View File

@ -17,6 +17,7 @@ pattern separates the creation of a client's dependencies from its own
behavior, which allows program designs to be loosely coupled and to follow the
inversion of control and single responsibility principles.
## Class diagram
![alt text](./etc/dependency-injection.png "Dependency Injection")
## Applicability

View File

@ -14,6 +14,7 @@ tags:
To avoid expensive re-acquisition of resources. The resources retain their identity, are kept in some
fast-access storage, and are re-used to avoid having to acquire them again.
## Class diagram
![alt text](./etc/dirty-flag.png "Dirty Flag")
## Applicability

View File

@ -12,6 +12,9 @@ tags:
## Intent
Double buffering is a term used to describe a device that has two buffers. The usage of multiple buffers increases the overall throughput of a device and helps prevents bottlenecks. This example shows using double buffer pattern on graphics. It is used to show one image or frame while a separate frame is being buffered to be shown next. This method makes animations and games look more realistic than the same done in a single buffer mode.
## Class diagram
![alt text](./etc/double-buffer.urm.png "Double Buffer pattern class diagram")
## Applicability
This pattern is one of those ones where youll know when you need it. If you have a system that lacks double buffering, it will probably look visibly wrong (tearing, etc.) or will behave incorrectly. But saying, “youll know when you need it” doesnt give you much to go on. More specifically, this pattern is appropriate when all of these are true:

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -16,6 +16,7 @@ locking criterion (the "lock hint") without actually acquiring the lock. Only
if the locking criterion check indicates that locking is required does the
actual locking logic proceed.
## Class diagram
![alt text](./etc/double_checked_locking_1.png "Double Checked Locking")
## Applicability

View File

@ -14,6 +14,7 @@ tags:
Double Dispatch pattern is a way to create maintainable dynamic
behavior based on receiver and parameter types.
## Class diagram
![alt text](./etc/double-dispatch.png "Double Dispatch")
## Applicability

View File

@ -18,6 +18,7 @@ the best parameters.
Aggregator allows you to merge messages based on defined criteria and parameters. It gathers original messages,
applies aggregation strategy and upon fulfilling given criteria, releasing merged messages.
## Diagram
![alt text](./etc/aggregator.gif "Splitter")
## Applicability
@ -30,4 +31,3 @@ Use the Aggregator pattern when
* [Gregor Hohpe, Bobby Woolf - Enterprise Integration Patterns](http://www.enterpriseintegrationpatterns.com/patterns/messaging/Aggregator.html)
* [Apache Camel - Documentation](http://camel.apache.org/aggregator2.html)

View File

@ -14,6 +14,7 @@ tags:
When two applications communicate using a messaging system they do it by using logical addresses
of the system, so called Message Channels.
## Class diagram
![alt text](./etc/message-channel.png "Message Channel")
## Applicability

View File

@ -13,6 +13,7 @@ tags:
## Intent
Broadcast messages from sender to all the interested receivers.
## Class diagram
![alt text](./etc/publish-subscribe.png "Publish Subscribe Channel")
## Applicability

View File

@ -17,6 +17,7 @@ service/sold goods, price etc.). Such bundled messages may not be accepted by ot
pattern comes in handy. It will take the whole document, split it based on given criteria and send individual
items to the endpoint.
## Diagram
![alt text](./etc/sequencer.gif "Splitter")
## Applicability
@ -29,4 +30,3 @@ Use the Splitter pattern when
* [Gregor Hohpe, Bobby Woolf - Enterprise Integration Patterns](http://www.enterpriseintegrationpatterns.com/patterns/messaging/Sequencer.html)
* [Apache Camel - Documentation](http://camel.apache.org/splitter.html)

View File

@ -15,6 +15,7 @@ In most integration cases there is a need to monitor the messages flowing throug
by intercepting the message and redirecting it to a different location like console, filesystem or the database.
It is important that such functionality should not modify the original message and influence the processing path.
## Diagram
![alt text](./etc/wiretap.gif "Wire Tap")
## Applicability

View File

@ -18,6 +18,7 @@ requires a separate subscription. An Event Aggregator acts as a single source
of events for many objects. It registers for all the events of the many objects
allowing clients to register with just the aggregator.
## Class diagram
![alt text](./etc/classes.png "Event Aggregator")
## Applicability

View File

@ -19,6 +19,7 @@ of the complex issues inherent in multithreaded design. Using a class that suppo
3. Wait for resources to become available without stopping ("hanging") your application.
4. Communicate with pending asynchronous operations using the familiar events-and-delegates model.
## Class diagram
![alt text](./etc/event-asynchronous.png "Event-based Asynchronous")
## Applicability

View File

@ -13,6 +13,7 @@ tags:
## Intent
Send and notify state changes of your objects to other applications using an Event-driven Architecture.
## Class diagram
![alt text](./etc/eda.png "Event Driven Architecture")
## Applicability

View File

@ -17,6 +17,7 @@ It puts all the requests in a queue and process them asynchronously.
Gives the resource for the event when it is the next in the queue and in same time
removes it from the queue.
## Class diagram
![alt text](./etc/model.png "Event Queue")
## Applicability

View File

@ -13,6 +13,7 @@ tags:
## Intent
Instead of storing just the current state of the data in a domain, use an append-only store to record the full series of actions taken on that data. The store acts as the system of record and can be used to materialize the domain objects. This can simplify tasks in complex domains, by avoiding the need to synchronize the data model and the business domain, while improving performance, scalability, and responsiveness. It can also provide consistency for transactional data, and maintain full audit trails and history that can enable compensating actions.
## Class diagram
![alt text](./etc/event-sourcing.png "Event Sourcing")
## Applicability

View File

@ -16,6 +16,7 @@ should always be executed before and after the business method. A good example
of this is resource allocation and deallocation leaving the user to specify
only what to do with the resource.
## Class diagram
![alt text](./etc/execute-around.png "Execute Around")
## Applicability

View File

@ -13,6 +13,7 @@ tags:
Anticipate that an objects interface needs to be extended in the future. Additional
interfaces are defined by extension objects.
## Class diagram
![Extension_objects](./etc/extension_obj.png "Extension objects")
## Applicability

View File

@ -197,6 +197,9 @@ facade.endDay();
// Dwarven tunnel digger goes to sleep.
```
## Class diagram
![alt text](./etc/facade.urm.png "Facade pattern class diagram")
## Applicability
Use the Facade pattern when

BIN
facade/etc/facade.urm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -13,6 +13,7 @@ tags:
## Intent
Define a factory of immutable content with separated builder and factory interfaces.
## Class diagram
![alt text](./etc/factory-kit.png "Factory Kit")
## Applicability

View File

@ -62,6 +62,9 @@ blacksmith.manufactureWeapon(WeaponType.AXE);
// Elvish weapons are created
```
## Class diagram
![alt text](./etc/factory-method.urm.png "Factory Method pattern class diagram")
## Applicability
Use the Factory Method pattern when

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

View File

@ -18,6 +18,7 @@ and rolled out. Allowing switching back to the older feature quickly if needed.
can easily introduce code complexity. There is also cause for concern that the old feature that the toggle is eventually
going to phase out is never removed, causing redundant code smells and increased maintainability.
## Class diagram
![alt text](./etc/feature-toggle.png "Feature Toggle")
## Applicability

View File

@ -21,6 +21,7 @@ A fluent interface can be implemented using any of
* Static Factory Methods and Imports
* Named parameters - can be simulated in Java using static factory methods.
## Class diagram
![Fluent Interface](./etc/fluentinterface.png "Fluent Interface")
## Applicability

View File

@ -15,6 +15,7 @@ user interacts with a view, the view propagates an action through a central
dispatcher, to the various stores that hold the application's data and business
logic, which updates all of the views that are affected.
## Class diagram
![alt text](./etc/flux.png "Flux")
## Applicability

View File

@ -110,6 +110,9 @@ factory.createPotion(PotionType.HOLY_WATER).drink(); // You feel blessed. (Potio
factory.createPotion(PotionType.HEALING).drink(); // You feel healed. (Potion=648129364)
```
## Class diagram
![alt text](./etc/flyweight.urm.png "Flyweight pattern class diagram")
## Applicability
The Flyweight pattern's effectiveness depends heavily on how
and where it's used. Apply the Flyweight pattern when all of the following are

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -14,6 +14,7 @@ Introduce a common handler for all requests for a web site. This
way we can encapsulate common functionality such as security,
internationalization, routing and logging in a single place.
## Class diagram
![alt text](./etc/front-controller.png "Front Controller")
## Applicability

View File

@ -34,6 +34,8 @@ The variable-step game loop chooses a time step to advance based on how much rea
For fixed-step game loop, a certain amount of real time has elapsed since the last turn of the game loop. This is how much game time need to be simulated for the games “now” to catch up with the players.
## Class diagram
![alt text](./etc/game-loop.urm.png "Game Loop pattern class diagram")
## Credits

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -12,6 +12,7 @@ tags:
## Intent
Use Guarded suspension pattern to handle a situation when you want to execute a method on object which is not in a proper state.
## Class diagram
![Guarded Suspension diagram](./etc/guarded-suspension.png)
## Applicability

View File

@ -14,6 +14,7 @@ The Half-Sync/Half-Async pattern decouples synchronous I/O from
asynchronous I/O in a system to simplify concurrent programming effort without
degrading execution efficiency.
## Class diagram
![Half-Sync/Half-Async class diagram](./etc/half-sync-half-async.png)
## Applicability

View File

@ -18,6 +18,7 @@ tags:
## Intent
Allow an application to equally be driven by users, programs, automated test or batch scripts, and to be developed and tested in isolation from its eventual run-time devices and databases.
## Class diagram
![Hexagonal Architecture class diagram](./etc/hexagonal.png)
## Applicability

View File

@ -13,10 +13,9 @@ tags:
Provide pluggable filters to conduct necessary pre-processing and
post-processing to requests from a client to a target
## Class diagram
![alt text](./etc/intercepting-filter.png "Intercepting Filter")
## Applicability
Use the Intercepting Filter pattern when

View File

@ -15,6 +15,7 @@ Given a language, define a representation for its grammar along
with an interpreter that uses the representation to interpret sentences in the
language.
## Class diagram
![alt text](./etc/interpreter_1.png "Interpreter")
## Applicability

View File

@ -17,6 +17,7 @@ Cursor
Provide a way to access the elements of an aggregate object
sequentially without exposing its underlying representation.
## Class diagram
![alt text](./etc/iterator_1.png "Iterator")
## Applicability

View File

@ -15,15 +15,6 @@ tags:
Layers is an architectural pattern where software responsibilities are
divided among the different layers of the application.
![alt text](./etc/layers.png "Layers")
## Applicability
Use the Layers architecture when
* you want clearly divide software responsibilities into different parts of the program
* you want to prevent a change from propagating throughout the application
* you want to make your application more maintainable and testable
## Explanation
Real world example
@ -102,6 +93,16 @@ public class CakeViewImpl implements View {
}
```
## Class diagram
![alt text](./etc/layers.png "Layers")
## Applicability
Use the Layers architecture when
* you want clearly divide software responsibilities into different parts of the program
* you want to prevent a change from propagating throughout the application
* you want to make your application more maintainable and testable
## Credits
* [Pattern Oriented Software Architecture Vol I-V](http://www.amazon.com/Pattern-Oriented-Software-Architecture-Volume-Patterns/dp/0471958697)

View File

@ -17,6 +17,7 @@ initialization of an object until the point at which it is needed. It can
contribute to efficiency in the program's operation if properly and
appropriately used.
## Class diagram
![alt text](./etc/lazy-loading.png "Lazy Loading")
## Applicability

View File

@ -12,6 +12,9 @@ tags:
## Intent
Leader Election pattern is commonly used in cloud system design. It can help to ensure that task instances selec the leader instance correctly and do not conflict with each other, cause contention for shared resources, or inadvertently interfere with the work that other task instances are performing.
## Class diagram
![alt text](./etc/leader-election.urm.png "Leader Election pattern class diagram")
## Applicability
Use this pattern when

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

View File

@ -12,6 +12,7 @@ tags:
## Intent
Using empty interfaces as markers to distinguish special treated objects.
## Class diagram
![alt text](./etc/MarkerDiagram.png "Marker Interface")
## Applicability

View File

@ -17,6 +17,9 @@ tags:
> Used for centralised parallel processing.
## Class diagram
![alt text](./etc/master-worker-pattern.urm.png "Master-Worker pattern class diagram")
## Applicability
This pattern can be used when data can be divided into multiple parts, all of which need to go through the same computation to give a result, which need to be aggregated to get the final result.

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

View File

@ -15,6 +15,7 @@ Define an object that encapsulates how a set of objects interact.
Mediator promotes loose coupling by keeping objects from referring to each
other explicitly, and it lets you vary their interaction independently.
## Class diagram
![alt text](./etc/mediator_1.png "Mediator")
## Applicability

View File

@ -17,6 +17,7 @@ Token
Without violating encapsulation, capture and externalize an
object's internal state so that the object can be restored to this state later.
## Class diagram
![alt text](./etc/memento.png "Memento")
## Applicability

View File

@ -15,6 +15,7 @@ the model, the view and the controller. Let the model manage the data, the view
display the data and the controller mediate updating the data and redrawing the
display.
## Class diagram
![alt text](./etc/model-view-controller.png "Model-View-Controller")
## Applicability

View File

@ -13,6 +13,7 @@ tags:
Apply a "Separation of Concerns" principle in a way that allows
developers to build and test user interfaces.
## Class diagram
![alt text](./etc/model-view-presenter_1.png "Model-View-Presenter")
## Applicability

View File

@ -12,6 +12,7 @@ tags:
## Intent
Module pattern is used to implement the concept of software modules, defined by modular programming, in a programming language with incomplete direct support for the concept.
## Class diagram
![alt text](./etc/module.png "Module")
## Applicability

View File

@ -19,6 +19,7 @@ operations:
bind - that takes monadic object and a function from plain object to monadic value and returns monadic value
return - that takes plain type object and returns this object wrapped in a monadic value.
## Class diagram
![alt text](./etc/monad.png "Monad")
## Applicability

View File

@ -15,6 +15,7 @@ Borg
## Intent
Enforces a behaviour like sharing the same state amongst all instances.
## Class diagram
![alt text](./etc/monostate.png "MonoState")
## Applicability

View File

@ -16,6 +16,7 @@ Registry
Ensure a class only has limited number of instances, and provide a
global point of access to them.
## Class diagram
![alt text](./etc/multiton.png "Multiton")
## Applicability

View File

@ -14,7 +14,7 @@ tags:
Provide a template to suppress any exceptions that either are declared but cannot occur or should only be logged;
while executing some business logic. The template removes the need to write repeated `try-catch` blocks.
## Class diagram
![alt text](./etc/mute-idiom.png "Mute Idiom")
## Applicability

View File

@ -16,6 +16,7 @@ Binary Semaphore
## Intent
Create a lock which only allows a single thread to access a resource at any one instant.
## Class diagram
![alt text](./etc/mutex.png "Mutex")
## Applicability

View File

@ -14,6 +14,7 @@ The Naked Objects architectural pattern is well suited for rapid
prototyping. Using the pattern, you only need to write the domain objects,
everything else is autogenerated by the framework.
## Class diagram
![alt text](./etc/naked-objects.png "Naked Objects")
## Applicability

View File

@ -19,6 +19,7 @@ implements the expected interface, but whose method body is empty. The
advantage of this approach over a working default implementation is that a Null
Object is very predictable and has no side effects: it does nothing.
## Class diagram
![alt text](./etc/null-object.png "Null Object")
## Applicability

Some files were not shown because too many files have changed in this diff Show More