News for hackers. Stuff that matters.
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by kennywinker on Monday August 16, 2021 @12:18PM (#28199800)
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.
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by montroser on Monday August 16, 2021 @08:12PM (#28204566)
That would be nice, but also we observers are not owed any such explanation by the creator.
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by kennywinker on Monday August 16, 2021 @09:57PM (#28205233)
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.

Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by scns on Tuesday August 17, 2021 @03:45AM (#28207257)
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by marz0 on Monday August 16, 2021 @12:11PM (#28199703)
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/

Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by yewenjie on Monday August 16, 2021 @11:01AM (#28198909)
So what is the current opinion of the JS ecosystem on two-way bindings?
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by lloydatkinson on Monday August 16, 2021 @11:31AM (#28199253)
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.

Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by shakezula on Monday August 16, 2021 @12:03PM (#28199601)
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.
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by kansface on Monday August 16, 2021 @11:39AM (#28199348)
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.
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by cutler on Monday August 16, 2021 @03:58PM (#28202173)
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?

Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by montroser on Monday August 16, 2021 @08:07PM (#28204524)
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.

Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by aitchnyu on Monday August 16, 2021 @12:12PM (#28199722)
Umm, why do new microframeworks constantly capture HN attention? I'm trying to understand the ecosystem between Vue and VanillaJS.
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by chrisrickard on Monday August 16, 2021 @06:48PM (#28203901)
Because there was once a time when Vue was being introduced on HN. They need to start somewhere.
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by paulhodel on Monday August 16, 2021 @12:25PM (#28199864)
LemonadeJS is pretty much vanilla, no depencies, no transpiling.
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by brundolf on Monday August 16, 2021 @05:16PM (#28203097)
When people say "VanillaJS" they typically mean "no framework, just browser APIs"
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by paulhodel on Monday August 16, 2021 @06:10PM (#28203576)
Exact, you can run under the browser. No framework.
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by brundolf on Monday August 16, 2021 @06:14PM (#28203625)
Right but it itself is a framework. When people say "vanilla JS" they typically mean building an app with just browser APIs.
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by codegeek on Tuesday August 17, 2021 @06:33PM (#28215557)
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by gremlinsinc on Monday August 16, 2021 @03:13PM (#28201695)
how's it compare to alpinejs and stimulus?
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by scns on Monday August 16, 2021 @11:08AM (#28198974)
It looks really nice IMO, simple in a good way. A real world appliction as an example would be great though.
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by paulhodel on Monday August 16, 2021 @12:25PM (#28199868)
A developer sent this one, which it is quite simple and interesting.

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

Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by paulhodel on Monday August 16, 2021 @12:27PM (#28199883)
Lemonadejs is a super lightweight vanilla javascript micro-library (4Kb). No dependencies, just Vanilla JS.
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by mthoms on Monday August 16, 2021 @09:10PM (#28204958)
This site breaks my browser back button. I find that enormously frustrating.
Re:Show HN: LemonadeJS – A micro JavaScript library for buil... by bemolator on Monday August 16, 2021 @12:33PM (#28199945)
I'm learning how to use it, and it is pretty awesome imo