Live data from Hacker News

Alternative lightweight UI library to modern day frameworks

mithril.js.org

51–60 of 73 posts

Re: Alternative lightweight UI library to modern day frameworks

#51

Earlier quoted context omitted.

ten years ago I was writing UIs in Qt, given that comment in ten years I'm confident I'll still be writing UIs in Qt

Is it possible to HTML DOM apps in Qt? Is there any blog/book/video that you'd recommend a Qt noob?

The point isn't that you can do web UI in Qt (you can, but it's on a canvas and very rough around the edges), but that web UI frameworks often struggle to achieve a lot of what is just a wave of the hand in desktop frameworks.

Re: Alternative lightweight UI library to modern day frameworks

#52
I was an avid user of Mithril several years ago and even connected with one of the maintainers on LinkedIn. However, I ran into issues (I forget what they were at this point) building v1 of my social network and eventually found Svelte.

Mithril still has a place in my heart though, it was a joy to use.

Re: Alternative lightweight UI library to modern day frameworks

#54
Mithril is the React Facebook would have written if its devs didn't have too much time on their hands - it's wonderfully simple.

I stole their API somewhat for my 33-line-React, if you have any interest in how stuff works under the hood - check it out! https://leontrolski.github.io/33-line-react.html

Re: Alternative lightweight UI library to modern day frameworks

#55

Right now Next.js might be the hottest front end framework but I'm looking for something simpler to build SPA's. I'm not interested in SSR or SSG at all. Mithril.js looks very promising as it provides you with everything you might need to build a simple web app out of the box. The only other frameworks that do that is Angular and Ember, but they're both declining in popularity especially Ember. On the other hand Reac…

I've been liking solid-js. It's fast, compact, ergonomic and the people are friendly. https://github.com/ryansolid/solid

Re: Alternative lightweight UI library to modern day frameworks

#56
post #46

Earlier quoted context omitted.

I wrote a brief blog post[1] about vanilla state management in Mithril. Since Mithril triggers redraws on event handler calls, as another user said, you can just use POJOs very easily. [1] [link redacted]

You have a very nice-looking blog.

Thanks!

Re: Alternative lightweight UI library to modern day frameworks

#57
I have noticed newer generations of developers believe they need heavy frameworks like React to develop web applications. Most apps don't need such heavy frameworks. Here's a 500-line "framework" (if you can call it that) https://github.com/Rajeev-K/mvc-router and here's an example app built using it: https://github.com/Rajeev-K/eureka For templates I used https://github.com/wisercoder/uibuilder which is a 200-line lib. This is about as "close to the metal" as you can get, and still be productive.

Re: Alternative lightweight UI library to modern day frameworks

#58

I have noticed newer generations of developers believe they need heavy frameworks like React to develop web applications. Most apps don't need such heavy frameworks. Here's a 500-line "framework" (if you can call it that) https://github.com/Rajeev-K/mvc-router and here's an example app built using it: https://github.com/Rajeev-K/eureka For templates I used https://github.com/wisercoder/uibuilder which is a 200-line l…

"Close to the metal" should not be used to talk about javascript ... I love js ... But let's be realistic, vanilla js is great but very far from metal

Re: Alternative lightweight UI library to modern day frameworks

#59
post #58

I have noticed newer generations of developers believe they need heavy frameworks like React to develop web applications. Most apps don't need such heavy frameworks. Here's a 500-line "framework" (if you can call it that) https://github.com/Rajeev-K/mvc-router and here's an example app built using it: https://github.com/Rajeev-K/eureka For templates I used https://github.com/wisercoder/uibuilder which is a 200-line l…

"Close to the metal" should not be used to talk about javascript ... I love js ... But let's be realistic, vanilla js is great but very far from metal

By "metal" I meant the browser, so avoiding heavy libs.

Re: Alternative lightweight UI library to modern day frameworks

#60
post #48

I like to chime in every time I see a thread about Mithril. I learned modern SPA development with Mithril and in many ways still prefer it over React or Svelte. It's definitely starting to show its age as many of the main contributors have moved on and new libs are being created everyday. However the chat [1] is still very active and there are always great discussions going on there that are often not even specifical…

I love it because you not don't special state management like redux unidirectional flow or mobx observables, or even setState/useState. Just use POJOs and mutate the state however you like, because it automatically redraws on events & xhr so all state changes are picked up on the next render. This typically covers all the cases you need, of course there is a way to prevent or manually trigger a redraw for edge cases.
Post reply on HN