News for hackers. Stuff that matters.
Re:The viability of JavaScript frameworks on mobile by pygy_ on Tuesday October 20, 2015 @01:13PM (#10420419)
This is where small frameworks like Mithril shine.

The site says 12KB, for some reason, but minimized and gizipped, the latest version is closer to 7 or 8 KB IIRC.

http://mithril.js.org/

Re:The viability of JavaScript frameworks on mobile by lhorie on Tuesday October 20, 2015 @03:15PM (#10421128)
Just came back to mention that two of the most well-known Mithril-based projects, Flarum.org[1] and Lichess.org[2] are open source and have mobile UIs that you can try out, so if anyone's interested in seeing non-trivial codebases that use a "lighter approach" alluded to in this article, there you go.

[1](https://github.com/flarum/flarum)

[2](https://github.com/veloce/lichobile)

Re:The viability of JavaScript frameworks on mobile by pygy_ on Tuesday October 20, 2015 @03:33PM (#10421237)
http://flarum.org/ is especially relevant since it is a competitor to Atwood's Discourse which sparked the current discussion.

http://lichess.org/ is an [f|F]ree online chess platform.

Re:The viability of JavaScript frameworks on mobile by simplify on Tuesday October 20, 2015 @01:34PM (#10420543)
Mithril is amazing. I've been using it for over a year and only like it more and more. Its fast initial load time is very relevant in today's world of mobile web apps.
Re:The viability of JavaScript frameworks on mobile by briantakita on Tuesday October 20, 2015 @02:47PM (#10420980)
I like riot.js; a react-like library weighing in ~3.5 kb min+gzip.

http://riotjs.com/

Browserify gives you modules. This technology can be used to structure the code & package only the bare essential functionality.

http://browserify.org/

Re:The viability of JavaScript frameworks on mobile by notanintern on Tuesday October 20, 2015 @03:50PM (#10421365)
Riot looks a whole lot like Polymer.
Re:The viability of JavaScript frameworks on mobile by slackson on Tuesday October 20, 2015 @09:13PM (#10422968)
They compare it to polymer in the docs - much smaller, for one.
Re:The viability of JavaScript frameworks on mobile by emsy on Tuesday October 20, 2015 @03:48PM (#10421353)
I don't say Mithril is bad but code size is no indicator for performance. Counterexample: The minified Box2D code is ~760kB large and impressively performant.
Re:The viability of JavaScript frameworks on mobile by pygy_ on Tuesday October 20, 2015 @03:55PM (#10421405)
It is an indicator of load time. Most users bounce off pages that take longer than 3 secs to load.

Mithril isn't the fastest of the virtual DOM libraries out there, but it is usually good enough, even on mobile.

Re:The viability of JavaScript frameworks on mobile by magicalist on Tuesday October 20, 2015 @05:24PM (#10421909)
Usually latency due to dependent requests are your killer on mobile. Even Edge throughput wasn't that bad once it finally got going.
Re:The viability of JavaScript frameworks on mobile by lhorie on Tuesday October 20, 2015 @02:34PM (#10420887)
Fixed :)