Live data from Hacker News

Svelte is the most beautiful web framework I've seen

thefutureoftheweb.com

191–200 of 210 posts

Re: Svelte is the most beautiful web framework I've seen

#191
post #185

Earlier quoted context omitted.

> Adobe Flex was a closed-source and proprietary That confirms it: you aren't old enough to remember Flex. It was open source.

Please don't get involved in flamewars on HN. https://news.ycombinator.com/newsguidelines.html

Sorry. That was not my intent.

Re: Svelte is the most beautiful web framework I've seen

#192

So I just read about "Choosing Boring Technology" before coming into this thread. I guess React.js is the boring technology (already 5-6 years) one and Svelte is the new and exiting one! :)

I went through the svelte examples and I was exited until I reached the If block example:

    {#if user.loggedIn}
      
        Log out
      
    {/if}
To me such template language is a huge step back from JSX. JSX is JavaScript, thus you get the full power of the language (JS/TS) with the full support from your editor (type checking, auto-completion, etc.).

Re: Svelte is the most beautiful web framework I've seen

#193

This is not a web-framework. It is an frontend app framework for html/javascript

This is not a car. It is an electricity-powered four-wheel vehicle. So yeah, it's a car. This is not a PC. It is a Mac. So yeah, it's a personal computer. A framework that powers the web, isn't it a web framework? It's just a very broad category that also includes backend framework.

Nah, it does not power the web in any way. It is a html/java script application framework.

Nginx powers the web. Chrome powers the web. Rails powers the web.

Re: Svelte is the most beautiful web framework I've seen

#194
Svelte is strikingly similar to Marko.js [1] which predates it by few good years I believe.

Sadly the latter is still under the radar despite bringing in many interesting innovations to the space: its server-side approach being one of my favorite features.

[1]: https://markojs.com/

Re: Svelte is the most beautiful web framework I've seen

#195

Let the "soap box brigade" commence! I got introduced to Rich Harris via a podcast (not personally), but am a big fan of his perspective on JS. I think we can all agree that; if you don't like Svelte, then fine. If you love JSX/TSX - then great! If you're a Vue person, then awesome - its exactly what makes this community great - the diversity & innovation. Not the soap-boxing antics, polarised opinions & vilification…

> *"always bet on Javascript" I've been keeping all the modern javascript frameworks at arms distance, because I've always preferred to bet on HTML, for the client at least. That said, I've no issues with heavy reliance on JS on the developer machine, but I always prefer pages that can work without the reliance on JS. So, it seems opportune to ask: Is there a JS framework around that actually compiles to HTML and CSS…

It can't 'compile' to HTML, because it doesn't know at compile time what data you're going to give the component. Instead, if you compile with `ssr: true`, the JavaScript it generates is a module that generates HTML through efficient string concatenation. It's very easy to bake out static files as part of a build step, or generate markup dynamically as part of a Node server.

CSS is extracted at build time; typically your styles will be served as static .css files for maximum efficiency.

Re: Svelte is the most beautiful web framework I've seen

#196
post #189
post #117

Earlier quoted context omitted.

> sounds less efficient since you'll need to re-print the entire page with every change. Huh? No, not at all. As far as I understand, React has algorithms that replace only the html that changed in a dom subtree (and that is called virtual dom , not shadow dom , which is a different concept). But if you already know exactly what has changed and where to change it in the page, there is no need for more complex algorit…

> Bottom line: React is written in vanilla Javascript. Can't do better than it. You should watch "Rethinking reactivity" on YouTube. React is using Virtual DOM, which is not free. It is fast, but it is not free.

> React is using Virtual DOM, which is not free. It is fast, but it is not free.

Of course, that's what I meant- maybe it wasn't clear. React can't be faster than vanilla js, it's written in vanilla js after all.

The whole virtual dom's purpose is to calculate the smallest possible update when you don't know (and don't care) what exactly has changed in your view. But that calculation of course has a cost. And if you know very well what changed and where, like in the case of the GP, nothing can be faster than changing it directly.

Re: Svelte is the most beautiful web framework I've seen

#198

So I just read about "Choosing Boring Technology" before coming into this thread. I guess React.js is the boring technology (already 5-6 years) one and Svelte is the new and exiting one! :)

I went through the svelte examples and I was exited until I reached the If block example: {#if user.loggedIn} Log out {/if} To me such template language is a huge step back from JSX. JSX is JavaScript, thus you get the full power of the language (JS/TS) with the full support from your editor (type checking, auto-completion, etc.).

I hate template languages myself. But in Svelte’s defence, their template language in version 3 seems to be well-designed and streamlined.

It doesn’t have the ad-hoc nature of “oh crap we forgot to add if-then-else” of Angular or “let’s create half-a-dozen incompatible javascript-like DSLs” of Vue.

Re: Svelte is the most beautiful web framework I've seen

#199

So I just read about "Choosing Boring Technology" before coming into this thread. I guess React.js is the boring technology (already 5-6 years) one and Svelte is the new and exiting one! :)

To be clear, this is Svelte version 3, and the first commit was Nov 15, 2016. So the framework is technically 3+ years old. That said, I don't think boring is about age, but about real-world exposure

To be more in line with the article they're referring, its more about "known unknows" and "unknown unknowns"

Re: Svelte is the most beautiful web framework I've seen

#200

Earlier quoted context omitted.

I think it's the reverse. If you write pure functional components, React is very understandable. It's easily testable, you know that you'll have the same output if you pass it the same props. Svelte templates just take us back where we've been, with the twist of compiling the templates, which I believe some templating libraries already did.

React conceptually is very understandable, but understanding what it's actually doing under the hood is not.

It's only because of events implementation and async rendering. Writting preact clone is super easy.
Post reply on HN