- Tech know how online


The term wrapper (derived from "to wrap up") is used in software engineering in various contexts, but can basically be defined as software that wraps at least one or more software components

. The context used can refer to a software product, a software component

, asoftware architecture

, aframework, or even a class

in an object-oriented software environment. Finally, the object-oriented environment also knows a design pattern

, which is called wrapper pattern as well as sometimes adapter pattern

Inconsistencies between Interfaces

The problem to be solved in any case is the detection and bridging of inconsistencies between individual interfaces of

different software. Further complications often arise only in their interaction. In order to prevent conflicts and bridge inconsistencies, a uniform interface is created without having to modify the software or components themselves

The term wrapper and its possible interpretations


In order to illustrate the diverse uses of the term wrapper, a few examples are brought together below.

Inthe simplest case, a wrapper

is more or lessan adapter

thatconnects incompatible systems. The wrapper first accesses the data

from the interface offered to it, transforms it into the desired form and then passes this data on to the target system. This path works analogously in reverse

Wrapper Architecture

Wrapper Architecture

In practice, the task of connecting different system structures often arises. The figure illustrates the example of a wrapper architecture, where any data sources - i.e. relational as well as non-relational - database and application systems or also file servers can be connected to an SQL

server via wrappers. The wrapper provides a standardized interface for this purpose, so that all data sources can be addressed uniformly from the point of view of the SQL server. Java Database Connectivity

(JDBC), which describes a set of interfaces for using Java relational database systems, is also to be classified in this context.

The Wrapper Framework for Building W

rappers Forexample, a wrapper framework is a framework for building wrappers that are used in connection with the realization of uniform function interfaces for existing client applications - which are then encapsulated both technically and functionally.

Another example is a so-called security

wrapper for runtime monitoring of application systems.

This wrapper has the task of observing the behavior at the interface of a component and then comparing it, for example, with the specified security policy of the overall system.

A final example is the wrapper class known in Java


Wrapper classes allow the conversion of a primitive data type into a string and vice versa from a string back into a primitive data type. In addition, so-called wrapper objects are responsible for encapsulating a simple primitive data type in an object

. The basic idea of the wrapper design pattern (or adapter pattern) is to realize the adaptation of the interface to another interface, which can then be used by a client. The wrapper pattern allows classes that could otherwise not work together because of incompatible interfaces.

Informationen zum Artikel
Englisch: wrapper
Updated at: 02.11.2013
#Words: 696
Translations: DE