Live data from Hacker News

Glimmer – Fast and light-weight UI components

glimmerjs.com

71–80 of 133 posts

Re: Glimmer – Fast and light-weight UI components

#71
post #60

Hmm, pretty heavy use of ES6, too (async/await, decorators etc.). Is there any "modern" library left that lets you use the browser's JavaScript engine directly, without transpiling?

Neither async/await nor decorators are part of ES6 (which is more properly called ES2015). Almost all major browsers support ES2015. A few recent versions support async/await, now that it's expected for that syntax to be a part of ES2017. None support decorators (in fact, I'd be surprised if decorators ever make it into the formal ES spec).

Compared to other Javascript libraries, it's not that bad, I was just hoping for a second that "extracted the render engine" meant something really lightweight, i.e. something you could just include as a script tag for lightweight use (like "sizzle", back in the days).

It's still going to be worth a look, as I don't mind opinionated stuff for some mid-sized SPAs and tools, I'm just missing a tool for the lower end in my belt these days.

Re: Glimmer – Fast and light-weight UI components

#72
post #19

Did not find easily any live example, should be required for any "UI" library. And should be displayed on the frontpage

We built this with glimmer. https://mcast.io/katgraham-exclusives/

What exactly do you need glimmer for on that page?

Re: Glimmer – Fast and light-weight UI components

#73
post #49

> Glimmer compiles your templates into low-level code so it can run as fast as possible—without sacrificing ease of use. What's the benefit vs just writing your templates in JavaScript in the first place?

JSX vs. templates is a common debate, with popular JSX options like React and Preact and template-based options like Vue and Glimmer. The reality is that there are hard tradeoffs to both and anyone who tells you one is obviously superior to the other is probably trying to sell you something. For me personally, templates ever-so-slightly edge out tools like JSX. For one, I subscribe to the Rule of Least Power[0]. Havi…

"The fact that Glimmer templates are "just HTML" makes them accessible to people like designers who may not understand all of the fancy destructuring or array mapping happening in your JSX."

isn't this like, at least a little backwards? JSX is HTML and JS. templating languages are HTML with some custom DSL.

destructuring and especially mapping are pretty simple concepts. creating a new syntax to cater to people who couldn't learn one in the first place seems counterintuitive?

is teaching someone a for loop really at all (let alone significantly) easier than teaching them to map an array?

edit: "creating a new syntax to cater to people who couldn't learn one in the first place seems counterintuitive?" on second read this seems thoughtless. isn't that almost the whole point of a DSL? i think you and i have convinced myself to stop hating on templates.

Re: Glimmer – Fast and light-weight UI components

#74

Glimmer is smaller and faster than React, with TypeScript supported natively. This is a game-changer for people who are looking for a lightweight rendering library that ships with great tooling support and a larger framework ecosystem behind it.

Did you try snabbdom? (https://github.com/snabbdom/snabbdom)

Works well for us :)

Re: Glimmer – Fast and light-weight UI components

#75
post #70
post #68

Earlier quoted context omitted.

No, they are compiling it down to instructions which are then interpreted by the Ember/Glimmer VM: https://youtu.be/vg5A_UOGShg?t=42m8s

…which is written in JS. Everything's all relative though. JS is certainly a reasonable choice for this.

They mean that they made use of --allow_natives_syntax to identify Hidden Classes.

Re: Glimmer – Fast and light-weight UI components

#76
This is the way not to design a landing page.

1) Ui components for what?

2) "Attention to detail of ember" - is that a quality comparison, or is it only for ember framework?

3) UI project without a single screenshot?

4) Doesn't mention one actual feature or component

5) GitHub link doesn't go to a repo. Instead it's a list of repos that you have to click around in to find the main project.

6) API docs link goes to a page that is blank except for another link to the actual API docs.

7) Add a few points back because at least they didn't name it CockroachUI (I still have hope the CockroachDB guys will change their name).

Just a guess - rhis was done by someone who has not agonized over bounce rates in google analytics.

Re: Glimmer – Fast and light-weight UI components

#78

"fastest DOM rendering engines, delivering exceptional performance for initial renders as well as updates." I read this every time new fw pops up. Usually those kind of claims are exceptionally exaggerated.

Of course it's exaggerated. It's just marketing.

You could write a naive virtual-dom or string template implementation and it would still be the DOM operations that would by far take the longest time. So decent frameworks and libs are comparing their small overhead only.

Re: Glimmer – Fast and light-weight UI components

#79
post #66
post #49

Earlier quoted context omitted.

JSX vs. templates is a common debate, with popular JSX options like React and Preact and template-based options like Vue and Glimmer. The reality is that there are hard tradeoffs to both and anyone who tells you one is obviously superior to the other is probably trying to sell you something. For me personally, templates ever-so-slightly edge out tools like JSX. For one, I subscribe to the Rule of Least Power[0]. Havi…

I absolutely hate any sort of HTML directives or non-trivial templating which in my mind violate the RoLP. You have a fundamentally simple technology and you're shoehorning complexity into it with the end result being there are multiple ways to implement everything. In my mind I'd rather have one tool to do everything -- Javascript. I don't think of JSX as HTML, I think of it more like Elm does -- a way to structure…

Yeah... That's my experience as well.

"Hummm, this string technology was meant for static webpages :( I think the solution is to create an arbitrary sub-language and add more string bits to it to make it dynamic" is more adapted when you quickly want to add a few dynamic behaviors to an existing static template here and there, but not so much when you build a complex app from the ground up.

Not to mention these opaque strings suck when you are serious about using a typed language :)

Re: Glimmer – Fast and light-weight UI components

#80

Earlier quoted context omitted.

I really don't, and few do, hence the popularity of create-react-app and next.js

So you're still working within a framework, then.

But when the app grows, you can customize it instead of forking ember to get around it's opinions, something I have had to do in production apps.
Post reply on HN