Hacker News new | ask | show | jobs
by pier25 2864 days ago
The main problem with steering away from templates is that designers who know HTML are immediately alienated from the code base. Same thing with CSS as objects instead of using real CSS.

When working with libs that use HTML templates such as Vue, it's still possible for designers to be integrated in the development process. But with HyperScript, JSX, or Mithril, anyone contributing to the codebase has to know JavaScript.

3 comments

If they can’t learn basic JavaScript, they should not be touching the code base with a ten foot pole. Designers can still design, but through mockups and comments passed to people qualified to modify code.
It's a collision between half the industry telling designers they need to know HTML and CSS to do the CSS work themselves (instead of Software Engineers, because they apparently don't want to deal with it) while the other half of the industry makes it ever harder to do so.

Consistency isn't exactly a high point when it comes to industry signaling vs reality.

I love getting PRs from designers on my Vue project at work. They enjoy not having to wait on me and I enjoy focusing on application logic instead of CSS tweaking.
If markup and styling are not in JavaScript, designers do not need to touch JavaScript at all.
This is where the whole fight over what "separation of concerns" in the front-end means scores a clean point for the traditional definition.
This is one of the biggest reasons I see people citing for Vue>React. I think it's a very easy argument to defend, but I'm sincerely curious how big of a role this plays. Is it really that common to change the HTML/CSS of an app without also requiring changes to the underlying JavaScript? I have no doubt it happens, but I'm wondering if it happens often enough to justify claiming superiority of one popular web framework over another.

Beyond that, out of HTML, CSS, and JavaScript, by far I find CSS the most difficult to work with and get to behave the way I want. Are there really a lot of designers who are experts at this language but don't know any JS?

I think you might be able to measure some of this. I wonder if you could look at some popular web apps that have separate HTML/CSS/JS files and look at the proportion of commits where only the UI changes, vs commits where you have to change the UI and the JS. The hypothesis being that in general you need to change your JS, and thus require a full developer anyway.

Problem with this approach is, that it only works for fairly simple stuff. Todays webapps have pretty complex UI with a lot of ramifications and complex dependencies of widgets. Such things are much easier to build if you have a full fledged programming language (javascript) and not only a limited (turing-incomplete) templating language.

So your approach might work for simple apps, more ambitious stuff will get overly complicated.

That is imho one of the strength of mithril.js: Simple things are trivial, complicated things are pretty straight forward to solve.