Hugo Hacker News

Show HN: LemonadeJS – A micro JavaScript library for building web interfaces

kennywinker 2021-08-16 16:18:32 +0000 UTC [ - ]

Mithril has a detailed “why this instead of react/vue/etc” article https://mithril.js.org/framework-comparison.html that I think should be mandatory for any library entering a crowded space like this. If only because i want to know the priorities of the developers.

montroser 2021-08-17 00:12:10 +0000 UTC [ - ]

That would be nice, but also we observers are not owed any such explanation by the creator.

kennywinker 2021-08-17 01:57:02 +0000 UTC [ - ]

No, but communities can set expectations, and then someone can choose to meet or buck the expectations of the community at their own risk.

A good example of this is the TodoMVC convention. Instead of making "whatever demo app you choose" a convention developed to make a Todo app, so that people could compare frameworks in a more "apples-to-apples" way. A new framework with a Todo demo would likely get more traction than a framework with a Calendar demo, because it's easier to evaluate and understand how it works.

scns 2021-08-17 07:45:47 +0000 UTC [ - ]

marz0 2021-08-16 16:11:20 +0000 UTC [ - ]

Looks interesting, but I think for a minimal JS framework I'd probably go with AlpineJS. It's pretty much Vue without components.

https://alpinejs.dev/

yewenjie 2021-08-16 15:01:54 +0000 UTC [ - ]

So what is the current opinion of the JS ecosystem on two-way bindings?

lloydatkinson 2021-08-16 15:31:57 +0000 UTC [ - ]

Kind of mixed. In Vue, two way bindings are achieved with the v-model directive but that is literally the syntax sugar equivalent of having a prop and an event.

That is, the two way binding with v-model is no different to doing it "manually" anyway.

shakezula 2021-08-16 16:03:26 +0000 UTC [ - ]

Vue handles it the best way, imo. Svelte does a decent job, too. I think it's basically at the point where it's considered the standard now, though, and basically every library just has it's own take on how to do it.

kansface 2021-08-16 15:39:43 +0000 UTC [ - ]

Personally, it tends to be convent in practice for forms but is an unholy abomination elsewhere. I'd eschew it altogether and deal with the extra verbosity when it crops up.

cutler 2021-08-16 19:58:44 +0000 UTC [ - ]

Looking at the site's example:

https://lemonadejs.net/v1/examples/hangman

... I see a lot of ugly ES5 code where everything is prefixed with self. How is this progress?

montroser 2021-08-17 00:07:44 +0000 UTC [ - ]

What you are criticizing is (the fashion of) the example app there, not the functionality or interface of the framework itself.

The lemonade.element function just wants a template and an object with some methods. Whether you use ES6 classes or proxies, or ES3 constructor functions with prototypical inheritance, or object literals to define that object is a matter of taste, and it is all up to you.

2021-08-16 21:19:16 +0000 UTC [ - ]

aitchnyu 2021-08-16 16:12:30 +0000 UTC [ - ]

Umm, why do new microframeworks constantly capture HN attention? I'm trying to understand the ecosystem between Vue and VanillaJS.

chrisrickard 2021-08-16 22:48:58 +0000 UTC [ - ]

Because there was once a time when Vue was being introduced on HN. They need to start somewhere.

2021-08-16 21:15:53 +0000 UTC [ - ]

paulhodel 2021-08-16 16:25:15 +0000 UTC [ - ]

LemonadeJS is pretty much vanilla, no depencies, no transpiling.

brundolf 2021-08-16 21:16:27 +0000 UTC [ - ]

When people say "VanillaJS" they typically mean "no framework, just browser APIs"

paulhodel 2021-08-16 22:10:39 +0000 UTC [ - ]

Exact, you can run under the browser. No framework.

brundolf 2021-08-16 22:14:43 +0000 UTC [ - ]

Right but it itself is a framework. When people say "vanilla JS" they typically mean building an app with just browser APIs.

codegeek 2021-08-17 22:33:48 +0000 UTC [ - ]

gremlinsinc 2021-08-16 19:13:25 +0000 UTC [ - ]

how's it compare to alpinejs and stimulus?

paulhodel 2021-08-16 16:27:41 +0000 UTC [ - ]

Lemonadejs is a super lightweight vanilla javascript micro-library (4Kb). No dependencies, just Vanilla JS.

scns 2021-08-16 15:08:08 +0000 UTC [ - ]

It looks really nice IMO, simple in a good way. A real world appliction as an example would be great though.

paulhodel 2021-08-16 16:25:51 +0000 UTC [ - ]

A developer sent this one, which it is quite simple and interesting.

https://lemonadejs.net/v1/examples/hangman

mthoms 2021-08-17 01:10:29 +0000 UTC [ - ]

This site breaks my browser back button. I find that enormously frustrating.

bemolator 2021-08-16 16:33:38 +0000 UTC [ - ]

I'm learning how to use it, and it is pretty awesome imo

maficious 2021-08-16 20:17:35 +0000 UTC [ - ]

F*ck, another one!?