comments, tests and description

This commit is contained in:
Kamil Pietruszka
2017-03-11 12:24:48 +01:00
parent e8b634c33e
commit 8632bafcd7
10 changed files with 219 additions and 51 deletions

View File

@ -10,16 +10,20 @@ tags:
---
## Intent
TODO
The purpose of the Converter Pattern is to provide a generic, common way of bidirectional
conversion between corresponding types, allowing a clean implementation in which the types do not
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 "TODO")
![alt text](./etc/converter.png "Converter Pattern")
## Applicability
TODO
Use the Converter Pattern in the following situations:
* TODO 1
* TODO 2
* When you have types that logically correspond which other and you need to convert entities between them
* When you want to provide different ways of types conversions depending on a context
* Whenever you introduce a DTO (Data transfer object), you will probably need to convert it into the domain equivalence
## Credits
* [Converter](http://todo.com)
* [Converter](http://www.xsolve.pl/blog/converter-pattern-in-java-8/)