The nCoDE editor provides visual programming environment for creating and editing new endpoints by composing existing endpoints.
This page gives an overview of the user interface features of the nCoDE editor. For more details of nCoDE in general see the nCoDE Book.
The nCoDE editor supports full undo/redo functionality with a configurable history. This history survives saves but not page reloads. No changes are persisted until the editor is saved; at this point all endpoints are saved atomically. Autosave can be enabled so that the endpoints are save automatically when the page looses focus - this is useful for rapid prototyping.
The toolbar provides the following functions:
The palette provides access to available composable endpoints. It is organised into groups which maybe selected and expanded. Endpoints from the palette are dragged off and onto the edit canvas to be worked with.
The Inputs/Outputs group will update to show all available input arguments for the current endpoint as well as all other nCoDE endpoints available within the same runtime. Organising functionality into private library endpoints aids modularity.
Double clicking on an palette endpoint will display documentation about that endpoint if available.
When a new nCoDE prototype is created it has no endpoints. You must click on the [+] tab to create a new endpoint. Additional new endpoints can be created at any time. Each composed endpoint is represented as a new tab. Inside the tab is the edit canvas where you can drag existing endpoints and link them together. Initially an endpoint will contain only an un-connected response. What you connect to this will determine what your new endpoint returns as it's response.
Double clicking on the tab name will allow you to edit the endpoints properties including its name, description, id, if it is public (exposed outside it's origin module), supported verbs and its identifier grammar.
Grammars use an XML syntax to define the set identifiers that will map to an endpoint and also how any argument values are encoded into that identifier. For more details see here.
Composable endpoints are incorporated into the new endpoint by dragging them from the palette onto the edit canvas. Once dropped they can be linked together using wires between their connectors, moved, resized and deleted. Endpoints have argument connectors on their left edge and a response connector on their right edge. If endpoints inject resources into scope for their arguments these will appear as connectors on the bottom of the endpoint. (don't worry to much about the details of these injected resources for the moment, only a few special endpoints ever need to do this)
Move an endpoint by clicking in it's central area and dragging it. Similarly an endpoint can be resized by clicking on the resize handle on the lower right corner. An endpoint can be deleted by clicking on delete button which will appear on it's top right corner after being selected.
Literals have values which can be edited. Double clicking on the literal will open a dialog box allowing it to be edited. Values are validated.
Endpoints which are invalid will appear red. There are three reasons why an endpoint may be invalid:
Every endpoint on the edit canvas (except the response) has a response connector on its right-hand side. This represents the output (or response) from the endpoint.
Argument connectors on the left-hand side of endpoints appear due the arguments specified in the underlying endpoints grammar. Connectors will dynamically appear or disappear based on the specific rules of the grammar. Mandatory connectors which must be connected are shown as fully open icons. Optional connectors are shown as half open icons. Endpoints that are connected show as fully closed icons.
Some endpoints have arguments that can be renamed. Usually this is when endpoints use the varargs construct in their grammars. Double clicking on a connector will open a dialog box allow its name to be edited. Renamable connectors are indicated with an asterisk * at the end of their name.
Composable endpoints are connected together by dragging wires between their connectors. Responses are connected to inputs. When a wire drag is initiated valid ends are highlighted to aid correct placement. Only one wire may connect to an input. Multiple wires may connect to a response.
Wires can be deleted by selecting them with a click and then clicking the button which will appear at the wires center point.
Endpoint reference documentation is linked in to nCoDE. Double clicking on any endpoint in the palette will show a floating documentation window. This window can be left open whilst you compose.
The settings dialog allows you to edit global properties of the nCoDE instance. These settings include autosave, undo history length and dynamically imported palettes.
The palettes table within the settings dialog shows all discovered palettes in NetKernel. Palettes which are available because they have been imported into the host space of the nCoDE prototype appear and are checked to indicate they are being used.
When dynamically imported palettes are enabled you will be able to select further palettes to use within this nCoDE instance. Once selected these palettes will be immediately available.