3 ms·
I believe people are back to doing that for web stuff. Open up any modern web stuff and it looks like "const widget = <div>foo</div>". Not making this up! ht
by jrockway 8y ago
I believe people are back to doing that for web stuff. Open up any modern web stuff and it looks like "const widget = <div>foo</div>".
Not making this up! https://reactjs.org/docs/introducing-jsx.html https://reactjs.org/docs/introducing-jsx.html
- dmix 8y agoThe difference, at least for Vue single file template components is that it's 3 separate areas in one file: - <template /> (Templated HTML) - <script /> (JS OR Typescript) - <style /> (CSS OR SASS/etc) Whereas in old PHP files you could mix it in anywhere and the files were a big mess. Including inline SQL into your view templates which is hardly a good separation of concerns. While a Vue component can be separated into separate files, at least as one it all represents one isolated piece of the interface. https://flaviocopes.com/vue-single-file-components/ https://flaviocopes.com/vue-single-file-components/
- h1d 8y agoSo, are you saying those PHP programmers who mix HTML right into code wasn't wrong after all?
- AlphaSite 8y agoI’m not sure, but isn’t the paradigm flipped, markup in code rather than the reverse.