Live data from Hacker News

Svelte is the most beautiful web framework I've seen

thefutureoftheweb.com

141–150 of 210 posts

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

#141

Earlier quoted context omitted.

Am I the only one who would rather write the following instead of JSX? Board.draw(game) or drawBoard(game)

Well you might like Hyperscript or Elm, those are two approaches that work quite well using simple function calls. The thing with JSX is introduces a syntax that is familiar to the rendered output (which is the status quo), and there's a relatively clear visual separation between the declarative and imperative parts; which is hard to enforce in pure JS.

The problem with JSX (and it's the same problem with all declarative languages) is you have no control over the control flow.

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

#142
post #74

How would it scale for a bigger app ? Shipping a library with the app like react creates poor performance for small components for sure, but abstractions must become worth it beyond a certain scale no ? I guess the compiler could also create abstractions when it becomes worth using them ?

Rich Harris addresses scale in the Changelog podcast, and claims it to scale better than regular frameworks.

https://changelog.com/news/a-ui-framework-without-the-framew...

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

#143

I have a table of 100 rows x 10 columns mostly of numbers which change 10 times a second (think trading). The source data sits in an array of objects. On each update, I need to update the table cells with the latest values from the source array. The content of each cell can change, possibly it's css class too (from red it become blue for example). I'm using Vue/Bootstrap-Vue table at the moment, but it's quite slow.…

It looks like svelte.dev and the REPL are up and running again, so here's a quick example of a 100x10 table updating every value 100 times per second, with a red/blue class being applied to each cell depending on its value. It seems to do pretty well! I turned on the FPS meter in Chrome and scrolled around a bunch, and it seems smooth, reporting around ~50fps. It did get my CPU going pretty good, though. https://svel…

when I click through, it seems to just sit there going "loading Svelte compiler..." forever. Tried both firefox/chrome

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

#144

As someone who has built a number of data products w/ React, I decided to give Svelte a try a few months ago. At this point I am using it on some internal projects to great success & ease and probably wouldn't go back to React for newer projects unless there was a compelling reason to (eg collaboration w/ other React devs). As a disclaimer, I admire the React community + devs and think React has made a lot of hard th…

I've been considering svelte for exactly this d3 datavis use case. Are any of your projects publicly available to explore and get a feel for? I'm new to front end and so far have been disappointed with the speed of plotly and dash, which as I understand it are written around react. I'd love to see an example of svelte performance in a more datavis use case.

Unfortunately not – they're all private, internal views at the moment. I do hope to clean up some of my components and write something about some of the cool workflow aspects I've been able to unlock.

In the meantime, I would recommend walking through the tutorials & examples. They're very well written and I go back to them regularly to try out different parts. Try just making a simple line chart! Now make six on one page! Now try to link the rollovers for all of them! You'll probably learn a ton doing just that.

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

#145

Earlier quoted context omitted.

Businesses pay to solve business problems, not change frameworks. The majority of software dev requires long-term decision making, commitment and support. Developers who can't solve problems because they're too busy chasing the latest framework aren't going to be getting much work. People will experiment, and it's good for the industry to have new innovation, but there's really not that much danger of constantly shif…

> Developers who can't solve problems because they're too busy chasing the latest framework aren't going to be getting much work. That's not really how hiring works. Nobody is going to put "I failed to get anything done because we re-wrote everything in Svelte" on their resume. > People will experiment, and it's good for the industry to have new innovation, but there's really not that much danger of constantly shifti…

I'm saying that people dont constantly switch. It's not that common at all, despite what you might hear in online discussions. And it's usually because most of these projects have real timelines and deliverables, along with a team of people who aren't interested in rewriting everything either.

Of course there are a few teams (even in praised companies) that chase the fad, but they're the sames ones that do things like use CQRS and Kafka for a basic CRUD app.

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

#146
post #50

Earlier quoted context omitted.

> the article had a bad hype:information ratio That'd be 95% of all these dev.to articles

It's also on the author's blog: https://www.thefutureoftheweb.com/blog/svelte-is-the-most-be...

Ok, we've changed to that from https://dev.to/jesseskinner/svelte-is-the-most-beautiful-web..., since the preference here is for original sources.

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

#147

I have a table of 100 rows x 10 columns mostly of numbers which change 10 times a second (think trading). The source data sits in an array of objects. On each update, I need to update the table cells with the latest values from the source array. The content of each cell can change, possibly it's css class too (from red it become blue for example). I'm using Vue/Bootstrap-Vue table at the moment, but it's quite slow.…

No matter which framework you describe, this is an iterative approach and will be inefficient. The optimized (or, at least faster) way to handle this would be to have a unique ID attached to a cell and offer a direct callback to it via the data. E.g. the symbol for "GOOG" stored in a hash table, when GOOG updates; call that hash directly: "symbols[symbol].update(data)" then re-render the cell DOM element.

Svelte keeps a direct reference to DOM elements and mutates them when possible, if you do it right you can probably achieve vanilla-levels of performance.

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

#148

Earlier quoted context omitted.

I really like the demo video, you can select the code, scroll up and down, see different files. This is really neat!

Oh cool I didn't realize it was interactive. I'm pretty sure this is their scrimba platform[0], which is what they built imba for in the first place. [0] https://scrimba.com/

I also read that Imba can be used with other frameworks like React and Vue. That’s why Scrimba has courses on those where you can edit code while learning.

Imba can also be used to make desktop applications it seems. The team behind it also released GitSpeak, a Github client that works really well.

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

#149

Earlier quoted context omitted.

> It'll be gone in 5 years. It's getting too big and too slow Funny, that's what everyone said 5 years ago. I'll bet on React to be here for another decade, no problem - there's just way too much momentum. In a way, it's Rails all over again (that's a positive).

Rails burned out in under 10 years. The reason I say React will be gone in another 5 years is because it's already been popular for 5 and the muttering has started. Do you remember Adobe Flex? React is following a shockingly similar path and timeline.

Still writing Rails today, nothing seems to come close, except maybe Phoenix sortof

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

#150

Earlier quoted context omitted.

> It'll be gone in 5 years. It's getting too big and too slow Funny, that's what everyone said 5 years ago. I'll bet on React to be here for another decade, no problem - there's just way too much momentum. In a way, it's Rails all over again (that's a positive).

Rails burned out in under 10 years. The reason I say React will be gone in another 5 years is because it's already been popular for 5 and the muttering has started. Do you remember Adobe Flex? React is following a shockingly similar path and timeline.

> Rails burned out in under 10 years

It may not be the glory days, but Rail's is still going strong 13 years later. React, however, has reached a popularity many times larger than RoR ever did.

https://trends.google.com/trends/explore?date=all&geo=US&q=r...

There has never been a project (I can think of), other than the Linux kernel, with the resources that companies and developers have put behind React.

> Do you remember Adobe Flex

Flex never came close to either RoR or React popularity, and was propelled mostly by the dying wave of ActionScript programmers from the aughts after cell phones killed the Flash game market.

Post reply on HN