Types of ModulesTypes of Modules
External patterns for modules
Home > Books > Solutions Developer Guide > Module Development > Patterns > Types of Modules
 search 

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


Types of Module

From an architectural and design persepctive, it may be helpful to to partition an application into modules that have a specific focus. This page 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. A fulcrum uses transports to communicate with the world outside of NetKernel and therefore is not imported by other modules and does not need to export a pubic address space.

Operation

A Transport receives an external event on a transport. The Transport interprets the event and issues a request to the internal address space of the fulcrum module. The request is matched by an imported module's address space and enters that module to be serviced.

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. An application module is imported into a Fulcrum module. An application module hosts application specific services and resources and will import other application-specific modules and/or lower level library modules.

Operation

An application module receives requests on it's public application URI interface. Generally requests are rewritten to invoke an internal service or process (see Internal patterns below).

Example

<install>/modules/mod_developer-x.x.x.jar

  • Virtual Host
  • A subclass of the application pattern - the Virtual host exports a public address space for one or more host specific URI address spaces. See virtual hosting guide .

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 it's 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 it's 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 imports the class library module. A class library generally only exports 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/ directory (this is not recommended).

Example

<install>/modules/ext_xml-core-x.x.x.jar

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