Glossary - js-lib-com/wood GitHub Wiki
A component that is not completely defined and cannot be used for pages generation or for inclusion as child component. A template is an abstract component.
An WOOD component can include child components in a tree hierarchy of not limited complexity. Child components are referenced by their component path using WOOD operator wood:compo="component/path"
.
Aggregation is an OOP term whereas in WOOD parlance is known as inclusion.
Component source files can contain references to variables, resource files and layout parameters, all using the same at-meta Syntax, from where the name is derived.
Syntax using at character ('@') as prefix for references declarations. It is used on component's source files to declare references to variables, resource files and layout parameters. For example @string/app-name
is the string variable app-name with value defined into a variables definition file.
WOOD build process creates web site files from project components - resulting files being standard HTML and related styles, scripts and media files. Build process reads component source files and resources from project, consolidates them into pages and write to the target file system. Takes care to include style and script files into the proper order on generated page header.
In an aggregation relation, child component is the included one. Any concrete component can be child component; there is no special operator to mark a component as child. Anyway note that template is an abstract component therefore cannot qualify as child component.
Child reference element, for short child reference, is an element from parent component that declare an aggregation. It is used to declare child component path, using wood:compo="component/path"
operator. Optionally, child reference element can define layout parameters with wood:param="name:value;*"
operator.
Child reference and child component root elements should have the same tag name.
WOOD component, for short component, is a reusable unit similar to object from OOP. Component has visual appearance, properties and behavior described in separated files: mandatory layout (.HTML) file and optional style (.CSS), script (.JS), resources (e.g. media files but not limited to) and descriptor files.
All component files are stored in a single directory; by convention directory name is the component name. If component has only layout file there is no need for separated directory and such simplified component is known as widget.
Component directory path relative to WOOD project root, also known as component qualified name. It is usually called template path if referring a template component.
It always uses forward slash as path separator and is always relative. For widget, component path is the layout file path but using file base name, that is, not extension.
Component path is used by WOOD operators to reference components, e.g. wood:compo="component/path"
or wood:template="template/path"
.
Component root element is the root of its layout file. Note that a component always has at least layout file.
A specialized component that define content for editable elements from a template. A content component extends or realizes the template. Without content component template is abstract and cannot be used for page generation.
Root element from content component layout is named content embed.
Layout file root element from a content component. It declares the reference to template using operator wood:template="template/path"
and contains content child elements for template editables. Child content element has a reference to editable element declared with operator wood:content="editable-name"
.
This root element has the tag embed
, from which it borrows the name. Its only purpose is to declare template reference and is not included into generated page. Also all attributes declared into embed
element are discarded.
An element from a template marked with operator wood:editable="editable-name"
. It is a placeholder and should be empty. Template layout supports multiple editable elements but their name should be unique on template scope.
WOOD term for OOP aggregation.
Is a concept borrowed from OOP. We can say that a content component inherits layout elements declared on template.
Template is the WOOD term for OOP inheritance.
A template used inside a component with content declared inline. It is a simplified syntax replacing an aggregation and an inheritance. See Inline Template.
User interface structure, especially graphical elements dimensions and positions. WOOD uses HTML to describe layout. Layout file is mandatory for all WOOD components.
Object Oriented Programming is a programming paradigm that uses objects to model reality. An object has properties and behavior. Similarly, a WOOD component has properties, appearance and behavior tied together in a reusable unit.
A component whose layout root is the <body>
tag or inherits from a template that whose layout root is the <body>
tag.
Component qualified name is an alias for component path.
Target file system defines the directories structure for the web site files. It is created by build process. Different file systems structures are supported but a default implementation exists.
A template component, for short template, is a component whose layout has editable elements acting as placeholders. A template is an abstract component and cannot be used for pages build; it requires a component describing the editable elements content.
A simplified reference syntax for templates with a single editable element. Canonical template usage requires two operators: wood:template="template/path"
for template component reference and wood:content="editable-name"
for editable element name.
For templates with a single editable element it is allowed to merge those two operators in a single one using URL fragment notation, hence the name, e.g. wood:template="template/path#editable-name"
. See template fragment description
Component path when referring to a template component.
An XML file with a flat list of child elements, every element defining a variable: element tag is the variable name and element text content is the variable value. Variables are grouped by types: string, text, color, dimen, link and tip; XML root element tag is this variable type. A variable is referenced from component's source files using at-meta syntax.
Version Control System - a fancy name for Git server ;-).
A primitive component that has only layout file therefore does not require a separated directory. For example a select with options initialized and reused in multiple pages. An widget can be used only for inclusion and uses the same wood:compo="component/path"
operator as normal component.
WOOD stands for Web Object Oriented Development and is a command line build tool for user interfaces, based on W3C technologies - HTML and CSS, and plain ECMA Script. Its main goals are fighting complexity via decomposition and improved code reusability.
Last updated 9/5/2022.