Embedment Helper

An object that minimizes code in a templating system by
providing all needed functions to that templating
mechanism.

Many systems allow you to extend the capability of a simple
representation by embedding general-purpose code into that
representation to do things that otherwise would not be
possible. Examples include embedding code into web page templates,
putting code actions into grammar files, and putting callouts into
code generation templates. This mechanism of general-purpose
Foreign Code
adds a lot of power to the
representation it's embedded into, without complicatingthe basic
representation itself. However, a common problem when you do this
is that the
Foreign Code
can end up being
quite involved and obscure the representation that it's embedded
into.

Embedment Helper moves all the complex code to a helper class, leaving
only simple method calls in the host representation. This allows
the host representation to be dominant and retain its clarity.