Stencils
Over the past couple of years, I have come to rely on stencils for building macros, tools, and plugins. My simple definition of a stencil is that it is a template for macros. It is the html code that is used to produce the macros output. Stencils may be more complex than Manila templates, because they may need repeating or conditional structures.
A stencils job is to separate the output from the code. If the code generates the output (like html), then the users must know how to code to change it. Using stencils allows the user to design the output, without knowing how write, view, or understand the code.
Through stencils, the user decides the macro's output. They might like the html table based output that I designed, or they may rather have it appear as a bulleted list. The output, in fact, doesn't even have to be html, the stencil could product xml or even plain text.
3:30:55 PM
|
|