Dynamator Pure HTML for every page generation technology.
           

Function

Dynamator is a tool that takes as input an HTML or XML template file and a Dynamator file containing program code and editing instructions, and produces as output a server page or program.

Design Properties

  • Technology-neutral.
    Dynamator can be used with any programming language, page generation technology, and architecture.
  • No strings attached.
    Dynamator is a pure tool that leaves no trace of itself in generated files. No Dynamator components need to be delivered to any execution environment.
  • No performance penalty.
    Dynamator generates code that is as efficient as hand-written code.
  • No surprises.
    Software developers have complete control over generated code. Anything a developer would want to do in a server page can be done with Dynamator. Dynamator is not a CASE tool; it just allows the code to be stored in a different place.
  • Walk away at any time.
    Dynamator generates maintainable code. If for some reason it is necessary to discontinue use of Dynamator, the generated code can usually be maintained without code changes or reformatting.

Capabilities

Execution

  • Runs from the command line.
  • Runs as an ant task.
  • Can be called programmatically from Java.

Input (template) file types

  • HTML.
  • Partial HTML files.
  • XML.
  • Any XML-based file type.

Output languages

Dynamator provides two levels of language support. If Dynamator knows about a language, it can generate programmatic value substitutions and iteration and selection constructs. If Dynamator doesn't know about a language, programmers have to code those constructs. This is the difference between coding <content>a</content> and coding <raw-content><%= a %></raw-content>.
  • Language-aware support for:
    • JSP
    • ASP (VB)
    • XSL, producing XML, HTML, or text
    • PHP
    • Java (using out.println)
    • HTML (static text)
    • XML (static text)
  • Non-language-aware support out-of-the-box for any stream-based template language, such as Cold Fusion, Velocity, ASP.NET, and HTML::Template.
  • Plug-in architecture makes it easy to add language-aware support for other template and programming languages.

Identification of template elements to be changed

  • Address all elements having a certain id value.
  • Address all elements having a certain class value.
  • Address elements by a combination of name, attribute values, and presence or absence of attributes.
  • Address arbitrary blocks of text using commented div tags.

Element manipulation

  • Replace the content of any element.
  • Remove any element and its children.
  • Remove any tag and its corresponding end tag.
  • Rename any element.
  • Replace the content of any element with code to output a program-supplied value. (requires language awareness)
  • Extract an element and its children so that it can be used as a subroutine.
  • Extract an element and its children into another file.
  • Insert code to cause any element and its children to be repeated for each element of a collection. (requires language awareness)
  • Insert code to cause any element to be output only if a condition is met. (requires language awareness)

Attribute manipulation

  • Add attributes to any element.
  • Add attributes to any element with code to output a program-supplied value. (requires language awareness)
  • Change the value of any attribute to a textual value.
  • Replace the value of any attribute with code to output a program-supplied value. (requires language awareness)
  • Remove any attribute from any element.
  • Perform textual substitutions on any attribute value.
  • Rename any attribute.
  • Insert code to cause any attribute to be output only if a condition is met. (requires language awareness)

Text insertion

  • Add text or code to the very top or bottom of the generated file.
  • Add text or code before or after any element.
  • Add text or code before or after the content of any element.

Miscellaneous

  • Include another Dynamator file.
  • Remove all HTML comments from the generated file.
  • Remove all HTML indentation from the generated file.

Internationalization

  • Supports international character sets.
  • Supports the traditional replace-all-text-with-program-code approach to internationalization without requiring text to be replaced in the HTML.
  • Enables a static-demo-site-per-locale approach to internationalization that results in improved maintainability and application efficiency over the traditional approach.