Prev | Current Page 496 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

The main qualities of Templo are:
Template contents are stored in files with the extension .mtt . A template file is just a plain text
file. The text format can be a full (X)HTML document or a fragment of it.
Templates are compiled in Neko files on the first access and are not to be parsed and interpreted
on each subsequent call; the Templo system monitors for changes in the source templates and
automatically compiles the changed ones when it is necessary. This behavior can be disabled in
a production environment to prevent accidental alterations and optimize performances skipping
the date check.
??‘
??‘
Chapter 10: Separating Design Using Templates
259
Templates can include other templates.
Templates have a richer syntax explained in detail next.
Installing Templo
Before explaining how to use Templo and the differences with the standard haxe.Template system, the
installation process is illustrated. The installation of the library itself is quite simple and the following
command from the command prompt/console will do the work:
> haxelib install mtwin
The last version of the Motion - Twin library is automatically downloaded and installed in the haXe
installation directory.


Pages:
484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508