Availability Guide for Application Design

Designing Applications for Change
Availability Guide for Application Design525637-004
10-12
Considering Portability Requirements
HP extensions to workstation editors and debuggers.
Isolating the Unportable
Regardless of which engineering approach to portability is taken, it may be necessary
to include nonportable function calls. It is essential to isolate the mainline application
code from these items. In effect, a local API must be invented to give access to an
easily replaceable library that maps that API to the required platform-specific functions.
The isolation should take effect at two levels: syntactic and semantic. Syntactic
isolation is almost automatic, although simplification and more rigorous parameter-
typing can create a more abstracted interface better suited for use by business logic
developers. Semantic isolation should avoid exposing implementation-specific
performance or functional specializations to the application developer. Such
specializations should be used within the library, possibly in response to configuration
parameters set independently of the mainline application logic. The success of the
business logic should not depend on the presence or absence of such specializations.
Worrying About the Bits
Even when a standard language is used, there are other potential platform
dependencies that must be suppressed by good coding standards. The lessons
learned in the transition from 16-bit to 32-bit machines must not be forgotten: source
code and logic should remain independent of the size, order, and alignment of data
items.
Preserving Investments Through Services and Frameworks
A consulting report concerned with application development for an adaptive enterprise
made the point that “the applications, and not the enablers, are the jewels.” This
emphasizes the need to isolate the business logic from the platform or tools with which
it was originally implemented. One approach to achieving this is to design and
implement on the basis of services and frameworks, rather than on the basis of
programs.
Services
Each business processing operation should be analyzed, designed, and
implemented as an independent service unit using only portable APIs such as ISO
C, COBOL, and ANSI SQL, and following portability-aware coding standards. The
service should be invoked as a standard procedure call in the language of choice,
with the input and output parameters defining the necessary request and response
structures. These units are the key to protecting the investment since the
application-specific logic is contained within them in a readily reusable manner.
Frameworks
For each chosen implementation environment, these business services must be
hosted in a specific framework that will use the APIs of the environment and
convert invocations into normal function calls on the appropriate business service.