Live data from Hacker News

Svelte is the most beautiful web framework I've seen

thefutureoftheweb.com

181–190 of 210 posts

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

#181

Earlier quoted context omitted.

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…

as an aside, Rich made svelte, according to a podcast I was listening to, because he does dataviz for, currently the Times ( previously the Guardian ). So it should work well for that use case.

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

#182
post #59

Earlier quoted context omitted.

and this is exactly why I still drive a Ford Model-T.

comes in black, why would any one need another color. Glad we all settled on black being the only color for cars.

Python has a code formatter named Black after Ford's quote and is almost uncustomisable.

https://github.com/python/black

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

#183
post #60

Earlier quoted context omitted.

Sounds like Vue.js to me...

Oddly, it's a lot like Vue.js, except pre-compiled with a simpler syntax. Vue3 is about to make some syntax changes which will make Vue.js a lot like Svelte... :)

What specific syntax changes will make Vue like Svelte?

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

#184

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…

I think Web Components are an interesting mix where you are creating html tags using JS/HTML/CSS and they are natively interpreted by the browser.

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

#185

Earlier quoted context omitted.

> What's your point? Seriously? Adobe Flex was a closed-source and proprietary commercial offering capitalizing on the prior decade's popularity of Flash. React is open source with a vast and robust ecosystem of even more open source to go along with it. It couldn't be more night & day.

> 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

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

#186

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.

Not until version 3 in 2008, after which it became Apache Flex. Maybe you should try to get both your facts and attitude straight.

Please don't get involved in flamewars on HN. Personal attacks in particular will get you banned here, so please don't do those.

https://news.ycombinator.com/newsguidelines.html

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

#187
post #62

I like playing with different web frameworks, but the article had a bad hype:information ratio, so I googled the Svelte homepage, which I think is really well presented: https://svelte.dev/

Code examples on the Svelte website look jacked... all I see is an alert icon + "loading svelte compiler"

Same here on Firefox 68.0b14.

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

#188

Earlier quoted context omitted.

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…

Thanks, that's exactly what I'll do this weekend

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

#189
post #117

Earlier quoted context omitted.

Isn't the benefit of React/Vue the shadowDOM and not needing to do full page prints with every change? Honest question, I'm just going off what I hear everyone else saying so the vanilla JS, while the code may be more efficient, sounds less efficient since you'll need to re-print the entire page with every change.

> 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.

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

#190

Earlier quoted context omitted.

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.

I'm struggling to think what kind of control flow you're looking for when specifying a document consisting of a tree of components. If all you want is a way to render one nodeset over a different nodeset at runtime then you can easily do that by setting that behavior in the relevant component.
Post reply on HN