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.

70 comments

  1. What the actual.... by Anonymous Coward · · Score: 3, Insightful

    Please tell me this hideous new design - presumably for millennials that can't read more than a summary - is an April fools joke

    1. Re:What the actual.... by Anonymous Coward · · Score: 1

      You're a regular sherlock holmes

    2. Re:What the actual.... by Anonymous Coward · · Score: 1

      It's Slashdot's new cross-platform look and feel, kinda like Windows 10.

    3. Re:What the actual.... by fluffernutter · · Score: 1

      The whole April fools thing sucks. Can't really get behind anything today because it might not be true.

      --
      Laws are rules for the court, but merely a bottom bar to hit for life. Think beyond laws in your actions always.
    4. Re:What the actual.... by Anonymous Coward · · Score: 0

      Wow. You are so mature and sophisticated. I wish I could be more like you.

    5. Re: What the actual.... by Anonymous Coward · · Score: 1

      Why are you on /. then? April Foll's jokes are standard here fir like 15 years...

    6. Re:What the actual.... by markhb · · Score: 1

      They've only been doing this every year for two decades (or more). I don't know if there are any screenshots of ZOMG PONIES LOL! out there.

      --
      Save Maine's economy: write stuff down. All comments are exclusively my own, not my employer.
    7. Re:What the actual.... by Anonymous Coward · · Score: 0

      All we need is a retro spin. How about OMG Ponies!

      But then it's still retro. still has no UTF-8 support.

    8. Re:What the actual.... by Anonymous Coward · · Score: 0
    9. Re: What the actual.... by fluffernutter · · Score: 1

      Honest news sites are sadly a rarity these days. I think this is one of the things I like about Slashdot. It just becomes more more evident when they try to be silly like on Aptil Fools day, because it undermines what I like about it.

      --
      Laws are rules for the court, but merely a bottom bar to hit for life. Think beyond laws in your actions always.
    10. Re: What the actual.... by Anonymous Coward · · Score: 0

      Well... you get used to it... at least it's not My Little Fucking Pony

      http://www.thewehners.net/joshua/grfx/slashdot_omg_ponies.gif

    11. Re:What the actual.... by Anonymous Coward · · Score: 1

      Slashdork Beta is back with a vengeance. Get use to it, fag.

    12. Re:What the actual.... by Anonymous Coward · · Score: 0

      Incidentally, and something that someone might want to suggest as a story today: 4chan decided it would be fun for April Fools to merge containment boards, specifically /pol/, the neo-nazi alt-right hellhole, with /mlp/, the degenerate brony hellhole. The result is, frankly, spergtacular.

    13. Re:What the actual.... by Anonymous Coward · · Score: 0

      When are we rewriting Slashcode to take advantage of the Mithril framework? Shouldn't take more than one or two sprints, right? Especially if we rewrite the backend in Rust!

    14. Re:What the actual.... by Hognoxious · · Score: 1

      I'm more worried about November fools and the resulting January fool.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    15. Re: What the actual.... by Anonymous Coward · · Score: 0

      If you want My Little Fucking Pony, there's a website for that.

    16. Re:What the actual.... by bug_hunter · · Score: 1

      Please tell me that everybody blaming everything on millennials is a fad that's going to end eventually?

      --
      It's turtles all the way down.
    17. Re:What the actual.... by Anonymous Coward · · Score: 0

      Please tell me that everybody blaming everything on millennials is a fad that's going to end eventually?

      Sure - about 2070 or so

  2. Sad thing is... by Anonymous Coward · · Score: 0

    I don't know if this is April Fools' Joke or not... Because there is new JS framework every other day anyways....

    1. Re:Sad thing is... by BarbaraHudson · · Score: 1

      "A new framework" every other week, to save people from having to learn how to actually code stuff to do what they want to do. And, just like the frameworks themselves, the stuff they're coding is of little real-world consequence. Same shit, different day. But it all smells the same in the end.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    2. Re:Sad thing is... by neoRUR · · Score: 1

      Yes but there is no 'New New' framework every day...

    3. Re:Sad thing is... by Anonymous Coward · · Score: 0

      Lets embed frameworks inside of frameworks inside of VMs inside of more frameworks..

      frameworks!

      captcha: manure

    4. Re:Sad thing is... by Anonymous Coward · · Score: 0

      Thought it was a joke at first as well, until I read the description. Mithril isn't brand spanking new.

      Also, can people start working together a bit more so we don't have 5000 frameworks? "Yeah, it's like this but slightly better in this way. And like that, but slightly better in this other way." Part of this is the fault of developers and startups who jump on whatever is new and creating a lot of buzz, even worse if it's something from a big tech company like Facebook or Google. "We have to adopt this because it's what Facebook/Google use in house!!!"

    5. Re:Sad thing is... by Lije+Baley · · Score: 2

      Any story on JavaScript frameworks is a joke, on any day. Putting this story up on April Fools day is just pure genius.

      --
      Strange things are afoot at the Circle-K.
    6. Re: Sad thing is... by Anonymous Coward · · Score: 0

      So strange to assume someone makes a library because they're lazy. Nobody forces you to use a library. Don't use every moment to talk about how you think you work harder then everyone else.

    7. Re: Sad thing is... by BarbaraHudson · · Score: 1

      Never said anyone makes a library because they're lazy. You're projecting. Again. Try reading it s-l-o-w-l-y. Maybe it will become clear.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
  3. Except it's not new by Anonymous Coward · · Score: 1

    Mithril has been around since at least 2014 (first commit to github was in March 2014), which is practically geriatric in the rockstar JavaScript world.

    1. Re:Except it's not new by Anonymous Coward · · Score: 0

      March 2014! I was in the market for something more up-to-date.

    2. Re:Except it's not new by Anonymous Coward · · Score: 0

      v1.0 was released in January, it is a complete rewrite with excellent perf and a nicer API.

  4. wow by Rutulian · · Score: 1

    They put a lot of work into this, even down to the github commit history. ;)

  5. 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: 1

      It's 2017, all the cool kids moved to completely new and awesome frameworks!

    2. Re:OMG - another! by Anonymous Coward · · Score: 0

      Yow, what an article. I hadn't noticed that people were going that crazy in making new Javascript toys. Javascript is a big stinking turd, and these people are trying to polish it.

      The article reminds us again that the keeper of the standard is the European Computer Manufacturers Association and that the official name of the language is ECMAScript. All these Javascript "solutions" seem to be like such a tangled nest of European laws. We need to do something like what the Brits did: a Prexit, the programmer's exit from ECMAScript.

      I'm with the poor questioner in the article: I like backend work better ... but not in Python.

    3. Re:OMG - another! by Anonymous Coward · · Score: 0

      Mithril has been designed to prevent yak shaving, and it doesn't require any specific tooling.

      You can drop it in a tag script and get going the old way if that's your thing.

      OTOH, it also optionally supports JSX for defining the views if you prefer having an XML-like syntax, at the expense of build tools.

    4. Re:OMG - another! by Anonymous Coward · · Score: 0

      Web development trends seem to reflect clothing and music trends now. Everything is MUST OWN for a short time, until it's the next thing and what was must own previously dates you as behind the time. Constant consumption and changes. Mass ADD.

      I think everyone is becoming aware of this, it's a matter of what can we do about it? People will keep releasing new shit, big tech companies will as well. On an individual level, the solution is to get the hell out of the JavaScript world if possible if you're working as a web developer. Otherwise get out of web development altogether and hope JavaScript doesn't find its way into that field along with the hype and all of the problems associated with that.

    5. 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 ;-)

    6. Re:OMG - another! by Anonymous Coward · · Score: 0

      Reading that made me even more depressed. I work with JavaScript development and there were things mentioned in it that I hadn't heard of before and I already feel like I'm overloaded :(

    7. Re:OMG - another! by JustAnotherOldGuy · · Score: 1

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

      OMG. No wonder so little stuff actually gets done these days. I'm going to go back into my cave and pretend I didn't read that.

      And yes, I still use jQuery. When people ask me why, I say, "Because it works."

      --
      Just cruising through this digital world at 33 1/3 rpm...
    8. Re:OMG - another! by Anonymous Coward · · Score: 0

      "This is all gonna end badly."
        – Banky, Chasing Amy

  6. Largely agreed Barb... apk by Anonymous Coward · · Score: 0

    See my subject: When these 'frameworks' get a bug (security or functional) it can be problematic.

    * P...& it's javascript (MAIN 'harbinger of evil' online (w/ Adobe Flash))!

    APK

    P.S.=> I learned what you speak of long ago (in late 90's using VB on the job w/ its .ocx active X OLE server controls & addon DLL libs for VB & other HLLs). It's WHY I wrote this by hand in straight inline-compiled faster non-interpreted "stand-alone" single .exe form APK Hosts File Engine 9.0++ SR-7 32/64-bit https://www.google.com/search?hl=en&source=hp&biw=&bih=&q=%22APK+Hosts+File+Engine%22+and+%22start64%22&btnG=Google+Search&gbv=1/ & it's IMPOSSIBLE to infect (minus a long custom 'hackjob' tailored to it alone) "Hyper-Alloy Combat-Chassis: Micro-Processor controlled, FULLY armored, VERY tough" constructed (checks vs. alteration in every try-catch err-trapped function/proc) & IMPOSSIBLE to crash - not a bug in it since public release in 2012... apk

  7. 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.
    1. Re:That's wonderful by sjames · · Score: 1

      You could just code it up in Javascript. It might even take less time than analyzing the options and learning what's changed in them since you started the analysis.

  8. congratulations guys! by slashdice · · Score: 2

    This is probably the first year (and yes, I was there for OMG ponies) that slashdo^Wslacker news hasn't sucked a bag of dicks on 4/1.

    You should probably keep this theme.

    --
    Copyright (c) 1990 - 2014 Dice. All rights reserved. Use of this comment is subject to certain Terms and Conditions.
    1. Re:congratulations guys! by Anonymous Coward · · Score: 0

      I hope they didn't rearrange the sections in your local supermarket - that might push you over an edge.

  9. Relatively 'old' by DigitalBubblebath · · Score: 1

    ...and Inferno is much faster.

  10. It had been over a week since a new one cameout by Anonymous Coward · · Score: 1

    I was starting to worry.

  11. Declaring HTML in code? by tomxor · · Score: 1

    I know Angular and friends are bloated, but unless i'm missing something, is this library's pattern really to do all binding by creating the markup from JavaScript... because that is some ugly shit that MVCs are supposed to let us avoid.

    1. Re:Declaring HTML in code? by Anonymous Coward · · Score: 0

      You can use JSX syntax with mithril as well, if you prefer.

    2. Re:Declaring HTML in code? by Anonymous Coward · · Score: 0

      MVC is about separating concerns, not a distinct syntax. You can totally implement MVC with Mithril (with minimal discipline).

  12. NOT an April Fool's joke by jtara · · Score: 1

    Sadly, this is NOT an April Fool's joke.

    Because somebody thinks that HTML belongs wrapped in Javascript.

    And, sadly, this isn't the first time this has happened.

    https://www.youtube.com/watch?...

    1. Re:NOT an April Fool's joke by phantomfive · · Score: 1

      Because somebody thinks that HTML belongs wrapped in Javascript.

      Yeah, that is an idea that makes little sense.

      --
      "First they came for the slanderers and i said nothing."
    2. Re:NOT an April Fool's joke by angel'o'sphere · · Score: 1

      Most modern mobile or other "single page" web applications that are written in JavaScript (AngularJS / ReactJS / ProcessingJS etc.) either have a very simple static HTML and get enhanced via JS or are completely written in JS.

      I e.g. program right now with Vaadin. A Java framework running completely on the server, pushing GUI update events via WebSockets to the client, and the client is rendering everything using JavaScript. There is basically no HTML involved at all.

      You program your application like a Java/Swing programmer would do: https://vaadin.com/home and the cross compilers (based on googles GWT) compile it to Websocket/HTTP pushs and JavaScript.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    3. Re:NOT an April Fool's joke by phantomfive · · Score: 1

      You explained how it works. I know how it works, my point was that it's a bad idea. Java/Swing isn't particularly great, either.
      Maybe Vaadin is good, I don't know.

      --
      "First they came for the slanderers and i said nothing."
    4. Re:NOT an April Fool's joke by angel'o'sphere · · Score: 1

      What is wrong with Swing?

      I don't think that generating HTML from JavaScript is a bad idea. Some people don't like paradigm switches. Bottom line the HTML generation is done by the framework/library, so the programmer only has to deal with one "concept".

      I for my part I'm pretty bad with HTML, it never interested me. When i can construct a GUI - like with GWT/Vaadin . with function calls instead of manually creating HTML - setting ids or classes or names - as in having real objects, I'm up for it.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    5. Re:NOT an April Fool's joke by phantomfive · · Score: 1

      HTML confuses you? REally? :/ ?

      --
      "First they came for the slanderers and i said nothing."
    6. Re:NOT an April Fool's joke by angel'o'sphere · · Score: 1

      No, why do you think it confuses me?

      However it is a difference in "creating" HTML that is rendered in a way you want, versus reading HTML.

      I'm a software architect and software engineer ... I don't write HTML ;D ... my programs do.

      In our times HTML is a quite complex thing, considering you mainly use CSS now to get all the things done you used to do in plain HTML 15 years or 20 years ago.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  13. 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.
    1. Re:Mithril is awesome! Really!!! by Anonymous Coward · · Score: 0

      Your app example hangs with "Retrieving project data from server; please wait..."

    2. Re:Mithril is awesome! Really!!! by Anonymous Coward · · Score: 0

      But it's not awesome, it's a very dated and backwards design. Generating markup from JS code is extremely cumbersome for enhancements, debugging and refactoring for anything beyond eye-rollingly simple. It's pretty obvious that JSX should have been the only view system, yet it's a second class citizen to an archaic three parameter function that returns an object (ie the object that should have been what was passed in to begin with) making the purpose of m() mostly useless. It's as if the entire 2000's were forgotten (or perhaps not experienced) to suggest that embedding function handlers like onclick in the markup leads to anything positive. The only advantage to this framework over native js and html is "auto updating" the view, but for 8kb gzipped that's a lead dump truck for what you get. God even the create an object with a hard-coded 'view' attribute instead of passing in the function itself reeks of a lack of understanding of functional design.

    3. Re:Mithril is awesome! Really!!! by JustAnotherOldGuy · · Score: 1

      And what, in 100 words or less, does your application "Single-page web app for Participatory Narrative Inquiry (PNI)" do, exactly?

      --
      Just cruising through this digital world at 33 1/3 rpm...
    4. Re:Mithril is awesome! Really!!! by Paul+Fernhout · · Score: 1

      Just be patient; as explained on the page, a big project with thousands of records takes about ten seconds to load (and then runs quickly using client-side data). An empty project loads almost instantly.

      --
      A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.
    5. Re:Mithril is awesome! Really!!! by Anonymous Coward · · Score: 0

      Crikey, thousands of records??

      Why, that would slow any computer to a crawl!

  14. Learning curve by nasch · · Score: 1

    it has a better learning curve... than Angular.

    That's not saying much.

  15. Ah, but do you need a supercomputer by Anonymous Coward · · Score: 0

    to run the thing? Any tab in my browser can peg a core.

  16. Re:Mithril is awesome! (What is a SPA for PNI?) by Paul+Fernhout · · Score: 1

    Thanks for asking. Participatory narrative inquiry is an approach in which groups of people participate in gathering and working with raw stories of personal experience in order to make sense of complex situations for better decision making. Essentially, the NarraFirma app leads someone step-by-step through a process of story gathering, sensemaking from those stories, and possibly intervention based on those results. That process is defined in a 700 page textbook my wife wrote: http://workingwithstories.org/

    --
    A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.
  17. Re:Mithril is awesome! (why JSX is worse) by Paul+Fernhout · · Score: 1

    Sorry, I don't think you get the level of integration possibly by the Mithril/TypeScript combo and how well it supports refactoring and debugging compared to coding big chunks of your application in ad hoc templating systems like JSX. And that just gets even better when you use something like Tachyons.js for CSS. When everything is TypeScript (or JavaScript), a programmer can use standard tools to do everything instead of hitting arbitrary boundaries where things work differently when you run into template issues. For example, how does an IDE know how to refactor JSX? Or how do you set break points in JSX? Or how do you parameterize the generation of JSX? There may be answers to those three questions, but they are non-obvious.

    There is a huge difference between progressive enhancement of one page of HTML from the 2000s and the idea of writing a complex cross-platform application with 100s of pages that just happens to run in a browser and just happens to use the DOM and just happens to use a JavaScript VM.

    Mithril has its warts (the latest version fixes a bunch of them) but overall technically (one can debate community size and its implication) Mithril is still better than most everything else I've seen for SPAs -- except maybe Elm but that is a bigger leap).

    --
    A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.
  18. Tired of JavaScript frameworks by Anonymous Coward · · Score: 1

    So so tired of new JavaScript frameworks.

    How is one supposed to plan long term projects and learn all these new frameworks and pick the "right" one that's going to last and not be abandoned or incompatible with new versions...

    It's ridiculous. JavaScript developers need to figure this out or lose credibility as serious developers in it for sustainable development.

  19. The Real Old Guy? Wow!!! by Paul+Fernhout · · Score: 1

    I loved your Chronicles!
    https://www.amazon.com/Chronic...
    "In the distant future mankind creates sentient cybertanks patterned on the human brain to help fight their alien enemies. Then, inexplicably, the humans vanished. They just went away. All that is left of the human empire are the cybertanks who, in their own way, keep the human civilization alive. With an intelligence based on the human psyche, the cybertanks continue to defend human space, but also perform scientific research, create art, form committees and ponder the universe. These are the stories of one of the first cybertanks, known to his friends as âoeOld Guy.â He has outlived most of his peers, and has had a wealth of experiences over his long life, but he is starting to slowly become obsolete. Join him and his comrades Double-Wide, Whiffle-Bat, Smoking Hole, Mondocat, and Bob, as they live and love and fight alien enemies such as the deadly Fructoids, the Yllg, and the fiendish Amok."

    And I also liked the other three novels you wrote about your adventures too (including one about when a backup copy of your program was activated back on Earth)!

    --
    A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.
    1. Re:The Real Old Guy? Wow!!! by JustAnotherOldGuy · · Score: 1

      I loved your Chronicles!
      https://www.amazon.com/Chronic...
      And I also liked the other three novels you wrote about your adventures too (including one about when a backup copy of your program was activated back on Earth)!

      Oh, that's nothing. Hell, I'm so old that I went to high school with Jesus. He signed the stone tablets my yearbook was carved on.

      You know the Dead Sea? I was there when it was only sick. True story. And do any of you ever thank me for planting all those redwoods in California? No, you ungrateful young'uns!

      --
      Just cruising through this digital world at 33 1/3 rpm...