Slashdot Mirror


There's A New New JavaScript Framework (infoworld.com)

An anonymous reader quotes InfoWorld: Mithril, an open source JavaScript framework for single-page applications, is looking to best Facebook's React, Google's Angular, and Vue JavaScript tools in performance and ease of use. The framework is small and fast, and it provides routing and XHR (XMLHttpRequest) out of the box. Mithril also offers benefits in relative density, lead developer Leo Horie said. "It's possible to develop entire applications without resorting to other libraries, and it's not uncommon for Mithril apps to weigh a third of other apps of similar complexity." Horie said that the framework feels closer to vanilla JavaScript.

Mithril's website features a comparison to Angular, React, and Vue. Mithril, for example, offers much quicker library load times and update performance than React, and it has a better learning curve and update performance than Angular. Compared to Vue, Mithril supposedly offers better library load times and update performance.

Since its initial release, version 1.0.1 has added performance improvements in IE, while 1.1.0 added support for ES6 class components and support for closure components.

4 of 70 comments (clear)

  1. OMG - another! by cjonslashdot · · Score: 5, Interesting

    Article, "How it feels to learn JavaScript in 2016": https://hackernoon.com/how-it-...

    1. Re:OMG - another! by Anonymous Coward · · Score: 2, Interesting

      Mithril is actually the opposite of this. It can be used in plain ES5, without a bundler or extra tooling (load it in a script tag from a CDN and you're off). v1 runs on IE9+ without polyfills (the previous version ran on IE6 with some Array.prototype additions).

      The documentation is both concise and complete, and the community is lively. So you can get started in a matter of hours or maybe days depending on how you're proficient with JS.

      You can take advantage of things like JSX (for the views) and TypeScript, but they are optional. Redux isn't needed at the data layer.

      Disclaimer: I'm a core contributor (though not the main author), so you know the kind of bias I can have ;-)

  2. That's wonderful by jlowery · · Score: 3, Interesting

    I just got my head around Swagger, which has umpteen implementations to choose from, and now tackling GraphQL, which has umpteen implementations to choose from. In the meantime, still learning Javascript2015 and trying to use Seneca for microservices.

    And while I'm doing that, I have a legacy PHP app to deal with, a legacy Nodejs app we're trying kill, a new Nodejs app that runs our site. And... documenting/redesigning our data model and architecture.

    The biggest problem with GraphQL is that much of the documentation assumes familiarity with one or more of: Relay, React, Hapi, Redux, Sequelize, GraphQL plugins (many) and on and on. And... documentation and examples before 2016 tend to be outdated or not working.

    It takes me weeks just to analyze all the options available, and pick something that isn't going to throw a dozen new technologies at the team, some of which might already be abandoned.

    So, yeah, JavaScript fatigue.

    --
    If you post it, they will read.
  3. Mithril is awesome! Really!!! by Paul+Fernhout · · Score: 3, Interesting

    HTML is a useful way of encoding static documents -- but it does not belong in a single-page application in my opinion. Stuff like JSX or Angular2 templates takes a standard (HTML) and makes adhoc changes -- which is a bad thing to do to a standard!

    Mithril does the right thing by generating DOM from real programming code. If you use Mithril from TypeScript like I do, all that DOM-generating code is easily refactorable using an IDE just like any other code.

    If you also use Tachyons.js or similar for CSS, you can also do styling in the same file -- like any standard development system in the past (like Java or Python or Smalltalk).

    It's really sad that JavaScript developers are forced to be less productive their entire careers and have ugly lumps of junk in the middle of their source code just in case some "designer" might want to spend an hour playing with HTML and CSS in the application.

    Ask a Java programmer if they want to code UIs that way -- with three files for every UI page written in three different languages -- three files that most IDEs can't even connect together for navigation and semantic search and refactoring.

    My biggest Mithril app to date:
    https://github.com/pdfernhout/...
    https://narrafirma.com/try-nar...

    It's really unfortunate some Slashdot editor saw fit to announce this on April Fools because it makes it less likely people will take is seriously.

    --
    A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.