I simply cannot wait for Svelte to blow up in popularity! It is by far the most promising web technology to me.
SvelteKit Is in Public Beta
71–80 of 119 posts
Re: SvelteKit Is in Public Beta
#72The code examples page is a thing of beauty and simplicity, bravo! https://svelte.dev/examples#hello-world
Re: SvelteKit Is in Public Beta
#73Re: SvelteKit Is in Public Beta
#74Out of curiosity, how does SvelteKit differ from Sapper? I haven't been involved with Svelte for some time. Looks cool by the way, I think Svelte is a really great product.
Check out the creator's first posts and videos of sveltekit when he introduced the alpha version: https://www.youtube.com/watch?v=qSfdtmcZ4d0 The way I understand it is it's an evolution of sapper to be more versatile, especially with respect to the backend. Out of the box it can work more easily with serverless providers that give you static file hosting + some kind of basic API gateway and serverless function platf…
Re: SvelteKit Is in Public Beta
#75Re: SvelteKit Is in Public Beta
#76Earlier quoted context omitted.
It's an application framework for Svelte which replaces Sapper. It uses Vite[1] for development and has been designed from the start to be able to produce static sites a la Gatsby or Next (Sapper wasn't great at that). Svelte Kit runs SSR on Node JS servers like Sapper did, but also on cloud functions and I think even Cloudflare Workers which do not run Node. [1] https://vitejs.dev/
That doesn't help. What is Sapper? This is defining web tech in terms of other web tech.
Doesn't that ring a bell?
Re: SvelteKit Is in Public Beta
#77Can I use it for SPA? Something like an Angular app with all the code running on the client side with routing (no SSR).
Not currently, but this will be implemented soon (and certainly before 1.0) https://github.com/sveltejs/kit/issues/231
As in, after the first SSR'd page the app becomes an SPA.
Re: SvelteKit Is in Public Beta
#78What is SvelteKit? The linked page assumes I already know and have just been waiting for an announcement. I have heard a bit about Svelte. I love the analogy with spreadsheets, where original spreadsheets reevaluated every cell whenever any cell changed. Modern spreadsheets maintain a dependency graph, so when something changes, only the direct dependencies are even evaluated. If any of them change, then only their d…
Added a paragraph to the blog post: > Think of it as Next for Svelte. It's a framework for building apps with Svelte, complete with server-side rendering, routing, code-splitting for JS and CSS, adapters for different serverless platforms and so on. > If you're familiar with Sapper, SvelteKit is Sapper's successor.
Here's my attempt.
1. Svelte is a JavaScript component framework, i.e. it offers a way to write reusable UI components in JavaScript. (Other popular frameworks include React, Angular, and Vue.)
Each major framework solves the problem of code reuse in a different way, and components written in one framework are generally hard to adapt to other frameworks, if only because each framework includes some JS that you have to run in order to make its components work, and it hurts performance to run three frameworks when you could have just run one, so developers fight a lot about which framework is best.
2. SvelteKit supports "server-side rendering" (SSR) for Svelte. JavaScript frameworks let you implement user interfaces in JS, but by default, that JS only runs ("renders" the UI) on the client side, in the user's browser.
Client-side rendering hurts performance if the user has a slow Android phone. But even on fast devices, client-side rendering adds round trips to the server, first requesting the page, then requesting the JS, then finally running the JS to render. It's usually faster to render HTML on the server, and then to progressively enhance it on the client side.
Server-side rendering requires you to buy into an even bigger framework, with JavaScript component code running on the server and on the client, but it can offer nifty features, like "code splitting," sending down just the right JS needed for the current page (or the current "route," which is a bunch of pages of the same type with similar URLs). SSR frameworks have to handle not just UI components, but entire pages, and deciding based on the URL which page to show, which is called "routing."
For React server-side rendering, you'll typically use Next.js. Vue offers its own server renderer. Angular offers "Angular Universal." Preact offers WMR.
Svelte had an older SSR framework called "Sapper." Sapper is now dead/deprecated code, and SvelteKit is the new thing.
Re: SvelteKit Is in Public Beta
#79Earlier quoted context omitted.
It's an application framework for Svelte which replaces Sapper. It uses Vite[1] for development and has been designed from the start to be able to produce static sites a la Gatsby or Next (Sapper wasn't great at that). Svelte Kit runs SSR on Node JS servers like Sapper did, but also on cloud functions and I think even Cloudflare Workers which do not run Node. [1] https://vitejs.dev/
Not another framework please. What's wrong with developing libraries and releasing them separately?
Re: SvelteKit Is in Public Beta
#80That's also what stops me from moving over to Vue 3 (for which Vuetify support is currently in Alpha).
Vuetify just makes dev life so much easier. If Svelte had something that deep and all-encompassing I'd go all-in.