Skip to main content
Converter

Also known as

  • Mapper
  • Translator

Intent

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.


iluwatarAbout 2 minStructuralCompatibilityData transformationObject mapping
Data Mapper

Also known as

  • Object-Relational Mapping (ORM)

Intent

The Data Mapper pattern aims to create an abstraction layer between the database and the business logic, allowing them to evolve independently. It maps data from the database objects to in-memory data structures and vice versa, minimizing direct dependencies between the application's core logic and the underlying database structure.


iluwatarAbout 3 minBehavioralData accessDecouplingObject mappingPersistence