NetKernel Development: Construct
The Construct phase of NetKernel development
concentrates on building the essential resources and services
required by an application.
Details on new resource and service construction is covered in detail in the
NetKernel Extension Guide
.
The development of core resources and services may require special knowledge of
a domain or technology and once written may be used in multiple applications.
Many core services and resources are included in the NetKernel
distribution.
Refer to the
NetKernel API and Services Reference
and the
Resource Model Guide
to see if you can use or leverage existing capabilities.
It is possible to decouple the construct phase
from the compose phase of development through the
use of NetKernel
modules
and
address space
partitioning.
As you will see, the
compose
phase is focused on the use and coordination of services and resources.
Since all services and resources are identified by a location in a particular
address space specified by a URI,
it is possible to construct a set of surrogate services
for use by developers focused on the compose phase.
To use surrogate services and decouple the construct and compose phases,
create a module and configure it to support the anticipated
address space and services.
For example, map all service requests to a single script that
will return the same
value each time it is called.
This will allow the calling client code to be composed and tested
independently.
While focusing on the development of the authentic services and resources,
it is important to establish scaffolding to support and test the new code.
This can be done by creating a module that will host test drivers and
which imports the module under development.
You can also use the
XUnit
testing framework
to drive new code.