Live data from Hacker News

Thoughts on Svelte(Kit), one year and 3B requests later

claudioholanda.ch

51–60 of 222 posts

Re: Thoughts on Svelte(Kit), one year and 3B requests later

#51
post #7

I've moved my little hobby website to SvelteKit[1] from react and I am not regretting it.. yet. The only main frustrations I have are: - Library support is pretty lousy. You need to fudge things around to get working. I.e, with leaflet and others I have vendored in the libs and redone them. - Incremental static refresh with svelte kit is not really there. I'd like a web hook or api callback that allows me to refresh…

Haven't had that refresh issue because I don't use that.

But I'm 100% with you on the routing. It's weird. One thing I had a lot of trouble was with "sub routing", like being in a route, opening a modal and having the url change so it can be linked to.

I had to implement some ugly workaround in the layout to catch hasthag # navigation.

Re: Thoughts on Svelte(Kit), one year and 3B requests later

#52
post #23

Earlier quoted context omitted.

draw.io if I'm not mistaken !

Actually, it looks like Excalidraw[1] to me. The shading and line style match very closely. [1] https://excalidraw.com/

The hatching and general hand-drawn style is probably done by rough.js, which is used by basically all those solutions.

Re: Thoughts on Svelte(Kit), one year and 3B requests later

#54
– “hmm, I’ll try this crazy approach, but will the framework even accept that?” – ”…” – “whoa, oddly enough it did… Alright then, next task…”

This sounds like the opposite of a nice DX for anyone but the engineer who wrote the original code.

Re: Thoughts on Svelte(Kit), one year and 3B requests later

#55
post #22
post #13

> by wrapping a vanilla lib to a component or an action, you’ve essentially created basic Svelte version of that lib This is the key to making framework churn go away. The DX of using vanilla JavaScript is getting better every day. And is a much better experience than it was a decade ago. > Islands architecture and partial hydration can help you render static HTML with just a small portion of JavaScript for those com…

This is all fun and games until you work on a platform that requires dynamically loaded modules, error boundaries and suspense (or another form of components loading their own data) and then the no-nonsense approach falls flat. It is easy to put your nose up towards bloated frameworks when you’re doing small (static) stuff but as soon as you need the bloat you’re just reinventing a wobbly wheel without one. There’s a…

> dynamically loaded modules, error boundaries

In an MPA, modules https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guid... can be included on the pages that require them with a script tag. Errors (and new features) are limited to a specific page, and the rest of the site remains unchanged.

> suspense (or another form of components loading their own data)

The htmx lib https://htmx.org/ mostly takes care of this: "gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML". The hx-boost tag can also be used for progressive enhancement.

> as soon as you need the bloat you’re just reinventing a wobbly wheel without one

When building a rich client, using a framework could be productive. For example a photo/video editor app. For a news site and CMS I would probably stick to the approach I've described above.

Re: Thoughts on Svelte(Kit), one year and 3B requests later

#56
post #22

Earlier quoted context omitted.

This is all fun and games until you work on a platform that requires dynamically loaded modules, error boundaries and suspense (or another form of components loading their own data) and then the no-nonsense approach falls flat. It is easy to put your nose up towards bloated frameworks when you’re doing small (static) stuff but as soon as you need the bloat you’re just reinventing a wobbly wheel without one. There’s a…

I work on a huge angular project and I can’t help but see svelte as a toy in comparison. Must be nice when everything just falls into place.

Maybe it's because angular is like dropping a nuke to kill a spider?

Re: Thoughts on Svelte(Kit), one year and 3B requests later

#58
post #46

I like the fact minimalist approaches, like svelte, htmx and alpine.js are getting more and more traction. I felt like fighting this fight alone for years in the golden years of node, webpack and react where everybody was creating crazy stacks and adding GraphQL and so on, to basically get what Django + jquery did 10 years ago in a tenth of the time and code. So far I also survived: - xml is the future - let's use no…

Unfortunately it takes time and experience to filter out the hype and marketing but hype and marketing usually acts against good experience. I thought something is wrong with me when a thought came to mind that (early) no-sql really really could use relations. People said I'm silly for trying to make no-sql sql-like.

> it takes time and experience to filter out the hype and marketing

When you have that experience, you subsequently apply for jobs that demand you be up-to-your-elbows in the over-hyped and over-marketed tech.

The industry, eagerly lapping up any and all shiny-marketing and advocacy, financially incentivises bandwagon-jumping over listening to experience.

Re: Thoughts on Svelte(Kit), one year and 3B requests later

#59
post #45

We have recently moved our website[1] to SvelteKit. Previously we were on Sapper. Previous to that we used a custom Webpack + React setup to output a static site. Our desktop app builder is also built on Svelte (not SvelteKit). I agree with pretty much everything in this article. I wouldn't put "Reactive declarations and statements" in the "Ugly" section though. They are definitely a bit tougher to fully grok than th…

I don't want people preaching hooks as the greatest invention since fire talks anyways. Such code if spotted anywhere in a backend would be slammed for being horrendous and violating almost any intuition definition of maintainable code.

The svelte documentation is already great. This evengleism is good for commercial products. For technical open source, subjective evaluation is all that is needed. You evaluate whether it fits for your needs, you adopt or not.

Not everybody is walking into conferences and sticking swag on back of their notebook lids.

Rich Haris seems a humble great guy and he's doing good enough IMHO.

Re: Thoughts on Svelte(Kit), one year and 3B requests later

#60
post #28

You need very strong argument not to take the most popular technologies these days. I don’t hear any arguments against react here strong enough to justify not choosing VueJS or React. It’s not in the interests of your client.

He said that he couldn't have met the deadline without Svelte.

Of course it could have been done without Svelte. Thats the only stack their team know and/or wanted to work with. Nothing wrong with that, but would be nice if they were more upfront about that instead of "impossible for a different solution to exist".

There was a psychological term for it, making a decision first and only then finding supportive arguments in favour of the decision?

Post reply on HN