Live data from Hacker News

Alternative lightweight UI library to modern day frameworks

mithril.js.org

61–70 of 73 posts

Re: Alternative lightweight UI library to modern day frameworks

#61
post #24

Earlier quoted context omitted.

Vue and Svelte are both good. I'm not sure why create-react-app is a problem, but Vue can run without any scaffolding. I think it's worth just accepting that some scaffolding is needed for bundling, transpilation, etc. There are dozens of alternatives like mithril - small in size, scope and community. You might miss a system for managing state in Mithril, as well as pre-built component libraries like Vuetify or react…

I tried out Svelte recently. I really like the idea of a 'compiler first' framework which offers useful features that compile away to plain old lightweight JavaScript. I got on ok with the bare-bones Svelte compiler, but I found the surrounding ecosystem to be lacking. There are two different material design libraries for Svelte. [0][1] I wasn't able to get either of them to behave. It looked like they weren't being…

I know Angular seems to not be popular right now, but I am genuinely enjoying my job because of it. Maybe apart from animations, everything seems to consistently work. Even updating major versions is a mere footnote rather than a chore.

Re: Alternative lightweight UI library to modern day frameworks

#62

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…

AppRun ( https://apprun.js.org ) is a very nice JavaScript library for building reliable, high-performance web applications, including SPAs.

It's not clear why there is not more attention paid to apprun...it is a very simple framework/library while being powerful conceptually too.

Re: Alternative lightweight UI library to modern day frameworks

#63
Mithril is really special among JS frameworks. It has a very tiny API and thus the resulting components are powerful and highly reusable. I think of them as Lego bricks to build worlds inside browsers. Whenever the architects or product owners come up with an idea never seen before I prototype using Mithril, because all other tend to fail involving of unexpected amount of complexity. Mithril gives you all degrees of freedom and surprisingly often that's considered a disadvantage.

Did I mention it's fast?

Re: Alternative lightweight UI library to modern day frameworks

#64
post #51

Earlier quoted context omitted.

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.

The amount of engineering money that web companies spend to have a crappy app ui in the browser is mind-blowing.

Re: Alternative lightweight UI library to modern day frameworks

#65
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

I like "bare plastic JavaScript" :-)

Re: Alternative lightweight UI library to modern day frameworks

#66

I used to use mithril for almost every new project I'd start, but I've switched over to using React w/ Hooks for just about everything for two main reasons: - toolchain support is a lot less finicky and better supported (you can use parcel and it "just works") - should I need to bring in a obnoxious third party library, it's far more likely to exist in a react world than mithril If you're just building something smal…

Hooks were what made me choose React to migrate to from AngularJS at work. I really like the concept of (state) => ui, but had no interest in react’s former class-based API. It was too complex. With hooks, I can write code in a more functional style, and even though they’re a little weird I think it results in more maintainable code.

I really wanted to push for using Reagent in Clojurescript, or something like re-frame that uses it, since CLJS has much better enforcement of and support for immutability-by-default and function composition. Everything that custom hooks do is handled by plain CLJS functions. It feels closer to meeting the design goals of React than React itself does, even with hooks.

It’s a hard sell though when I’m the only one at the company who knows the language. Maybe someday...

Re: Alternative lightweight UI library to modern day frameworks

#69
post #15

We shipped a very major product (300 person company) on Mithril.js a few years back when React was young and Angular was the go-to in this space. We had a fairly positive experience, but ran into enough problems here and there with vdom rendering bugs that we eventually decided to rewrite the entire product 4 years later in React. Certainly, it did was it was supposed to very well, until we really pushed it to its li…

Mithril author here. Curious what version you were using. There have been some notable internal changes to the engine over the years. The 1.0 release was a complete rewrite of the previous codebase, and included a very aggressive optimization inspired by inferno.js (called node recycling) that turned out to cause issues in some edge cases and didn't materialize significant enough performance benefits given the added…

Hey Leo,

Yeah we reported a few bugs over the years and many of them got fixed. We were using Mithril 0.x. We did get the product to a point where it was very stable, but there were patterns that we had to avoid (for example, at the time IIRC we had spooky bugs with children cycling between an element, a list of elements, or an empty array []).

In the end, the reason that we moved away from Mithril.js was that as a 300-person company, we just didn't have the resources to give it the attention that we felt we needed to give it (i.e. contribute) vs. the timeline that we needed for isolation and resolution.

Before we built our app in Mithril, I built a MVP prototype in Angular and the performance was so bad that the product was marked as "not plausible". Discovering Mithril.js was the only reason we decided to go through with the project. In some respects, the company owes its market-leading position to Mithril.js whilst its competitors are still crawling out of the dark ages of TTY and desktop thin clients

Re: Alternative lightweight UI library to modern day frameworks

#70
post #61

Earlier quoted context omitted.

I tried out Svelte recently. I really like the idea of a 'compiler first' framework which offers useful features that compile away to plain old lightweight JavaScript. I got on ok with the bare-bones Svelte compiler, but I found the surrounding ecosystem to be lacking. There are two different material design libraries for Svelte. [0][1] I wasn't able to get either of them to behave. It looked like they weren't being…

I know Angular seems to not be popular right now, but I am genuinely enjoying my job because of it. Maybe apart from animations, everything seems to consistently work. Even updating major versions is a mere footnote rather than a chore.

> I know Angular seems to not be popular right now

In terms of being in widespread use, I believe Angular is either #1 or #2 (competing against React). It's certainly not a 'cool' choice, it's a boring and stable choice, but there's a lot of value in that.

Post reply on HN