Live data from Hacker News

SvelteKit Is in Public Beta

svelte.dev

61–70 of 119 posts

Re: SvelteKit Is in Public Beta

#62
post #36

> Even though it was far from ready, SvelteKit was the only framework that matched our esoteric requirements. (Anyone who has worked in a newsroom and done battle with their CMS will know what I'm talking about.) I would be interested to hear more about the esoteric requirements; whether they're performance-related, have to do with what's representable in the CMS, or something else. At any rate, those NYT covid track…

things like: • we can't have any dynamic pages, everything has to be static HTML • we don't control the actual page; our job is to create a fragment of HTML that the CMS stitches into the body, then associate that fragment with some publish metadata... • ...but during development, we need a simulacra of the NYT article template • we have to be able to create AMP versions of almost every page • our old app was already…

Are there any plans to support deno?

Re: SvelteKit Is in Public Beta

#63
post #31

Earlier 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.

See Svelte as a JavaScript library like React or Angular, which allows you to develop web applications easily.

Now, SvelteKit is bringing the library to the _framework_ level (big big emphasis on "framework", we all have different definitions for what a framework is), which adds easy routing, server-side rendering, optimized JavaScript bundles per page for the client, etc.

Re: SvelteKit Is in Public Beta

#64

Earlier quoted context omitted.

things like: • we can't have any dynamic pages, everything has to be static HTML • we don't control the actual page; our job is to create a fragment of HTML that the CMS stitches into the body, then associate that fragment with some publish metadata... • ...but during development, we need a simulacra of the NYT article template • we have to be able to create AMP versions of almost every page • our old app was already…

Are there any plans to support deno?

Not concrete plans but I expect it will happen, yes (at the very least in the sense of having an `adapter-deno` to allow the built app to run in Deno; running SvelteKit _itself_ in Deno is a separate issue)

Re: SvelteKit Is in Public Beta

#65
post #53

from the documentation: There are two basic concepts: There are two basic concepts: Each page of your app is a component You create pages by adding files to the src/routes directory of your project. These will be server-rendered so that a user's first visit to your app is as fast as possible, then a client-side app takes over looks like you reinvented php, no?

Learn more about svelte (not just sveltekit here) and you'll see why your snarky comment just looks dull and uninformed. SSR (what you're calling reinvented php here) is just one tiny part of the svelte and broader component-based client-side JS ecosystem. You're washing away their incredible power for building fully browser-based applications that mix client and server logic all from the same clean codebase.

Re: SvelteKit Is in Public Beta

#66

Earlier quoted context omitted.

Are there any plans to support deno?

Not concrete plans but I expect it will happen, yes (at the very least in the sense of having an `adapter-deno` to allow the built app to run in Deno; running SvelteKit _itself_ in Deno is a separate issue)

Yeah, that will require rewriting lot of code for development so I understand.

Just curious, are you aware of few of the spinoffs of svelte for deno like snel?

https://github.com/crewdevio/Snel

Have you used deno for any toy projects and how did you like it? Any wishes or criticism?

Re: SvelteKit Is in Public Beta

#67
post #31
post #22

What 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…

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

#68
post #14

Out 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.

This blog post gives a bit more information on that: https://svelte.dev/blog/whats-the-deal-with-sveltekit , though the section on Snowpack is out of date. Basically, SvelteKit is serverless-first (whereas Sapper made you choose between a Node server and prerendered HTML), and because it's powered by Vite has a much nicer developer experience. It also fixes a few of the rough design edges in Sapper. This migration gu…

Oh, awesome, thanks for responding. Excited to give SvelteKit a try!

Re: SvelteKit Is in Public Beta

#69
post #67
post #31

Earlier 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?

Because to start a project you have to spend days and even months researching libraries, the current best practices, etc. and then glue them all together with some monster build system (webpack, etc.) and pray that one library doesn't update to be incompatible, or that the library maintainer loses interest and maintenance, etc. And then if you look at another project you have to learn everything again because they took an entirely different approach of glueing together libraries.

These frameworks are an opinionated take on project structure meant to save time and effort. Can they build anything and everything with JS? No, and they don't make such promises. Can they build most apps and things people want to build, and with a much faster and simpler setup? Absolutely, yes.

But honestly this isn't the thread to fight the framework vs. library fight. That ship sailed _years_ ago after create-react-app got popular.

Post reply on HN