Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

10.2 The Three-Layer Architecture

The net library consists of a foundation plus three architectural layers: the Communication Adapter Layer, the Portal Layer, and the Communication Services Layer. Each layer is built on the one before, and offers increasingly abstract services. All three layers are built on a foundation of fundamental datatypes. An application can use any or all of the layers, trading off abstraction for fine implementation control.

Figure 6 demonstrates the architecture of the net library. There are four parts: the foundation and the three layers. The next few sections discuss each layer in detail.

Figure 6 -- Three-layer architecture of net library

10.2.1 Foundation

To build a sophisticated library like net, many helper classes, including string and container classes, are needed. The Foundation layer provides these helpers, together with other services needed by all the layers. The Foundation layer simplifies the implementation of the net library, making its interface much easier to use and understand. Most of the Foundation is provided by Tools.h++, rather than by the net library.

10.2.2 Communication Adapters Layer

The communication adapters are designed for maximum power and efficiency. They give you complete control over the communications channel. Each adapter in the Communication Adapters Layer is a complete, object-oriented, C++ programming interface to a communications system, or a part of a communications system.

Many communication adapters provide a thin veneer over an existing procedural Application Programming Interface (API), such as Berkeley sockets. In these cases, the corresponding Tools.h++ Professional adapter uses the same concepts and terminology as the procedural API, making the adapter especially easy to use if you have experience with the procedural API. All of the functionality of the procedural interface is preserved. The adapter is designed to work together with legacy code written using the C API, by providing the ability to "kickdown" from C++ objects to the native data structures.

Communication adapters use object-oriented concepts and C++ language features to make the underlying system easier to use. For example:

10.2.3 Portal Layer

The Portal Layer provides a communications interface that can use any communication adapter for its underlying communication channel. This portable interface is used by the Communication Services Layer to provide transport-independent services.

10.2.4 Communication Services Layer

The communications services leverage the Portal Layer to provide transport-independent communication services. The services provide functionality at a high level of abstraction.


Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.