Hacker News new | ask | show | jobs
by lollipop26 4112 days ago
Have seen several tries on this approach:

- Angular seems to provide something similar already with its ng-* attributes and directives.

- JavaServer Faces also do the same thing, where a server-side controller is bound to HTML or UI widgets (and skip writing CSS and JS because they're pre-styled, pre-programmed).

This works for simple stuff, but for much more complex stuff (multiple view interactions, custom views), this becomes a pain to write because you start to create workarounds for things it wasn't prepared to do.

Also, while I'm no expert, but let's just leave HTML, CSS and JS as is. You can always create a framework that provides you that same functionality. In fact, Angular has directives, React has JSX, Ember has components. Several other frameworks do it as well.

Reminds me of E4X, where they tried to bake in XML syntax into JS. This time, it's behavior and logic into the markup. Nope.