Module TypesModule Types
Major types of modules
Home > Books > Solutions Developer Guide > Modules > Module Types

Rate this page:
Really useful
Satisfactory
Not helpful
Confusing
Incorrect
Unsure
Extra comments:


Common Module Types

From an architectural and design perspective, it may be helpful to partition an application into modules that have a specific focus. This section explores some common module types and describes the supporting patterns.

Fulcrum

Definition

The Fulcrum pattern is a module which hosts one or more transports. A fulcrum does not generally provide any local resources or services - it is a container which imports the address spaces of other modules and bridges them together through its mechanisms. Since a fulcrum uses transports to communicate with the outside world it does need to receive requests from an importing module, hence fulcrums do not export a public address space.

Operation

When a transport detects an event, it builds corresponding internal request and injects it into the fulcrum's private address space. Since a fulcrum does not provide services itself, the request will be routed to one of the modules imported by the fulcrum.

If a request is unmatched by the imported modules, a fulcrum can provide a fallback default match which initiates an exception process.

Example

[install]/modules/front_end_fulcrum

Application

Definition

The application pattern is a module which exports an application specific URI address space and is imported into a fulcrum module. An application module hosts application specific services and resources and may import other application specific modules and lower level library modules.

Operation

An application module receives requests on its public application URI interface. Generally requests are rewritten to invoke an internal service or process.

Example

[install]/modules/mod_developer-x.x.x.jar

Virtual Hosting

A sub-class of the application pattern - the virtual host exports a public address space for one or more host specific URI address spaces. See the virtual hosting guide for more information.

Service Collection

Definition

A service collection is a module which exports a set of services - these might be application specific services or general utility services. The module exposing a service collection does not expose how the services are implemented. Services are implemented internally and may use the services of other modules imported into the service collection module.

Operation

A service collection module receives a request for a service on its public URI interface. The request is rewritten to invoke an internal service implementation.

Example

[install]/modules/mod_xml-ura-x.x.x.jar

Resource Library

Definition

A resource library is a module which hosts and exports a set of resource URIs for a collection of internally hosted resources. Generally the resources are static though they could be dynamically generated.

Operation

A resource library is useful for hosting a collection of common resources - for example images or XSLT transforms. A resource library may be imported by many application modules.

Example

[install]/modules/xlib-x.x.x.jar

Class Library

Definition

A class library is similar to a resource library but hosts Java classes and exports a public Java package space for its hosted classes.

Operation

A class package space is exported from the module. The package space is available for import by Java classes whose parent module import the class library module. A class library generally only export classes which it implements internally though it can, if absolutely necessary, also export the class path of any JAR libraries which it hosts in its lib/ directly (this is not recommend).

Example

[install]/modules/ext_xml-core-x.x.x.jar

© 2003-2007, 1060 Research Limited. 1060 registered trademark, NetKernel trademark of 1060 Research Limited.