Live data from Hacker News

Mithril.js – A modern client-side Javascript framework

mithril.js.org

81–83 of 83 posts

Re: Mithril.js – A modern client-side Javascript framework

#82
post #45

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 JavaScr…

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.

Re: Mithril.js – A modern client-side Javascript framework

#83

Earlier quoted context omitted.

True. If you're creating an app that will be used in production then of course you need to use npm, webpack and other tools. But if you're new to a framework and just want to experiment then being able to create an html file with a couple of script tags and writing code removes many barriers to entry. React, Vue and many others already offer this, I thought it was worth mentioning that Mithril does this too.

I don't know. Creating the HTML file, finding a CDN, and adding script tags take more than: npx create-react-app MyApp There is nothing to install, and you have a complete playground to experiment.

The biggest problem I find with that is if the template/tool gets some deprecated/critically flawed dependencies, for tweaking it can be ignored but not for production or critical systems.

Also taking the time to set up your project with what's just needed will allow to dodge a lot of bullets of breaking or useless dependencies, malicious dependency update tc.

Post reply on HN