4 ms·
Many people praise the PHP-native model of mixing HTML with server-side code (Dynamic HTML if I remember correctly), and rightfully so for many use cases. But
by theanonymousone 2y ago
Many people praise the PHP-native model of mixing HTML with server-side code (Dynamic HTML if I remember correctly), and rightfully so for many use cases.
But I wonder why no other languages has implemented this model, not even Python which is used for almost everything.
Templating is not the same thing as the language in the template is normally not the complete host language, and JSP is quite old and did not even support Java 8 the last time I tried :/
- resonious 2y agoThe React server side components crowd seem to have figured it out!
- steve1977 2y agoIs .NET Razor Pages not also using this model?
- darylteo 2y agoNah, Razor is a template engine. Laravel's equivalent is Blade. They're templates in the same that the templates is compiled into a string with parameters then the string is output to the response. What top post is referring to is the ability to control what is output to the buffer (raw characters) and what is scripted (<?php ... ?>). The closest equivalent would be classic ASP (not asp.net)
- theanonymousone 2y agoAs a side note, I once tried to do a hello world in Razor because of its Wasm capability and found the documentations unbelievably horrible. Admittedly I am not a .Net developer.
- mike503 2y agoDHTML was HTML mixed with JS/VB type scripting[1] not server side stuff like PHP :) 1. https://en.wikipedia.org/wiki/Dynamic_HTML https://en.wikipedia.org/wiki/Dynamic_HTML
- theanonymousone 2y agoThanks for the correction. Maybe something like dynamic web page was on my mind: https://en.wikipedia.org/wiki/Dynamic_web_page https://en.wikipedia.org/wiki/Dynamic_web_page