MithrilJS / mithril.js

A JavaScript Framework for Building Brilliant Applications
https://mithril.js.org
MIT License
14k stars 926 forks source link

Reasons we use Mithril #1026

Closed JAForbes closed 2 years ago

JAForbes commented 8 years ago

Hey everyone!

It would be very helpful if everyone could say 1 or 2 words that summarise why they use Mithril instead of another MVC library.

If anyone and everyone involved in Mithril could just say in 1 word why they use mithril instead of another library. Hopefully we could aggregate and come up with a clear message to help with a redesign of the site. We are all here for a reason, the task is to make our reasons concise and precise.

tomodian commented 8 years ago

Lightweight is king on mobile web apps.

lhorie commented 8 years ago

I think I got a pretty good sample of testimonials, so I'm gonna close this. Thanks everyone!

PeterMwangiNjoroge commented 7 years ago

no dependencies, robustness, simplicity

GusBeare commented 7 years ago

more approachable leaner simpler conquerable surmountable heartening

As a newbie and having fiddled about with Angular, Vue etc I found Mithril much more approachable and less intimidating. Setup was quick and easy. I'm often put off by all the tools you need just to get started with js dev. Grunt, Gulp, Bower, Brunch, Browserify, Webpack etc etc. Christ, all I want to do is build a simple web app.

Gandalf help me! How did we end up here? If I ever look at someone else's js project I find it ten times more difficult to work out what it's doing than C# projects I look at. Why did anyone think it help anyone to make things exponentially more complicated?

I am grateful that I'm not the only one that wants a simple life. And yeah.. sorry.. I am getting emotional.

dead-claudia commented 7 years ago

I'm just going to leave this forever open...

amedgit commented 7 years ago

why do not someone make some tutorial on youtube? it helps a lot a new developer to know it ;)

ciaoben commented 6 years ago

Here my 2 cents, from the mithril's gitter chat

I discovered thanks to the guy behind rayfeed (https://rayfeed.com/). We are in a chat together and he told us that he was using this. So I looked it.. and find it really interesting. At my work we use React, I am happy with it but honestly is very verbose (especially with redux) and IMHO once you learn the basic concept behind it that React has brought to mainstream, you became "magically" a better web dev, and you are ready to move out and learn how to use these concepts using the native DOM APIs and other libs/framework that are more minimal.

I am trying to start a side project, and decided to move away from React, for these reasons:

Sorry for my poor english!

ohenepee commented 6 years ago

From a beginner mindset... after I heard about Web Frameworks and I wanted to learn one of them... I started seeing things like "React has a steep learning curve and Vue.js has the lowest learning curve", I also saw things like 1kB frameworks and the what-not... but the only things I really cared about was EASY TO LEARN & PERFORMANCE/BENCHMARKS... After trying out Vue, which took me over 5 days... I knew I wasn't perhaps understanding what lowest/low learning curve meant in Vue's case. That was no where near easy, maybe easy but took must to grasp, too much load, too many APIs, too many subsystems. When I learned Mithril (I did that several months before trying Vue.js btw), I finished it in under 100 minutes and built a production-facing app with it: so simple, so easy, such little mental/cognitive load, so little to learn. I recently tried that 1KB framework named HyperApp and that's a serious lie, they've just partitioned the codebase, an example is their router, its in a different repo, add all those other repos up and you'll get the big lie... I finished it in about 3 hours (its simple but t took me longer to grasp b'cos it wasn't interactive like Mithril's, so all I was doing was ready a plain old README.md on their repo), also coming with their v2 is a lot of bloat and cognitive load, so I ditched them and made this round trip back to Mithril.

I think the BEST selling point for Mithril is: The easiest JavaScript Framework to learn, such little mental load, grasp the whole of Mithril in less than 60 minutes

The first phrase will pull a lot of beginners especially from Google Search for the search query "easiest javascript framework" (I can't remember how many times I've done that though and in all it brings up nothing meaningful, so I think its a great pitch)...

The above pitch is 99% possible for any web framework beginner who is already fluent in JavaScript.

tomc278 commented 5 years ago

"Light as a feather, but as hard as dragon scales."

ghost commented 5 years ago

I think the best thing is what it doesn't have. No transpiler, no command line tool, no scaffolding. Just 8kb, a small API, and everything you need for the front end of an SPA.

ww9 commented 5 years ago

Just wanted to say that Mithril is one of the best software I've had the pleasure to work with in my entire 20y+ dev career working both in backend and frontend. Some points that standout to me:

✅ truly small: No gotchas like needing to add extra 50kb of libs to do basic things like routing and requests. ✅ featureful yet simple: Events, routing, requests and dom diffing packaged in a coherent way. ✅ sensible conventions: Auto redraw after events and requests, m('text') just works when prototyping and other small things feels very ergonomic. ✅ mithril.js file is readable and hackable. ✅ low cognitive load: only one way to do most things. Concepts are simple enough to fit inside the mind within a week of practice. ✅ great documentation: concise but detailed. Contains both reference and idiomatic use guide. ✅ smooth learning curve: I'll suggest Mithril to every dev wanting to get started with SPA libs even if their end-goal is to learn Angular, Vue or React to use at work. I feel that Mithril doubles as a great way to get started with the mindset change required when writing SPAs using DOM diffing libs. ✅ really fast: The project I'm working on renders thousands of highly nested HTML elements at any given time with thousands of registered event handlers to build a very interactive UI. Yet it's so responsive that it feels like a fine-tuned static HTML+CSS page. ✅ low entry barrier: no JSX, ES6 or any transpiling required. I can't stress enough how important it for newcomers to be able to just copy-paste simple ES5 code into an index.html file and see it working without hassle. And then realize that production code doesn't have to be much different than what they just wrote.

I've either worked with or written Proof of Concepts in Angular, React and Vue before. Angular felt overengineered, often got in the way and node_modules from a simple Hello World reduced my hope in humanity a bit. React and Vue required unreasonable amounts of glue lib to do basic things, the end result was that their node_modules didn't looked much better either and it required extra discipline to keep code maintainable with helper libs being used all the time.

As someone who's on the far spectrum of code minimalism and pragmatism, frontend development was frustrating for years until recently when I had the chance to use Mithril in a new project at work. It's been nothing but success so far. Team is ahead of schedule, frontend code is simple, small and maintainable. Suddenly even interns can grok frontend code with little trouble and the faster Save-Refresh-View loop helps too. Most importantly, we're able to accommodate unplanned requirements easily because the code is simpler yet still fully componentized.

Thank you Mithril team and contributors.