Live data from Hacker News

Why Svelte is our choice for a large web project

github.com

21–30 of 136 posts

Re: Why Svelte is our choice for a large web project

#22

Svelte is absolute trash. It actively encourages mutability, which is a one way avenue to bugs bugs and more bugs. ie, shit like this is all over the official documentation: let mutable = 1; function f1() { onMount(() => { mutable = /* do some complex shit here */ }); } function f2() { onMount(() => { mutable = /* do some complex shit here */ }); } Complete non-deterministic state changes. Absolutely abhorrent stuff.…

What a well thought out and articulate argument!

Re: Why Svelte is our choice for a large web project

#23
post #15

I love svelte. but now resorting to server rendered html pages with sprinkles of JS. shit I work on and I have noticed in the world doesn't really need frameworks like react, svelte, vue etc.

Same. I haven't done frontend work for a job for about a decade, but kept up to date with things like Angular/Vue/React. I was recently vountold by my wife to create a reunion site for her class. I looked up "barebones front end frameworks." Anything that began the "Getting Started" page with "npm install" I noped out of there.

I ended up with Skeleton/jQuery for the front end and PHP Slim for the backend. This is a 5 page, 2 forms, site targeted at 100 people. There's no need to SPA this, npm that.

Re: Why Svelte is our choice for a large web project

#24
I love React and I love Svelte. There, I said it.

These are the complaints that standout for me with Svelte after using it for a few months:

* Sub-par editor support. For me, the litmus test is whether I can use F2 to rename a variable, and it often does not work inside a Svelte template. There are other places where the editor does not know what to do with your code, because it is not pure JS. Vue is much worse with this since so many things are just strings; React really shines with editor support. This makes a big difference when you are using a large project where you didn't write the code.

* I don't love that you have to re-assign a object/array variable to get Svelte to notice it changed, and you can do that inside a Svelte template to a const variable and you won't get a complaint from the compiler.

* Much smaller ecosystem compared to React and Vue, which is expected at this point.

Other than this, I absolutely love Svelte. Stores are such an amazing abstraction. Animation is well thought out. Storybook works perfectly. Mostly it is pure JS once it gets inside the browser, so you can debug effectively which is not the case with Vue for example.

Re: Why Svelte is our choice for a large web project

#25
post #6

I have switched to pure HTML/CSS/Javascript for frontend. And I am very happy with it. I sometimes use external libraries. For example handlebars if I want to template something clientside. But no more frameworks. I think pure Javascript is plenty enough these days. For those who can't live without a framework: What would you miss?

Easy to use reactivity + unobtrusive client side templating = happiness.

I'm on my 5th or 6th project w/ svelte and it's been an overall joy to use so far.

Re: Why Svelte is our choice for a large web project

#26
post #6

I have switched to pure HTML/CSS/Javascript for frontend. And I am very happy with it. I sometimes use external libraries. For example handlebars if I want to template something clientside. But no more frameworks. I think pure Javascript is plenty enough these days. For those who can't live without a framework: What would you miss?

I go back and forth on this all the time. We have a variety of projects at work and relatively few bodies working on them. Definitely more projects than programmers.

Part of me feels like using "overkill" frameworks for everything is a better bet. It builds more familiarity and expertise. It certain makes some projects more complex than they need to be, but it makes it easier to switch from project to project.

Re: Why Svelte is our choice for a large web project

#28
I enjoyed learning Svelte; it was fun to use when I rebuilt a personal project from scratch using it[1].

I'm trying to think of some downsides to balance my enthusiasm for the framework, but can't think of any. The article mentions the smaller community as a possible issue, but the community on Discord seem very welcoming.

Re "using Svelte means adopting a new language" - it didn't feel like that to me. Every framework has its own way of doing things; Svelte's way didn't annoy me as much as some other frameworks have done in the past (eg: Angular before it became Angular2).

I've got another personal project rebuild coming up - I reckon I'll be treating that as an opportunity to learn more Svelte.

[1] My poetry website (you have been warned!) - https://rikverse2020.rikweb.org.uk/ I blogged about my experiences with Svelte, starting here: https://blog.rikworks.co.uk/2020/02/01/Recoding-the-RikVerse...

Re: Why Svelte is our choice for a large web project

#30
post #15

I love svelte. but now resorting to server rendered html pages with sprinkles of JS. shit I work on and I have noticed in the world doesn't really need frameworks like react, svelte, vue etc.

Same. I haven't done frontend work for a job for about a decade, but kept up to date with things like Angular/Vue/React. I was recently vountold by my wife to create a reunion site for her class. I looked up "barebones front end frameworks." Anything that began the "Getting Started" page with "npm install" I noped out of there. I ended up with Skeleton/jQuery for the front end and PHP Slim for the backend. This is a…

You seem to be refuting a straw-man argument here. Why would a hobby site provide a counter example for people talking about work they do for their employers?

No rational person would advocate using Svelte or React for a static, one-off, informational site to be maintained by a single person.

In fact, you didn't even need jQuery at all. Vanilla JS works across browsers in a way that it didn't when you learned web coding 10 years ago.

Where frameworks become useful is for large projects that many people work on over a long period of time. Turnover is an issue for non-standardized code, as is poorly organized code.

And none of that even touches on security, which absolutely requires libraries, packages, and many of the other benefits of reusing the ecosystem that you seem to eschew.

Post reply on HN