Home > Design Patterns > Data Format Transformation
Data Format Transformation

Data Format Transformation (Little, Rischbeck, Simon)

How can services interact with programs that communicate with different data formats?

Problem

A service may be incompatible with resources it needs to access due to data format disparity. Furthermore, a service consumer that communicates using a data format different from a target service will be incompatible and therefore unable to invoke the service.

Solution

Intermediary data format transformation logic needs to be introduced in order to dynamically translate one data format into another.

Application

This necessary transformation logic is incorporated by adding internal service logic, service agents, or a dedicated transformation service.

Impacts

The use of data format transformation logic inevitably adds development effort, design complexity, and performance overhead.

Architecture

Inventory, Composition, Service

Listen to the podcasts that accompany this site

Data Format Transformation: A Format Conversion utility service is added to the architecture. This service abstracts the legacy application API and provides XML-to-CSV and CSV-to-XML functions. Note that in the depicted architecture, the Format Conversion service exists as a component being reused by multiple components that are part of Web services, as per Dual Protocols.

A Format Conversion utility service is added to the architecture. This service abstracts the legacy application API and provides XML-to-CSV and CSV-to-XML functions. Note that in the depicted architecture, the Format Conversion service exists as a component being reused by multiple components that are part of Web services, as per Dual Protocols.