↑ ↓ navigate↵ selectesc close

Fundamentals - Benefits of SvelteKit

Lesson 4 / 14Course Lessons Outline
▾

Benefits of SvelteKit

Now let’s go through, in more detail, some of the benefits of SvelteKit.

Here we have a diagram with some of the reasons why SvelteKit is becoming so popular. First, let’s look at the different rendering options. With SvelteKit, you can choose how you want to render content based on the route it is on. Originally with Svelte, the content was always rendered on the client side and you didn’t have access to the server at all. But with SvelteKit, we have the flexibility to decide what option best fits our application.

You may have seen some of these acronyms before, but if not that’s the thing about web development, there are always room for more acronyms. The options we have in SvelteKit include Client Side Rendering (CSR) like Svelte provided, but also Server Side Rendering (SSR) and Static Site Generation (SSG). With SvelteKit, we can even use both and choose which is best for each route. First, let’s take a look at server-side rendering.

This means that the content is generated by the server each time a user visits the page, which is ideal for SEO and content that always needs to be up to date. You would use this on sites that require a lot of user interaction or rely on a database for the latest content.

Next, there is static site generation where all of the files get generated at build time by the server and are cached at that moment in time. Your browser is fetching that same cached content over and over, making it extremely fast. This is great for content that doesn’t change. A good use case for this would be a blog site, landing page, or a store with products that don’t change very often. And last we have Client Side Rendering or you may have heard the term SPA, Single Page Application. This is where the browser handles most of the work and first load times are slower, but once it is loaded the site can feel more responsive.

Next, we’ll look at the 2nd benefit of SvelteKit, performance.

✏️ Visual Architecture Diagram

how this course connects together.

Follow AJ through the layered stack topology from input contract to production output.

✏️ Architecture Diagram: Intro to Svelte: Fundamentals - Benefits of Svel…
LAYERED SYSTEM STACKARCHITECTURE DIAGRAM
Architecture Diagram: Intro to Svelte: Fundamentals - Benefits of Svel…LAYERED SYSTEM STACK showing: Node 1: Fundamentals (Schema & deterministic boundary) -> Node 2: Intro to Svelte (Execution & state transitions) -> Node 3: Verified Production Artifact (Production output & telemetry). Content-driven layered-stack diagram for Intro to Svelte: Fundamentals - Benefits of SvelteKit: Fundamentals -> Intro to Svelte -> Verified Production Artifact.STAGE 01FundamentalsSchema & deterministic boundary1. FundamentalsSTAGE 02Intro to SvelteExecution & state transitions2. Intro to SvelteSTAGE 03Verified Production ArtifactProduction output & telemetryTyped Contract
[Diagram Walkthrough]Content-driven layered-stack diagram for Intro to Svelte: Fundamentals - Benefits of SvelteKit: Fundamentals -> Intro to Svelte -> Verified Production Artifact.
AAA Contrast Verified


related deep dives.

View All→