A space provides the context for resolving and evaluating a request. In NetKernel you can "program" spaces. That is you can declaratively configure the way that resource requests will be resolved to endpoints. It turns out that composing spaces allows you to create very elegant software architectures using a whole new world of architectural patterns (these are introduced and explained in the tutorials).
The following section very briefly explains how a space works. Don't worry if this seems very new. The tutorials take you through a hands on tour that will gently get you familiar with what is possible.
Endpoints are located in spaces. When a request is issued into a space, the space sends a resolve request to each of the endpoints it contains until one indicates that it will handle the request. That endpoint is then invoked with the request to evaluate (as we saw in the previous section).
Endpoints are bound to a Space through a grammar, a technology
that describes how an identifier is recognized and parsed.
It is often convenient to use a grammar that
maps sets of identifiers to an endpoint.
This diagram illustrates a request for
res:/person/teresa resolving to an endpoint that
accepts requests for resources with identifiers in the set
res:/person/ by using a grammar
with the regular expression
NetKernel provides three declarative grammar languages.
Since grammars define the boundary between address spaces and code execution its a good idea to explore and play with the grammar languages. The Grammars Kitchen tool provides a set of examples and an environment to experiment in.
In addition to partitioning a space into identifier sets, relationships may be established between spaces. For example, in the following diagram an import endpoint brings the resources of space "B" into space "A".
The ability to define and configure identifier sets, spaces and relationships between spaces is very powerful. It allows system architects to define the logical structure of applications and systems without being constrained by physical level bindings, API limitations or even representation types.