Home > Articles

  • Print
  • + Share This
This chapter is from the book

Adapter Coding

Adapters can be developed in any programming language. However, some languages provide better support for adapters then others. For example, Java has an excellent component model in the form of Java Beans and Enterprise Java Beans. Java also has specific support for hosting adapters in J2EE-compliant servers. Java JNDI can be used to access code developed in other programming languages such as C and C++. Also, the multiplatform support of Java makes a strong case as the language of choice for adapter development.

Having said that, there will be cases in which other languages are better suited for specific environments. In the case of embedded operating systems and databases, C or C++ may be the only language available or may be better for performance-related issues. When faced with a proprietary platform that supports only specific programming languages, your choice could be limited. Hence, the logical architecture of an adapter is devoid of any programming language or platform. Regardless of the programming language used to develop the adapter, the basic principles of the development methodology described in this chapter are applicable to all adapter development projects.

Using Appropriate Tools

The complex task of defining integration requirements, developing adapters, and deploying the integration solution requires good tools. Very little specialized development tool support exists for adapters. The basic tools needed for design, coding, and testing adapters are not very different from the standard development tools. However, specific features help to speed the developer and QA tasks in particular, as required for adapter development. Developing adapters generally involves external components such as parsers and mapping engines. For example, XML document editors are required to create, view, and edit document definitions. Ideally, development tools should support easy extensions such as adding editors, generating test data, and so on.

Support for Top-Down and Bottom-Up Coding

Many very good development tools are available today. Most of the popular IDE tools are comprehensive and include modeling capabilities, code generation, version control, deployment management, and so on. Some of the more popular tools, especially for Java programming include Together Control Center, Rational Rose, Borland JBuilder, and IBM VisualAge. Apart from the features listed here, one very important feature especially for adapter development is the capability to support top-down and bottom up development.

Top-down development starts with a UML-based model, including business process definitions, requirements in the form of use cases, and so on. This type of development is more appropriate in the case in which adapters are built for a well-known set of integration requirements, and in the situation in which the applications involved have APIs and other documented points of interface. However, if the adapter is to be designed with little knowledge of the applications or no known points of integration, a more iterative method of coding and testing is required. This is where the development tools need to support easy transformation of code to higher-level models of abstraction. It is important to keep the code and the model in synchronization.

When selecting development tools for adapters and integration projects in general, you need to take into consideration the different coding methods and full lifecycle support. It is advisable to go for a high-end development tool when developing adapters because many applications could be involved. Being able to model the complex integration scenarios enables you to see the big picture and build the right adapter functionality. One such tool is Together Control Center from TogetherSoft Inc., which was used for developing the example JCA connector in this book. All the models (use case, class diagram, and so on) in this book were also generated by Together Control Center. (An overview of the Together Control Center tool with instructions of where to get further information is contained in the Appendix B, "References.")

  • + Share This
  • 🔖 Save To Your Account