How to make a great framework better? - Svelte 5 with Rich Harris
HTML-код
- Опубликовано: 1 авг 2024
- We sat down for an interview with Rich Harris, the creator of Svelte and SvelteKit. In this video, Rich dives deep into the philosophy, features, and future of Svelte. Harris explains how Svelte simplifies web development, making it more accessible and improving app performance by compiling code at build time. He discusses the evolution of Svelte from its early days in newsrooms to the introduction of SvelteKit for full-stack development.
We touch on what's new in SvelteKit 2, and what's coming with Svelte 5 and Runes. I ask him about every framework adopting signals, and he explains why they're such a great concept.
Rich explains his thoughts on us overcomplicating web development, how some things should just be built in to the framework, and how we can make the web a better, more sustainable place.
📌 00:00:00 Intro
📌 00:00:49 What problem does Svelte solve?
📌 00:07:49 Writing the first line of Svelte
📌 00:12:34 Creating tech for on-the-ground problems
📌 00:14:58 Still newsroom DNA in Svelte?
📌 00:20:09 What's so great about Signals?
📌 00:26:20 What are Runes?
📌 00:33:28 Svelte VS React VS Vue
📌 00:37:10 Maintaining SvelteKit
📌 00:40:10 Svelte 5 Improvements
📌 00:47:54 SvelteKit 2 - Same but different?
📌 00:53:30 Goals for SvelteKit & Svelte
📌 00:59:38 Rollup
📌 01:01:58 Joining Vercel
📌 01:06:59 Why are the docs so good?
📌 01:16:13 Creation of the Svelte name and logo
---
🔗 Try Sveltekit with Prismic now
prismic.io/docs/svelte-install
---
As a developer, you should build websites using your favorite Jamstack framework.
Prismic allows you to build website sections, that you can connect to a website builder for your client or team. They will create pages from there and you get that content back to your code through our fast API.
► [Tutorial] Build a Next.js website, while delivering a page builder to your team: • Creating a Project Wit...
► [Starters] Try Slice Machine on Nuxt: prismic.club/nuxt-starters
► [Starters] Try Slice Machine on Next.js: prismic.club/nextjs-starters
► [Learn more about Slice Machine]: prismic.club/slice-machine
--- Наука
It was a joy getting to interview Rich! Who else is excited for Runes and Svelte 5?
everyone is excited for Svelte 5, but the real question is are you excited for jQuery v4 xD
Great interview btw
Excited for Svelte 6, c'mon!!
@@amanksdotdev didn't know jQuery is still alive
What I think we need is reactivity baked into JS. That and optional/progressive typing.
I've been using svelte(kit) for a couple years in a real project. The experience so far is amazing, and I'm very hyped to svelte 5. Thanks Rich and Svelte community!!!
This man, and other people like him who give the whole world the gift of their brilliance are a great example of someone who takes seriously the adage, "if you have the power, you have the responsibility." Thanks for sharing your gift, and making frontend development fun again!
I wholeheartedly agree with the sentiment. And you said it beautifully too.
i started using svelte this week, damn its super cool its just like magic and that is what programming language should be, thanks a lot to svelte, I hope svelte becomes industry standard.
Svelte changed my life too ❤
lotsssss of love from India for whole SVELTE TEAM & Prismic Team
why? arent u guys doing java?
@@nonefvnfvnjnjnjevjenjvonej3384 lol
Always enjoying developing with svelte!😊
I wish Rich good health and a long life. He is needed for the industry and more importantly is a good person.
I really love watching him....svelte has changed my life...
I've worked with Svelte for 2 years at my actual job (and a half if we count Svelte Native). I decided on using Svelte for our tech team due to the excelent DX, the great performance and minimal bundle size (bundle size was important for us and why we kinda hated React). It was great using it even with a not so conventional stack (after Svelte Native we changed to Svelte + Capacitor and some other tools that didn't integrate that great, like Storybook, but the pros still overweighted the cons) and specially creating our stack before sveltekit was a thing (I was sad when I saw it opening beta right when I'm creating the stack and not being able to use it due to not being stable enough). I really love Svelte and hope I'll use it for work someday again (my current employer uses React) and maybe Svelte 5 could help me convince the world and my employers to transition :) I'm really hyped for Svelte 5 to get out of beta.
Long live Sveltekit. Long live Rich
Seeing that this dude hates React's bullshit parts just as I do gives me double the confidence in Svelte, and I was already super into Svelte
Amazing work! And now React 19 is bringing the compiler there. I see it as Svelte paved the way.
Edit: React 19 will not include the compiler. However Meta is working on a compiler for React.
No, R19 does not include the compiler
@@IStMl true thanks! I will edit my comment.
I've been scouring youtube for Rich Harris interviews on Svelte 5. He is a fantastic speaker. And this is one of the best, if not best interviews yet.
Honestly, learning that the creator of Svelte still needs to occasionally refresh himself on some implementation detail is deeply comforting.
Rich Harris is one of the wisest developers on the market, and it’s such a blessing to have this team work on svelte. My concern at this point is people who still can’t understand why react sucks 😢
Totally! I can't understand why people are so stuborn, "oh svelte(kit) is so simple it can't be good for big projects", pisses me off, always end up using nextjs with a bajilion libraries
Your problem is to make what others think (something you cannot control) a concern of yours. There are many who love React and your whining about it here won't change it.
@@lobaco dumb shit is dumb shit. And the web is full of shit built with react by people like me. Who have or had no other options because the market demanded it.
There is not a single sane argument to running the entire vdom like a game engines tick function… but random ? Fuck off please 🙏 thank you 😊
Amazing, such inspiring, Thank you !🙌
Rich is a real passionate dev. I like this!
Svelte is great and definitely more user friendly than React and such. But Aurelia already achieved this many years ago. And in the details even better. Still my number 1 web framework: easy to learn, stable, fast, .. Aurelia 2 is on the horizon btw.
I used Ractive as the view part of my own SPA framework. It was really cool
I'm glad the frontend community has seen sense but the observer pattern has been around for a long time. Obvs with the compiler there is some nice sugar here. I always thought the React diff approach was a sales pitch that set us back so I'm glad most of the frameworks have seen sense and it also means that you can integrate using vanilla js. Not an ideal situation when you have multiple frameworks but it's good to have an option and a standard integration pattern.
I hear you, I remember using observers with RxJS a few years back. It's nice to see good ideas resurface and find mass adoption.
@@TrostCodes Angular has been doing it for almost a decade now... but I like that svelte brought signals to its ecosystem.
Great interview and interviewer. Well done.
my idol omg! when svelte native!!
That's a good question, I should have had that on my list!
I’m starting a new job where I only have used Angular and React for frontend work. They use SvelteKit for their frontends. Then I see we have the main mind behind Svelte is a nice British guy- I tried out the tutorials and it was a breath of fresh air. I don’t care about the template engine haters, the templating in Svelte is minimally intrusive for the trade off of being super productive and simple to reason about.
Look forward to learning than in tandem with Ruby on Rails
Is anyone here knowledgable in both Svelte and SwiftUI? I am wondering with Signals and Runes in Svelte, what would their corollary be in SwiftUI?
This is awesome! Thank you
Great interview
Wow the man is a legend of modern web development. He had his hands on so many things.
Love svelte and sveltekit! Been using it in production for many years now, made me like frontend again
I like the idea of runes just being a signal to the complier to do the thing. That will fix a bunch problems I've recently run into. However couldn't the same functionality also be created with type annotations or jsdoc comments?
Tying behaviour to types or comments is generally a bad and risky idea. I'm not sure if you were around during the first announcement in the Svelte Discord, but this really is a good design out of the 50 options they tried. Every user tried to reason different ideas, but eventually even they landed back at this implementation.
I've been using Svelte more than a year now and I don't think I will leave it anytime soon.
Reading Svelte 4 code is a joy. Svelte 5, on the other hand, is a hell next to React
This is the next framework I'll try.
Fr, this and solid are so high on my list
I appreciate what Rich is trying to do. I however - from what I've tested with Svelte 5 - say runes make thing harder for me.
Care to elaborate?
@@zayne-sarutobi Look at any Svelte 4 code that is compared to Svelte 5. You see Svelte 5 ruined Svelte experience
Rich is like a Harry Potter hourcrux for me. If he is harmed then part of me is harmed
Lol 😂
Svelte was the first web / js framework I ever used and I tried some stuff with React and Vue later. I guess there are not a lot of people that saw svelte before the other frameworks, but for me the others just feel horrible now :D (how complicated is it to learn all the special keywords like 'v-for'??)
I want to know Rich's thoughts on HTMX hmmmmmmmm
Why not Lit
Htmx is not for complex projects
how is runes being part of the language "svelte" better than vue's ref or preacts signal being part of the language javascript?
What he explained is that, In Svelte, there wouldn't be any extra layer around the reactive value.
In Vue, you have to do smth such as count.value = count.value + 1. In Angular, it would be count.set(count() + 1).
But they want to have something more straightforward where you just write count+=1.
Never used Svelte but I've used Vue and Angular a lot, and it's always a bit frustrating to have that kind of syntax
@@timmeehan2365had to make a wrapper around Vue primitives to get rid of the .value syntax😅
svelte is very cool
Almost thought it was a y combinator video 😂 my bad. Great content though
Rich, just wanted to say you thanks, thanks, thanks, thanks, THANKS!
50:40 Wow, I have been using iPhone for years, and I didn't know about swipe gestures for back/forward navigation in Safari. Until this video.
In the office im known as "the" svelte guy.
Emphasis on the "the"
Me too. The other ones are react guys and “i”m the weird one 🤦🏻♂️
They'll come around eventually.
I've done vanilla js with php, java spring, many templating systems, jquery, backbone, callback hell, promises, async await, rxjs, angular 1, Angular, react component classes, react hooks, vue, solid and svelte.
Would these guys respect me if I'd still be doing php and vanilla js? Would other young guys, in 10 years, respect your coworkers if they are still on react? Svelte is awesome and react changed web dev. This is all true, but isn't about building cool stuff? It's not a sport where you need to pick a vendor, be locked in and then gain status by proxy of your vendor. I'd have more respect for the guy that made a crappy react clone, than someone that shames someone else for their language or framework preferences
Svelte(kit) has been absolutely the worst thing that ever happened to me, because now I hate my day job whenever I have to do something in react 😭
could listen to rich talk about anything
Rich Harris is so wholesome
Rich is so good
Let's GOOOOO!!!
Regarding the name, I also for a long time had no idea that "svelte" is an English word. When I learned about this framework, I imagined that the name comes from some Scandinavian language (maybe I had this connotation, because the word started with "sve" like "svenska"). I even thought it was read like /sfelte/, so with an /e/ at the end.
I think it comes from French which took it form Italian which took it form Latin
French has the word "svelte" indeed but its presence in the English vocabulary could be related to Latin influence, like so many other words.
And French didn't take anything from Italian per say. Like any other modern Latin language, they are descendants of older languages which can eventually be traced back to Latin (it's not just Latin -> Italian)
the french dictionary is pretty clear as always concerning the origin@@timmeehan2365
I think classes should definitely go hand in hand with runes
To Spanish speakers the name makes sense :-). We have the same word: esbelto, esbelta. With the same meaning: elegant, light, pretty...
I LOVE SVELTE(KIT) !!!!!!
Love that he is a tailwind convert now!
Yeah, I was surprised to hear it! I don't think it's going to be his go-to CSS solution, but cool that he enjoyed it!
To be precise, he stated in a Vercel team video, when asked "CSS or Tailwind" he said "neither"
amazing Rich! but why are you sitting so close to each other?
Haha had to make it work in his apartment and stay within the frame. It felt fine at the time!
At the beginning they say 'in his Brooklyn apartment', not 'Manhattan penthouse"!
"html is actually a great starting point"
can you hear that react ?
So svelte is amazing framework for beginners basic routing and easy js syntax
not all hero's wear capes!
I want to a live in a (web) world where Rich Harris , José Valim and Chris Mccord rules the Internet together.
let's make svelte great again 🔥
im bad with frontend, svelte helped me suck less 😅
Web dev has sucked from the start. Framework after framework to try and address the deficiencies. Can't change the underlying languages though, HTML, CSS, JS. Can only build on top but still amazing after nearly 30 years we still haven't got there. Interested to try Svelte out on a project and see what it can do.
my biggest problem with svelte is the fact that it feels they're in a crusade against SPA.
You actually have a way to create svelte as an SPA. Someone even created a whole talk about it in the svelte channel.
Personally I think that many SPA shouldn't be SPAs, so yeah they are in a crusade, to give developers the choice, because many apps created with React as SPA would not give you this easy choice
@@raph151515 bullshit, there were plenty of ssr options to react, in fact ssr predates react.
Embrace modernity. Evolve to crab.
tailwind mentioned...
All development is hard. Web dev is hard for all the wrong reasons 😂
What's his take on HTMX?
look like js is destined to become a low level language we other things use to communicate with the browser, pretty much like assembly.
Welcome to coding, let's please the IDE, and also please the framework. So much to consider and next year we have to upgrade/migrate again :D
Web is fine 👍
lol
CSS hack workarounds, html emails still using tables, AJAX needed for update without refresh, browser inconsistencies, the need for CSS resetters, frustration with state and inheritance, html email dark mode nightmares
nah it needs some work
HTMX is the way to go
Not fot AI though
The only think holding me back (and I tried switching) is missing IDE support in Intellij/Idea. Vscode is really bad after you get used to "real" IDE like Intellij.
Curious.. what you dislike about vs code? For me it works perfectly. Intellij is too ugly
@@danvilela
The refactoring sucks in vscode.
Example: moving a single folder with source files -> breaks all imports / entire code base.
Intellij is a big slow and a bit complex -> but the refactoring works 100% seamlessly and reliable.
I love typescript and web development but I really hate vs code.
@davidsiewert8649 idk the version of vscode i have, once i move a file it upsates all the imports
@@omomer3506
If I move a single file it does for me as well.
Now try again moving a directory.
Doesn't work on iPhones ??? that's a big issue
SVELTE > REACT, in many cases
True until Svelte 5
how to copy others and silently accept your own mistakes
He and svelte is too powerful thats why Next js gave him job offer to stay distracted
I really don't fully buy into the simplicity part of this discussion. Pro developers care about productivity and understand a framework needs a deep ecology of packages that solve common problems.
It's easier to build complex stuff on top of a simple ground. Svelte helps doing that.
it depends, do you want to spend time on content and UI or to work on your own customized framework ? the problem with React based project is the initial setup duration if you want anything outside the bounds of the well oiled "distributions". In the npm web dev, the depth and volume of dependencies is often mind boggling, the cause is that for a while nobody gave a shit, some people think different and do something about it, the result is build performance and increase in reliability/safety. I prefer a project that uses 200 package than 10K, with often 20 times the same one with different versions. The end result as code executed is often similar but the way to produce the code is streamlined
All this is so wrong...
What i like about Svelte community is that even after two years of being ranked number 2 they still think that they are ranked highest 👍
I want to clarify that’s me misspeaking, not Rich. I meant to say among the highest or something to that effect. It’s a reflection on me rather than Rich or anyone in the Svelte community.
Typical JLarky moment
@@TrostCodes believe me, it's not just you :-)
of everything discussed in this video, this was your remark, interesting
@@zebeer Should be no surprise their name rhymes with snarky
I love sveltekit, it's my only framework i work!
Great interview