4 ms·
Can anyone suggest a good approach to evaluate these libraries? How does this compare to Mithril etc?
by Numberwang 9y ago
Can anyone suggest a good approach to evaluate these libraries? How does this compare to Mithril etc?
- franciscop 9y agoWe totally need http://microjs.com/ http://microjs.com/ with a reputation system.
- jbucaran 9y ago> How does this compare to Mithril etc? I am the author of HyperApp and also a big fan of Mithril. I'll try to compare both as fairly as I can. This is not a full or even adequate comparison, I'm just adding to the thread. Mithril has something called auto-redrawing, that IIRC re-renders the application after DOM events by default. This can be seen as inefficient, but Mithril throttles rerenders, which ameliorate any issues caused by it. Mithril has no state management solution out of the box. This may be desirable if you want to experiment with different state management architectures until you find one that you like. HyperApp has its own built-in state management solution which is inspired and draws a lot from the Elm Architecture. In this way, it's a lot like React and Redux, but since everything is built-in, there's essentially 0 boilerplate. The drawback is that there's no other state management available for HyperApp. Mithril has stateful components, which is a simple and useful way to reuse code across your app and easily port to other apps. HyperApp has custom tags, which are pure functions and stateless. They only accept props and know how to render themselves. If you are coming from React, Backbone, Angular (basically everywhere else), scaling applications will seem difficult at first, but it's not, it's just different. We are currently working on a component abstraction which is based on the idea of a fragmented state. We'll release 1.0.0 when that's done. Mithril is bundled with m.request, which simplifies making HTTP requests. HyperApp has no built-in facilities to help you make HTTP requests. I am not interested in a custom xhttp solution when there is a `fetch` standard.
- jakelazaroff 9y agoI like the combination of actions and reducers — feels like how the reducer pattern appears in Cycle.js.
- pygy_ 9y agoDisclaimer, Mithril core dev here. I'm not as familiar with Hyper. In Mithril: The hyperscript function supports Emmet/Zencoding syntax: `m('input.myClass#myId[type=radio]')` There's a stream library for state management (not an out of the box solution, but a robust building block). The Mithril router - supports `path`, `search` and `hash` modes - supports asynchronous resolution (for lazy module loading) - parses the current route at mount time and launches the app at that route if possible The renderer - has lifecycle hooks (that fire when nodes are created, updated, and removed, before and after the DOM is mutated), - supports fragments (components can return arrays) and raw HTML nodes (the former with keys support). - optimizes keyed diff for insertion/deletion of contiguous nodes - AFAICT Mithril handles the attribute/property dichotomy better Mithril also comes with a querystring parser and builder. There are probably a lot of other small things that I didn't notice (and there may as well be errors in my assessment of hyperapp) Edit: I take back what I said about forms. Either Chrome got their act together or hyperapp is doing something that I don't understand yet... Anyway, the naive app works well: https://flems.io/#0=N4IgTgpgZpDOAWAhArgF1QewHYgFxQEMAbWCAGhFKIgGNUIATPEAOgCtYQKoBLaz3AG1QWAgFsIzFvFRiiXEDWz0sqZgB54AZgB8AHSwACQ2J6p4YPgfUB6bfqzqGPAG6GeDALx6Qp85aIfHVtnFwdNXQNjeABPAAcIMAI4uOs7SMdQ9y8fWISwIJDXBxAAXzIRcUlcVg4FJVUIVWYG2FQTDAYIIkNPExY2yHEACgByGngCLABzCBM5niNzOdMGBmpRgEoDAzEWMQxkVWG-Cz4yQ2AowxceCAB3Yc2ro2NDSFRkMCNBa7eTMaLOJoUYXF7-f7YIFoXD9e5meAAQXQYDGLmIyAgoI6XSImzIfwh6KImNhOO6T0JxnK+KpANGcWxB1xT22r2MAF1rqUDKU2QZWu1gPALsk4qVeoY8okxTtRClhuD3hgMKhYdKwATXm0CPRYcBiaTDONJjMVgslvAVh51ljytdbg9YcMdfRRXQeNhYJtejpDMNCfAxqFscByoZfuy3kHRtDUKGdqg9EmU4aILDXRAWGmtRC3lCsMC1YY5p4-QQPV6WBMprNhlnUAQwLNUNmMXM2Xm+bmITHGWDw5m2ySIJ23hz+ahaa8K6hPVhYPrCTWzc7M+6516LmmfWXLtdk4eo8YPl8jAb2zysIfUFfqbzNmUKiBRBIpDRYJwKA0VGoamUOQoIhFgAawEYQQC+eQahkVA4kXGwbCOOIQOmasMDEGxTgCAABABGFgCLwhRUHiaoQDqcpQCg5hYPg3BEOQ1D0Mw7C+HwwjCJsQYIHEbjUCGPY6goUiEmYSjnxomD0HoxjC2YpRMI1MUSLI8TOFKDlSiAA https://flems.io/#0=N4IgTgpgZpDOAWAhArgF1QewHYgFxQEMAbWCAGhF...