Separation of concerns. The person writing the HTML should get to decide where the data is rendered in the page, not the person generating the data. What you've done (as far as I can tell) is unnecessarily couple the backend to the structure of the presentation layer.
wwweston|4 years ago
Someone using the Content Addressing Sheets feature of CAST would actually be adding an additional layer of separation:
* HTML - document structure with decorating attributes/semantics
* Content Addressing Sheet - determines where in the document computed content is displayed
* Domain Logic - determines values to be computed
The CAS is a CSS-like DSL that is very much not the backend host language (though it may invoke things defined within that language).
Will the same person author the HTML and CAS? Not necessarily, but it's certainly as plausible as someone authoring an HTML file with template syntax sprinkled around.