I\'m working on a SF2 application that uses a lot of javascript on the front end.
SF2 provides me a good way of building a nice REST app, manage my database with doc
Use {@ variable @} in templates. After template generated just replace {@ with {{ and @} with }} with simple str_replace function. This way is clean and much faster then strings concatination and so on.
{@ variable @}
{@
{{
@}
}}
str_replace