Skip to content
Browse files

Guides/forking: wording

  • Loading branch information...
1 parent 4dc441a commit cffa93243a02a382d5c5aeec7d9a8c599be808e0 @groue committed Aug 25, 2012
Showing with 23 additions and 18 deletions.
  1. +23 −18 Guides/forking.md
View
41 Guides/forking.md
@@ -13,6 +13,8 @@ You'll find below some useful information on each of those topics.
The library features are described in the [guides](introduction.md). This section describes the classes that implement those features. They are organized in a few big domains:
- **Parsing**
+ - `GRMustacheTemplateRepository`
+ - `GRMustacheTemplateRepositoryDataSource`
- `GRMustacheParser`
- `GRMustacheToken`
- `GRMustacheExpression`
@@ -21,6 +23,10 @@ The library features are described in the [guides](introduction.md). This sectio
- `GRMustacheImplicitIteratorExpression`
- `GRMustacheScopedExpression`
+ *Template repositories* are objects that load template strings from various sources.
+
+ GRMustache ships with various template repositories that are able to load templates from the file system, and from a dictionary of template strings. The library user can also provide a *data source* to a template repository, in order to load template strings from unimagined locations.
+
The *parser* is able to produce a [parse tree](http://en.wikipedia.org/wiki/Parse_tree) of *tokens* out of a template string.
For instance, a parser generates three tokens from `Hello {{name}}!`: two text tokens and a variable token.
@@ -46,36 +52,35 @@ The library features are described in the [guides](introduction.md). This sectio
For instance, from the tokens parsed from `Hello {{name}}!`, a compiler outputs an AST made of one template containing two text elements and a variable element.
-- **Runtime**
+- **Runtime contexts**
- `GRMustacheContext`
- - `GRMustacheFilter`
- - `GRMustacheFilterLibrary`
- - `GRMustacheHelper`
- - `GRMustacheInvocation`
- - `GRMustacheSection`
- - `GRMustacheTemplateDelegate`
During a template rendering, a *context* implements a state of the context stack that is initialized with the initial object that the library user provides in order to "fill" the template, extends when entering sections, and shrinks when leaving those.
A context is able to provide the value for an identifier such as `name` found in a `{{name}}` tag.
- However, contexts are not responsible for providing values that should be rendered. Expressions built at the parsing phase are. For instance, expressions are able to perform a lookup for scoped expressions such as `person.name`, or apply filters such as `uppercase(name)`. The *filter library* provides with built-in filters.
-
- *Invocations* are generated by expressions, and exposed to the *template delegate*, so that the library user can inspect or override values that are rendered.
+ However, contexts are not responsible for providing values that should be rendered. Expressions built at the parsing phase are. For instance, expressions are able to perform a lookup for scoped expressions such as `person.name`, or apply filters such as `uppercase(name)`.
- The library user can implement *helpers* in order to have some sections behave as "Mustache lambda sections". In order to be able to perform the job described by the Mustache specification, they are provided with *section* objects that provide the minimum required information.
+- **Template delegate**
+ - `GRMustacheInvocation`
+ - `GRMustacheTemplateDelegate`
+
+ *Invocations* are generated by expressions, and exposed to the *template delegate*, so that the library user can inspect or override values that are rendered.
- Finally, the library user can implement her own *filters*, that will add to the built-in ones.
+- **Lambda sections**
+ - `GRMustacheHelper`
+ - `GRMustacheSection`
-- **Template repositories**
- - `GRMustacheTemplateRepository`
+ The library user can implement *helpers* in order to have some sections behave as "Mustache lambda sections". In order to be able to perform the job described by the Mustache specification, they are provided with *section* objects that provide the required information and tools.
+
+- **Filters**
+ - `GRMustacheFilter`
+ - `GRMustacheFilterLibrary`
- *Template repositories* are objects that provide templates out of template strings from various sources.
+ The *filter library* provides with built-in filters.
- GRMustache ships with various template repositories that are able to load templates from the file system, and from a dictionary of template strings. The library user can also provide a *data source* to a template repository, in order to load template strings from unimagined locations.
+ The library user can implement her own *filters*, that will add to the built-in ones.
- Finally, template repositories are responsible for providing the compiler with template partials.
-
- **Misc**
- `GRMustache`
- `GRMustacheNSUndefinedKeyExceptionGuard`

0 comments on commit cffa932

Please sign in to comment.
Something went wrong with that request. Please try again.