What are Adapters?
Adapters are small, focused programs that expose functionality and/or data in a legacy application. The use of this term includes not only the programs, but also the framework for designing and developing adapter programs. Adapters can be deceptively complex, with “thick” adapters performing a variety of functions that include recognizing events, collecting and transforming data, and exchanging data with platform, integration suite or other middleware. However, “thin” adapters may only “wrap” a native application interface, exposing another more-standard one for application access. Adapters can also handle exception conditions and can often dynamically (or with minor reconfiguration) accommodate new revisions of source or target applications. Adapters are often sold in conjunction with integration middleware products, such as ESBs, integration suites or portal servers, or are offered as a stand-alone product, such as an adapter suite. Among the different adapters, high-level categories include technical and application adapters. A comprehensive suite should include adapters for:
- Common technologies, such as COM, Enterprise JavaBeans and Web services
- Industry protocols, such as EDI, Society for Worldwide Interbank Financial Telecommunication and RosettaNet
- Common applications, such as SAP or PeopleSoft
- Proprietary applications, such as an adapter development kit
Adapters are the generalization of the the code that handles autonomously the connection between a set of widgets and a corresponding set of properties (possibly observable) to keep aligned automatically the logical and the presentation sides, and to keep low the complexity of controllers.In the figure is represented a simple adapter, where main internal functional blocks are shown. There exist functional blocks to control (and possibly customize) the way the property and the widget are read and written. Also, there is a functional block to manage how errors are handled when exceptions occur when writing into the property. An Adapter adapts widgets and model's properties. Adapters offer strong customization, but in their simplest use they are pretty easy to be used.