Hacker News new | ask | show | jobs
by krat0sprakhar 4319 days ago
Was posted 3 days ago - https://news.ycombinator.com/item?id=8176672
1 comments

lhorie's comment still applies here: Mithril.js does more than this library, and it weigths 10 times less, minified and gzipped (~5KB vs ~50KB, with dependencies).

http://lhorie.github.io/mithril/

I've been seriously looking at Mithril.js. I like that it doesn't use any strange Javascript templating.

I'd love to see the Todo MVC app done in Mithril.js.

Here you are:

Source: https://github.com/lhorie/todomvc-perf-comparison/tree/gh-pa...

Live: http://lhorie.github.io/todomvc-perf-comparison/todomvc-benc...

The implementation was written by JP Monette, but it has been refactored several times by Leo Horie (the author of Mithril). Looking at the revision history should give you an idea of the various ways to use the framework.

The current version relies heavily on viewmodels, to the point of making the controller virtual.

Edit: you may also want to have a look at the comparative benchmark: http://lhorie.github.io/todomvc-perf-comparison/todomvc-benc...

Note that the benchmark sometimes returns NANs. It is happens when the todo count doesn't match the expected amount (it's hard to correctly benchmark async code). At the moment, Quiescent consistently NANs out in Chrome, and so do Mithril and Mercury in Safari, but only occasionally.

It is due to the test harness, not to the frameworks or the TodoMVC implementation. ==> Uncheck Quiescent when testing with Chrome, and re-run the benchmark if you get NANs in Safari.

:-)
I'm looking at this link https://github.com/gwendall/way.js/blob/master/way.min.js and github is telling me the minified version is only 9k. Not sure where you're getting 50k from.

Also, I looked at your mithril link and even though it's a smaller file size, the framework does way more than just databinding, which seems to be the only thing way.js does.

I think you need to look at the way.bundle.js for the version with dependencies as it relies on jquery.js, underscore.js, underscore.json.js, js2form.js, and form2js.js
That's indeed what I'm refering to.

Mithril doesn't have any dependencies. It takes 13KB minified, down to 5KB when gzipped.

dependencies: jquery, underscore, a couple others. check out the gzipped size of https://github.com/gwendall/way.js/blob/master/way.bundle.mi...