Live data from Hacker News

UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

unsuckjs.com

171–180 of 194 posts

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#171

Earlier quoted context omitted.

> Also, suppose that you were to write something that interacted with the binaries of a closed-source system. That would not automatically remove the proprietary nature of your own software, so it is not infectious at all. You may not be able to distribute the proprietary software, but you could sell it as an add-on product without surrendering your IP. That's not ebola. That's a full quarantine and separation that r…

Again, it's quite difficult to get access to proprietary source code, so that is a false equivalence. I'm not confusing the benefits for penalties... I'm observing the emergent behavior that the GPL license produces by its viral and infectious rules. The strength of the legal threat has not been tested in court, to my knowledge, but why risk a lawsuit? And there is still the patent issue. In terms of marketing, GPL s…

[deleted]

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#172

Earlier quoted context omitted.

> Also, suppose that you were to write something that interacted with the binaries of a closed-source system. That would not automatically remove the proprietary nature of your own software, so it is not infectious at all. You may not be able to distribute the proprietary software, but you could sell it as an add-on product without surrendering your IP. That's not ebola. That's a full quarantine and separation that r…

Again, it's quite difficult to get access to proprietary source code, so that is a false equivalence. I'm not confusing the benefits for penalties... I'm observing the emergent behavior that the GPL license produces by its viral and infectious rules. The strength of the legal threat has not been tested in court, to my knowledge, but why risk a lawsuit? And there is still the patent issue. In terms of marketing, GPL s…

The GPL isn't viral its a simple bargain you can pick up or leave without also agreeing nor disagreeing with anyone's politics. There is no "danger" of any kind whether you can or cannot use GPL software is a trivial matter. If you are distributing proprietary software then you cannot. Foregoing software as a user because it is licensed under the GPL makes even less sense. The GPL simply doesn't restrict use in any fashion. It's like saying if I find out my a brands clothes was sewn by people who drink milk I bail man I'm lactose intolerant! It's a basic misunderstanding of how things work or a weird hang up.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#173

Earlier quoted context omitted.

Only thing missing is inlining your css styles on each element, only a mad man would try that though... [cough]... https://github.com/samwillis/x-style

Or, tailwindcss…

Did you even click the link? The "Why?" section explains the problem with tailwind and the code sample shows it's doing a different thing, closer to htmx.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#174

Earlier quoted context omitted.

It sucks so much its unreal, forces OOP JS, which causes extreme amounts of boiler plate code and mutation bugs, making a simple change becomes a one week task. I'm just doing a complete rewrite of a legacy codebase made with TS, webcomponents and lit into a modern framework, which is about the only sane thing to do with it.

I would love to see a more fleshed out rebuttal of it. Is it a scale issue?

Web components were invented to make components more reusable independently of frameworks, nice, but turns out frameworks kept improving and now code is much more reusable between any modern framework (react/svelte/vue) than with web components. They are fully enapsulated and a pain to style, so if you don't need that encapsulation for some reason, you should not use them.

Lit is a framework for using web components, managing state and routing, it adds lots of boilerplate and uses OOP hierarchies to couple abstractions that could be otherwise separate. Lit uses object properties to detect changes and provides rerendering of the changed parts of the app.

This combo makes it work so terrible, you're orcestrating encapsulated components within inheritance chains and each part has a lot of boiler plate code and a lot of mutation. Its separating encapsulation by technology instead of concern, and enforcing this really hard. The end result is code terrible to read and very hard to change, full of mutation bugs and broken flows that don't properly update.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#175
post #50

Earlier quoted context omitted.

The ecosystem, if you're building a product of a certain complexity and can't afford writing large, complex, un-battle-tested views from scratch.

What's an example of a large, complex, unbattle tested view?

Material Design

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#177

I was praising HTMX the other day when someone pointed me to Unpoly. Indeed, after I converted one of my apps to it, Unpoly is really a better version of HTMX and I think it deserves more exposure. https://unpoly.com

Also an HTMX fan and hadn't heard of unpoly. Looks interesting (and site design is great). Thanks for the highlighting.

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#178

Where is preact?

I don't think preact is part of the "progressive enhance html" Progressive enhance HTML means whatever backend you use, it spits out html, and the HTML is rendered without Javascript. Preact fails this. The libraries are meant to progressively enhance html by replacing or enhancing certain actions with small javascript. For example, with htmx, usually clicking on html link would load complete page, but with clever ht…

That doesn’t describe mithril which is on the list though

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#179

I was praising HTMX the other day when someone pointed me to Unpoly. Indeed, after I converted one of my apps to it, Unpoly is really a better version of HTMX and I think it deserves more exposure. https://unpoly.com

Also an HTMX fan and hadn't heard of unpoly. Looks interesting (and site design is great). Thanks for the highlighting.

Relevant discussion: https://news.ycombinator.com/item?id=36086102

Re: UnsuckJS: Progressively enhance HTML with lightweight JavaScript libraries

#180

Earlier quoted context omitted.

Only thing missing is inlining your css styles on each element, only a mad man would try that though... [cough]... https://github.com/samwillis/x-style

Or, tailwindcss…

Tailwind is awesome and gets so much right. However, it requires a build step using local dev tools, and it has a complete DSL that reimplements most of css as classes.

Utility classes for uniform padding, spacing, border, colours etc at brilliant. But my suggestion with x-style is that placing the actual css on an element may be better.

It's an experiment, seeing where it leads.

Post reply on HN