Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This is what the template format will look like.

<div>$ID$</div><div>$Life$</div>

$ characters can be represented by a double string. We can pass in an array.

What are the advantages:

  • Developers don’t need to think about whether or not the data they are putting in can have special characters - which is common source of bugs in web applications. The templating library will always do it.

  • The ‘library’ can be expressed in a few lines of Javascript - so no big mystery on how it works.

  • There are no fancy callback features to tempt developers to write complicated code.

  • There is no caching - but we don’t have 600 extra lines of unnecessary Javascript and caching takes extra memory and is probably premature optimization and our simple code will be faster anyway.

  • Putting the responsibility elsewhere for handling logic in absence of data etc. Encouraging separation of concerns.

  • There is no danger of the templating library becoming a crappy language.

  • No labels