Skip to content

Commit 36e8958

Browse files
authored
Handlebars, Mustache added to UG Glossary (#535)
1 parent c4dca9f commit 36e8958

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

user-guide/modules/ROOT/pages/glossary.adoc

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,14 @@ Note:: The Bloom filter is named after its inventor, Burton Howard Bloom, who de
195195
[[h]]
196196
== H
197197

198+
[[handlebars]]
199+
*Handlebars* : https://github.com/jbboehr/handlebars.c[Handlebars] is a templating language used to generate text (HTML, JSON, config files, source code, etc.) by combining a template with data.
200+
You write placeholders like `{{name}}` or conditionals like `{{#if active}}`, and the engine replaces them with values at runtime. The original Handlebars was a JavaScript project, though developers have found the pass:[C++] port useful for code generation, report and config file creation, embedding HTML or JSON templates, and web server frameworks that render dynamic pages.
201+
202+
The Handlebars concept works well with boost:json[] as it integrates easily with data-driven templates, boost:property-tree[] to represent hierarchical data, boost:spirit[] to parse templates into an internal format, boost:filesystem[] to load and organize templates from disk, among many other use-cases. More advanced work might involve boost:beast[] to render dynamic web pages, boost:process[] to generate config files for subprocesses, and boost:program_options[] to feed runtime configuration into templates.
203+
204+
<<mustache, Mustache>> is the lightweight, portable ancestor of Handlebars.
205+
198206
[[hash-functions]]
199207
*Hash Functions* : A hash function takes a string and converts it into a number. Often used in fraud detection to store details such as: email addresses (normalized/lowered), credit card fingerprints (not full PANs as this might expose sensitive data, usually the last four digits or a _tokenized_ version of the numbers), device IDs, IP and user-agent strings, phone numbers (E.164 format), and usernames / login handles. Once hashed, these numbers can be stored in a database and searched for patterns to create <<bloom-filter,Bloom Filters>> (to detect fake accounts) as well as searched on a per-item basis. Commonly used hash algorithms include:
200208

@@ -266,7 +274,7 @@ Note:: For uses of hash functions in Boost libraries, refer to boost:hash2[], an
266274

267275
*IWBNI* : _It Would Be Nice If_ - a feature request is a dream
268276

269-
*IWYU* : https://include-what-you-use.org/[include-what-you-use] - a tool for use with clang to analyze `#includes` in C and pass:[C++] source files.
277+
*IWYU* : https://include-what-you-use.org/[include-what-you-use] - a tool for use with Clang to analyze `#includes` in C and pass:[C++] source files.
270278

271279
== J
272280

@@ -337,6 +345,11 @@ Note:: For uses of hash functions in Boost libraries, refer to boost:hash2[], an
337345

338346
* *Visitor Pattern* : a design pattern that lets you separate an algorithm from the objects it operates on — by letting you “visit” objects and perform operations on them without modifying their classes. It allows you to add new operations to a group of existing object types without changing those types, by defining a `Visitor` class that implements the operation for each type. It's commonly used to achieve double dispatch and to apply operations across complex object structures like trees or <<ast, ASTs>>.
339347

348+
[[mustache]]
349+
*Mustache* : https://github.com/kainjow/Mustache[Mustache] is a logic-less templating language, originally designed for generating text files (like HTML, JSON, config files). It's called "logic-less" because it avoids embedded control structures or code. That makes it ideal for clean separation between code and output, template portability across languages (same Mustache template can work in pass:[C++], Python, or JavaScript), and easy embedding in low-level applications.
350+
351+
Mustache is a similar but simpler alternative to <<handlebars, Handlebars>>.
352+
340353
*MVP* : Model-View-Presenter
341354

342355
== N

0 commit comments

Comments
 (0)