You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allows construction of diffs for LiveView / HTML-on-the-wire style server side rendering
Can use standard HTML syntax, so developer can copy-and-paste examples
None of the existing systems achieve this. ScalaTags comes the closest, but it doesn't support standard HTML syntax. It would be useful to experiment with an alternative system.
A viable implementation path is:
Develop a parser for HTML. We can assume a very simple structure and not allow omitting closing tags, CDATA, or other complications. This parser will need to able to splice in computed values. Look to see if Parsley can be used for this. If not, reviving Repast may be the way forward. ScalaTags is a reasonable target format for this translation.
Provide the parser as a StringContext. Now we can write HTML snippets directly in code.
Look at creating a SBT plugin like sbt-twirl to allow stand-alone templates.
Replacing ScalaTags with a more efficient format (e.g. one that streams directly to the response when running server side, instead of building a String in memory.)
The text was updated successfully, but these errors were encountered:
What we want from a templating system:
None of the existing systems achieve this. ScalaTags comes the closest, but it doesn't support standard HTML syntax. It would be useful to experiment with an alternative system.
A viable implementation path is:
There are a few optional extras:
String
in memory.)The text was updated successfully, but these errors were encountered: