Module Structure
The Forum application is partitioned into three modules:
forum-services
, forum-web
,
and forum-style
.
As you know from the introduction to modules,
modules provide a means to aggregate, manage and version functions
of an application.
For the Forum application, the forum-web
module
contains all of the code responsible for interactions with
the user through a browser interface - the 'web-application'.
It exports the public address space ffcpl:/forum/.*
,
delegates styling and presentation to the
forum-style
module, and uses the capabilities of the
forum-services
module to perform the actual forum-related
work, such as saving postings to the database.
Module |
Description |
forum-web |
The web-application framework and public web-application
interface. |
forum-style |
Pluggable styling and presentation. |
forum-services |
The core application services.
These include data services accessing the Forum database
as well as installation and management applications.
|
The high-level structure of the Forum application is
illustrated in the following diagram.
ffcpl:/forum/.*
^
|
V
forum-web <---> forum-style
^
|
V
forum-services
Fulcrum Module
To expose the forum web-application to an HTTP transport,
the forum-web
module must be imported into a fulcrum.
As you know, a fulcrum
is the name given to
a module that hosts one or more transports.
The following diagram depicts the import of
the forum-web
module into the front end fulcrum
for access on the HTTP transport exposed on port 8080
HTTP Transport :8080
^
|
V
Frontend-Fulcrum
^
| http://.../forum/.* -> ffcpl:/forum/.*
V
forum-web
Importing
The forum-web
module is imported into the
front end fulcrum in the
<mapping>
section of the
front end fulcrum's module.xml
file.
Examine this file located in
[install]/modules/mod-fulcrum-frontend/module.xml,
and note the relevant
import tag:
<import>urn:org:ten60:netkernel:1060Forum:web</import>
This import specification refers to the name of a module (declared in a
module's module.xml
file)
and made known to NetKernel through inclusion
in [install]/etc/deployedModules.xml.
Mapping
The front end fulcrum is constructed to map http:/ requests
into the internal NetKernel ffcpl:/ address space. In the case
of the forum application the following path mapping is significant
http://.../forum/.* -> ffcpl:/forum/.*
Since the
forum-web
module is imported into
the front end fulcrum and the
forum-web
module declares that is exports ffcpl:/forum/.*
in the export section of it's
module.xml
file,
then all requests for the forum application are sent
to the
forum-web
module.