Skip to content

Commit

Permalink
iluwatar#1113 Link uml-reverse-mapper created class diagrams to readm…
Browse files Browse the repository at this point in the history
…e, where needed
  • Loading branch information
iluwatar committed Dec 7, 2019
1 parent 0685a50 commit b09b100
Show file tree
Hide file tree
Showing 161 changed files with 246 additions and 64 deletions.
3 changes: 2 additions & 1 deletion abstract-document/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand All @@ -26,4 +27,4 @@ Use the Abstract Document Pattern when
## Credits

* [Wikipedia: Abstract Document Pattern](https://en.wikipedia.org/wiki/Abstract_Document_Pattern)
* [Martin Fowler: Dealing with properties](http://martinfowler.com/apsupp/properties.pdf)
* [Martin Fowler: Dealing with properties](http://martinfowler.com/apsupp/properties.pdf)
3 changes: 3 additions & 0 deletions abstract-factory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file added abstract-factory/etc/abstract-factory.urm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions acyclic-visitor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file added adapter/etc/adapter.urm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions aggregator-microservices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ambassador/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file added ambassador/etc/ambassador.urm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions api-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions async-method-invocation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions balking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions bridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file added bridge/etc/bridge.urm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file added builder/etc/builder.urm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions business-delegate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions bytecode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
game’s implementation language isn’t a good fit because:
Expand Down
Binary file added bytecode/etc/bytecode.urm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions caching/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions callback/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions chain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file added chain/etc/chain.urm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions circuit-breaker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file added circuit-breaker/etc/circuit-breaker.urm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions collection-pipeline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions combinator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Binary file added combinator/etc/combinator.urm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions command/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions commander/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Binary file added commander/etc/commander.urm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions composite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file added composite/etc/composite.urm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions converter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:

Expand Down
1 change: 1 addition & 0 deletions cqrs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dao/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions data-bus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions data-locality/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file added data-locality/etc/data-locality.urm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions data-mapper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions data-transfer-object/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions decorator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file added decorator/etc/decorator.urm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions delegation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dependency-injection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dirty-flag/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion double-buffer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 you’ll 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, “you’ll know when you need it” doesn’t give you much to go on. More specifically, this pattern is appropriate when all of these are true:

Expand All @@ -25,4 +28,4 @@ This pattern is one of those ones where you’ll know when you need it. If you h

## Credits

* [Game Programming Patterns - Double Buffer]([http://gameprogrammingpatterns.com/double-buffer.html](http://gameprogrammingpatterns.com/double-buffer.html))
* [Game Programming Patterns - Double Buffer]([http://gameprogrammingpatterns.com/double-buffer.html](http://gameprogrammingpatterns.com/double-buffer.html))
Binary file added double-buffer/etc/double-buffer.urm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions double-checked-locking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions double-dispatch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions eip-aggregator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ 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
Expand All @@ -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)

1 change: 1 addition & 0 deletions eip-message-channel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions eip-publish-subscribe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion eip-splitter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

1 change: 1 addition & 0 deletions eip-wire-tap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit b09b100

Please sign in to comment.