Project Docs Github
Log in
ittf site docs concepts t ittfdocuments ittf-composition.html.ittf Edit
  • /ittf/site/docs/concepts/t/ittfdocuments/ittf-composition.html.ittf
  • /ittf/site/docs/concepts/t/section.html.ittf

/ittf/site/docs/concepts/t/ittfdocuments/ittf-composition.html.ittf (primary)

edit
                                            
1 $group
2 $
3 var sect = {
4 title: 'Ittf documents composition'
5 };
6 section( §)
7 p An ITTF Document, when loaded, becomes a javascript object called `mTreeBrick`.
8 p mTreeBricks are composition units. They can mix, or include, other bricks and can
9 \b be mixed, or included.
10 \b The mix or include operation is declared on a node of the mixer or includer brick,
11 \b that will be replaced from the nodes of the mixed or included one.
12 p An mTree loading begins loading a primary ITTF Document, that become the primary
13 \b mTreeBrick, the starting point of the composition. Included and mixed
14 \b ITTF Documents become composed
15 \b mTreeBricks.
16 p A single mTreeBrick can be composed many times in different positions of
17 \b the builded mTree. It is loaded once, and cloned for composition.
18 p Include and mix operations have a different behaviour. When included, cloned mTreeBricks,
19 \b become part of the includer brick and their nodes acquire its brick key and
20 \b its brick evaluation context. Instead, mixed mTreeBricks, are inserted in the
21 \b node structure of the mixer, but each of them mantains its original brick key
22 \b and brick evaluation context. When coding an ITTF Document, that will become a
23 \b mixed mTreeBrick, created variables will have a scope limited to the nodes declared
24 \b in the document, even if they will be merged in the mixer brick.
25 p Summarizing: primary and fragment mTreeBricks have their own evaluation context, included
26 \b mTreeBricks use the evaluation context of their includer.
27 p In case of a mixed mTreeBrick the mixer node can have children nodes that in turn
28 \b can replace 'hook' nodes of the mixed brick. See the '$hook' and '$append'
29 \b ittf command nodes for the composition rules of a mix operation.

/ittf/site/docs/concepts/t/section.html.ittf

edit
                                            
1 $group
2 $params §
3 article
4 . doc-title
5 id ${sect.id}
6 + ${sect.title}
7 . doc-summary
8 $hook
Save
Save & Refresh
Cancel