Live data from Hacker News

SvelteKit 1.0

svelte.dev

121–130 of 296 posts

Re: SvelteKit 1.0

#121

All the praise for SvelteKit in this thread peaked my interest. But where would I start? I'm currently looking around to find a modern "toolkit" to write a new webbased frontend for our traditional desktop app. It's goin to be more or less CRUD with lots of tables/grids. Currently I favour vue.js with Quasar because of all the tooling and ressources it offers. It looks like it's easy to start with a traditional "navi…

You can start here: https://learn.svelte.dev/tutorial/welcome-to-svelte

It is a really wonderful interactive tutorial. So well done.

Re: SvelteKit 1.0

#123
post #27

This is how I move fast and break nothing. By having fullstack type-safety from database all the way to the frontend with auto-completion. My current stack: + SvelteKit (could be Next, Nuxt, Solid or any other TypeScript framework) + tRPC (typed calls between frontend and backend, https://trpc.io ) + trpc-sveltekit (glues SvelteKit and tRPC, https://github.com/icflorescu/trpc-sveltekit ) + Prisma (ORM, https://www.pr…

Same, but with ASP.NET (which produces an OpenAPI specification) + Entity Framework on the server, React + TypeScript on the client (which consume that specification through openapi-generator). https://github.com/OpenAPITools/openapi-generator I chuckle every time I read claims about Go (or whatever) being amazingly productive. I don't think it's possible to beat this stack with regards to both productivity and ease…

Do you still need to pass around "Data Transfer Objects" to do simple parameter binding?

Re: SvelteKit 1.0

#124
post #27

This is how I move fast and break nothing. By having fullstack type-safety from database all the way to the frontend with auto-completion. My current stack: + SvelteKit (could be Next, Nuxt, Solid or any other TypeScript framework) + tRPC (typed calls between frontend and backend, https://trpc.io ) + trpc-sveltekit (glues SvelteKit and tRPC, https://github.com/icflorescu/trpc-sveltekit ) + Prisma (ORM, https://www.pr…

Same, but with ASP.NET (which produces an OpenAPI specification) + Entity Framework on the server, React + TypeScript on the client (which consume that specification through openapi-generator). https://github.com/OpenAPITools/openapi-generator I chuckle every time I read claims about Go (or whatever) being amazingly productive. I don't think it's possible to beat this stack with regards to both productivity and ease…

This is very backend-centric. It can't compare to a framework like SvelteKit or NEXT or NUXT, where the primary benefit is also shipping your tightly-integrated frontend code to the browser. .NET apps are old school, full refresh apps unless you are also using a separate frontend framework like React or Vue standalone. And that adds a lot of time and overheard.

Everything you described in terms of easy migrations and querying is exactly what Prisma gives you in the stack the OP described.

Re: SvelteKit 1.0

#125
post #26

I'm just completing a job using svelte/kit, tailwind, postgres, typescript. Actually, I was new to the entire stack, but it went smooth as butter. (Though I have plenty of experience with JS, HTML, CSS, other databases, etc.) IMO, svelte and sveltekit are well designed and have a great dev experience. LOL, as I was writing this he was apologizing on the stream for the breaking changes. That was a bit of a pain, but n…

Yes, it's easy to get confused with folders and folders of +page.svelte

[slug].svelte would be better [slug]/index.svelte [slug]/[category].svelte

Etc

There is a vscode extension that helps a little bit, but it's still the one thing I am not fond of.

Re: SvelteKit 1.0

#126
post #24

Earlier quoted context omitted.

its up to you - you can ship 0 kb of js if you want by turning off client side rendering https://kit.svelte.dev/docs/page-options#csr and you have this choice on a per page basis rather than having to choose between a static site generator or a full SPA

0kb is best size of JS. Curious if I do want JS, how much is extra framework overhead

3kB

Re: SvelteKit 1.0

#127
post #53

Earlier quoted context omitted.

This is what they said about React when it first blew up. Compared to Angular, it's much closer to being *just javascript™*. But I wonder how well that'll hold up after the honeymoon phase The builder.io team made a tool called Mitosis[^0] that lets you input a component written in almost any framework and automatically recreate that same component in any other framework including Vue, React, Qwik, Angular, Svelte, R…

> This is what they said about React when it first blew up FWIW, I think that "it's much closer to being just javascript™ " statement has absolutely held up over time (Angular, esp. the old angular.js is painful compared to React for this reason), AND that Svelte is likely a step closer again (which they can do because they have an entire compiler and aren't reliant on embedded a DSL inside of JavaScript).

I agree Svelte is a step closer, but most people agree that modern React has at least somewhat strayed from just javascript™. Server components by default, hooks, JSX, synthetic events, etc have added many more layers of abstraction. I fully support these developments. I just think they're a necessary byproduct of a project maturing. I fear that if Svelte ever blows up past a niche framework, it will also stray from it's "use the platform" philosophy out of necessity as well

Re: SvelteKit 1.0

#128
post #66

There is a plethora of javascript frameworks: React, Vue, Svelte, Remix, etc. If I know nothing about front-end development, and would like to learn one that is: - Intuitive - Suitable for small projects as well as large projects. - That is here to stay, i.e. either adopted by many companies, or its adoption curve is going up. Which one should I pick? Would Svelte be a good choice?

I would strongly recommend Vue3 in the composition style with .

It's really close to svelte's style, of simplicity and principle of least astonishment. It also uses very explicit wrappers for reactive objects so that there's isn't as much magic happening. For me, vue's reactivity is order of magnitude simpler than things like svelte.

Vue also has a pretty well established community and a pretty solid foundation.

Re: SvelteKit 1.0

#129
post #68
post #27

This is how I move fast and break nothing. By having fullstack type-safety from database all the way to the frontend with auto-completion. My current stack: + SvelteKit (could be Next, Nuxt, Solid or any other TypeScript framework) + tRPC (typed calls between frontend and backend, https://trpc.io ) + trpc-sveltekit (glues SvelteKit and tRPC, https://github.com/icflorescu/trpc-sveltekit ) + Prisma (ORM, https://www.pr…

Personally, I'd remove tRPC on down (and choose a database). It's nice there's type-safety between layers, but that's a bunch of layers that you don't even need. (A layer that doesn't exist takes is 100% type-safe and takes 0 hours to develop and maintain).

> A layer that doesn't exist takes is 100% type-safe

How are you ensuring your database accesses are type-safe in this case?

Re: SvelteKit 1.0

#130

There is so much "let me just see if this works..." tap tapppy tap .... "no... NO WAY... OMG IT WORKED!" with Svelte. Very little surface area. It embraces your knowledge of plain ole CSS/JS/HTML and empowers you with reactivity and a means of if being able to add motion to your ui. Newbs and Pros alike can build fast with it. That speed + reactivity allows your software to better keep up with your converstaions that…

Except it forces you to use node js, or do I read it wrong? Can we get a streamlined js framework that is just about the frontend and let’s you use whatever backend language you want? I know there is react, vue and angular but they seem so bloated

Svelte is a frontend framework, which you can use to build anything from a full SPA to a single button. SvelteKit is a Node backend framework that integrates tightly with Svelte.
Post reply on HN