POPULARITY
Miško Hevery, CTO of Builder.io and creator of Angular, returns to talk about Builder.io's new AI tool, Visual Copilot, Partytown, and more in the Builder.io ecosystem. Links https://twitter.com/mhevery https://www.linkedin.com/in/misko-hevery-3883b1 https://github.com/mhevery https://www.builder.io We want to hear from you! How did you find us? Did you see us on Twitter? In a newsletter? Or maybe we were recommended by a friend? Let us know by sending an email to our producer, Emily, at emily.kochanekketner@logrocket.com (mailto:emily.kochanekketner@logrocket.com), or tweet at us at PodRocketPod (https://twitter.com/PodRocketpod). Follow us. Get free stickers. Follow us on Apple Podcasts, fill out this form (https://podrocket.logrocket.com/get-podrocket-stickers), and we'll send you free PodRocket stickers! What does LogRocket do? LogRocket combines frontend monitoring, product analytics, and session replay to help software teams deliver the ideal product experience. Try LogRocket for free today. (https://logrocket.com/signup/?pdr) Special Guest: Misko Hevery.
In web development, we're not just crafting code; we're shaping the digital world's future. In this episode, we interview Misko Hevery, co-founder of Builder.io, about the landscape of web development and the cutting-edge Qwik framework. Misko starts by diving into Builder.io. Discover how it aims to bridge the gap between visual web content creation and developers' expertise, creating a win-win situation for both parties. Moving on to the world of Qwik, Misko expounds on its unique approach of delivering components rather than JSON data, resulting in unparalleled user experiences. Explore how Qwik challenges the conventions of existing frameworks and offers a fresh perspective on web development. Throughout the episode, Misko also explores many topics, such as the sustainability of open-source materials, what's next for Builder.io, and more. Tune in to this conversation now and embark on a journey that could reshape the way you think about building for the web. Don't miss it!
Hello esteemed colleagues and tech enthusiasts!
Jack Herrington is a Principal Software Engineer. Misko Hevery is the Chief Technology Officer at Builder.io. They join the show to talk about "Qwik v1.0". Misko takes the lead as he shares its exciting new features. He explains what is the Panda CSS and how it works. Moreover, he dives into some of the "Qwiklabs projects", its benefits, and many more!SponsorsChuck's Resume Template Developer Book Club Become a Top 1% Dev with a Top End Devs MembershipLinksqwikQwiklabsPanda CSSSocialsLinkedIn: Jack HerringtonLinkedIn: Misko HeveryPicksAJ - The Legend of Zelda™Jack - Monkeytype Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle.com/privacy
Miško Hevery, creator of Angular, Qwik, and CTO of Builder.io, comes on to talk about how too much JavaScript can slow apps down and how to rectify it. Links http://misko.hevery.com https://twitter.com/mhevery https://www.linkedin.com/in/misko-hevery-3883b1 https://qwik.builder.io https://stackblitz.com/edit/qwik-starter?file=README.md Tell us what you think of PodRocket We want to hear from you! We want to know what you love and hate about the podcast. What do you want to hear more about? Who do you want to see on the show? Our producers want to know, and if you talk with us, we'll send you a $25 gift card! If you're interested, schedule a call with us (https://podrocket.logrocket.com/contact-us) or you can email producer Kate Trahan at kate@logrocket.com (mailto:kate@logrocket.com) Follow us. Get free stickers. Follow us on Apple Podcasts, fill out this form (https://podrocket.logrocket.com/get-podrocket-stickers), and we'll send you free PodRocket stickers! What does LogRocket do? LogRocket combines frontend monitoring, product analytics, and session replay to help software teams deliver the ideal product experience. Try LogRocket for free today. (https://logrocket.com/signup/?pdr) Special Guest: Misko Hevery.
Qwik is a new kind of framework that is resumable (no eager JS execution and no hydration), built for the edge and familiar to React developers. In this episode we welcome Misko Hevery to learn about Qwik, the problems it solves, and how Qwik is optimized for building highly performant web applications that are resumable.Learn more about Qwik:qwik.builder.io builder.ioFind us and our guests on twitter:Misko Hevery @mheveryThe Angular Plus Show (@AngularShow)The Angular Plus Show is a part of ng-conf. ng-conf is a multi-day Angular conference focused on delivering the highest quality training in the Angular JavaScript framework. 1500+ developers from across the globe converge on Salt Lake City, UT every year to attend talks and workshops by the Angular team and community experts.Follow us on twitter @ngconfOfficial Website: https://www.ng-conf.org/
What's up everyone, this is Dariusz Kalbarczyk co-founder of NG Poland, JS Poland, Qwik Poland & WorkshopFest.dev. Welcome back to the JavaScript Master Podcast. Today, together with Miško Hevery, who is a CTO at Builder.io, creator of Qwik, Angular, Angular.js and co-creator of Karma.js, we will talk about QWIK Advantages. https://js-poland.pl
What's up everyone, this is Dariusz Kalbarczyk co-founder of NG Poland, JS Poland, Qwik Poland & WorkshopFest.dev. Welcome back to the JavaScript Master Podcast. Today, together with Miško Hevery, who is a CTO at Builder.io, creator of Qwik, Angular, Angular.js and co-creator of Karma.js, we will talk about QWIK City. https://js-poland.pl
Misko Hevery is the Chief Technology Officer at Builder.io. He is also the creator of Angular.io, known for zone.js, and helped co-create karma. He returns to the show to discuss "Qwik" in greater detail alongside AJ and Steve. No matter how complex your website is, Qwik provides the fastest possible page load times. In contrast to other frameworks, Qwik has special features that make it more user-friendly.About This EpisodeHow Qwik addresses any issueDifferent Qwik features that make it convenient and efficient to useOverview of precision lazy-loadingIntroduction to MitosisOn YouTubeQwik Part II With Misko Hevery - JSJ 563SponsorsChuck's Resume TemplateDeveloper Book Club starting with Clean Architecture by Robert C. MartinBecome a Top 1% Dev with a Top End Devs MembershipLinksQwikPapanasi UI LibraryMitosis FiddleBuilder.io and Qwik - JSJ 540Qwik with Misko Hevery - JSJ 549PicksAJ - Vornado heatersAJ - Replacement Parts for Office ChairsMisko - Flux | Where the world builds hardwareSupport this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle.com/privacy
Qwik is a new kind of web framework that can deliver instant loading web applications at any size. Miško Hevery is the creator of Angular and Qwik and CTO of Builder.io. Miško joins us today to talk about Qwik and Qwik's meta-framework, Qwik City. Links https://twitter.com/mhevery https://twitter.com/qwikdev Qwik.new (https://stackblitz.com/edit/qwik-starter?) Tell us what you think of PodRocket We want to hear from you! We want to know what you love and hate about the podcast. What do you want to hear more about? Who do you want to see on the show? Our producers want to know, and if you talk with us, we'll send you a $25 gift card! If you're interested, schedule a call with us (https://podrocket.logrocket.com/contact-us) or you can email producer Kate Trahan at kate@logrocket.com (mailto:kate@logrocket.com) Follow us. Get free stickers. Follow us on Apple Podcasts, fill out this form (https://podrocket.logrocket.com/get-podrocket-stickers), and we'll send you free PodRocket stickers! What does LogRocket do? LogRocket combines frontend monitoring, product analytics, and session replay to help software teams deliver the ideal product experience. Try LogRocket for free today. (https://logrocket.com/signup/?pdr) Special Guest: Misko Hevery.
Today we talk with Misko Hevery about solving the loading speed issue for websites constructed using JavaScript frameworks. Such websites are often slow to load, which is detrimental to their ability so succeed. After 16 years at Google, where he created Angular, he now works on the Qwik framework at Builder.io, a headless visual CMS. We learn how Qwik dramatically improves page speed metrics through an innovative architecture that enables resumability instead of hydration. We talk about how this is implemented, and about how you can get started with it. Sponsors Top End Devs Coaching | Top End Devs Links ng-conf 2022 Builder.io and Qwik - JSJ 540 Core Web Vitals and Whatnot - JSJ 537 JSJ 476: Understanding Search Engines and SEO (for devs) - Part Resumable Frameworks: | Miško Hevery | ng-conf 2022 Webinar Framework reimagined for the edge! Twitter: Miško Hevery Picks AJ- JULIAN SMITH - Malk AJ- webinstall.dev AJ- Watch The Sandman | Netflix Official Site Charles- JavaScript Remote Conference 2022 Charles- Home Dan- Gentleman Bastard Series Dan - War in Ukraine Misko- Thinking, Fast and Slow Steve - Dad Jokes Support this podcast at — https://redcircle.com/javascript-jabber/donationsPrivacy & Opt-Out: https://redcircle.com/privacy
Today we talk with Misko Hevery about solving the loading speed issue for websites constructed using JavaScript frameworks. Such websites are often slow to load, which is detrimental to their ability so succeed. After 16 years at Google, where he created Angular, he now works on the Qwik framework at Builder.io, a headless visual CMS. We learn how Qwik dramatically improves page speed metrics through an innovative architecture that enables resumability instead of hydration. We talk about how this is implemented, and about how you can get started with it. Sponsors Top End Devs Coaching | Top End Devs Links ng-conf 2022 Builder.io and Qwik - JSJ 540 Core Web Vitals and Whatnot - JSJ 537 JSJ 476: Understanding Search Engines and SEO (for devs) - Part Resumable Frameworks: | Miško Hevery | ng-conf 2022 Webinar Framework reimagined for the edge! Twitter: Miško Hevery Picks AJ- JULIAN SMITH - Malk AJ- webinstall.dev AJ- Watch The Sandman | Netflix Official Site Charles- JavaScript Remote Conference 2022 Charles- Home Dan- Gentleman Bastard Series Dan - War in Ukraine Misko- Thinking, Fast and Slow Steve - Dad Jokes
What's up everyone, this is Dariusz Kalbarczyk co-founder of NG Poland, JS Poland, AngularMaster.dev & WorkshopFest.dev. Welcome back to the JavaScript Master Podcast. https://js-poland.pl Today, together with Miško Hevery, who is an CTO at Builder.io, creator of Qwik, Angular, Angular.js and co-creator of Karma.js, we will tell you about everything that happens around Qwik. Hi Miško. How are you? For those who don't know you yet, please tell us about yourself? What exactly do you do at Builder.io? What does your work day look like? Before we get started, I wouldn't be myself if I didn't ask you about Angular. I know that this podcast is supposed to be dedicated to Qwik, I know it is your newest baby and you surely love it very much. Am I correct? I also know that you are the creator of AngularJS, about which I once wrote a book, which completely changed my professional life. For that I would like to publicly thank you now! Tell us how you started your adventure with Angular, what was the main driving force for you, to create this amazing framework, and what goals did you set for yourself at the beginning of this journey? Let's now turn to the main topic of our conversation which is: Qwik. Qwik offers the fastest possible page load times - regardless of the complexity of your website. Qwik is so fast because it allows fully interactive sites to load with almost no JavaScript and pickup from where the server left off. What does it mean? What goals did you set for yourself this time? What, then, is the difference between the current generation of frameworks and Qwik? Why is Qwik unique? What is the biggest benefit of switching to your new baby? Since Qwik gives us something like a screenshot of the data, how often is the dynamic data from the server refreshed? Does Qwik help the developer write applications faster, or is it focused on download speed. For whom would you recommend Qwik, and for what? For developers of small sites or rather for big players, or maybe for both? What's the easiest way to get started with Qwik? Is the entry threshold high? What is Qwik city and why do we need it? https://qwik.builder.io https://partytown.builder.io
Recording date: 07/07/2022John Papa @John_PapaWard Bell @WardBellDan Wahlin @DanWahlinCraig Shoemaker @craigshoemakerMiski Hevery @MHeveryBrought to you byAG GridNarwhal Visit nx.dev to get the preeminent open-source toolkit for monorepo development, today. Resources:Misko HeveryQwikPreloadPrefetchingLazy vs eager loadingQwik API documentationMicrofront endsQwik PlaygroundQwik CityQwik TutorialsQwik ExamplesTimejumps00:40 Guest introduction01:29 Why create another framework?03:05 What is Qwik?09:07 Sponsor: Nrwl09:43 Lazy loading issues12:47 How should app developers think about these issues?18:44 Does Qwik take care of implementation details?22:31 Sponsor: Ag Grid23:33 Who is the target for Qwik?29:27 What is Qwik City?30:32 What's Qwik's developer experience?33:56 What is Qwikify React?37:22 How should someone check out Qwik?Podcast editing on this episode done by Chris Enns of Lemon Productions.
In this episode of NgXP, we talk with Misko Hevery, the Father of Angular, about his recent work with Builder.io and the Qwik web development framework. Misko shares his thoughts on assumptions he thinks exist about how the web is built and how Builder.io and Qwik disrupt these assumptions. He then discusses how Builder.io is making it possible eCommerce sites in particular to blaze the path for earning top scores with Google PageSpeed. But what does this all mean for Angular developers? Misko shares his thoughts on this as well...LINKS:https://www.builder.io/https://dev.to/mhevery/a-first-look-at-qwik-the-html-first-framework-afhttp://misko.hevery.com/CONNECT WITH US:Misko Hevery @mheveryBrooke Avery @JediBraveryErik Slack @erik_slack
NOTE: In this episode, Misko uses demos to share more about how Qwik and Partytown work. If you would like to follow along with the demos please check out the video recording of this interview here https://youtu.be/0wXjI_bqY9c. Misko Hevery, the creator of Angular, joins us to talk about his latest projects at builder.io including Qwik, the HTML first framework, and Partytown, a lazy-loaded 6kb library to help relocate resource-intensive scripts into a web worker, and off of the main thread. Learn more in this episode. Links https://twitter.com/mhevery https://www.builder.io https://angular.io https://twitter.com/builderio https://twitter.com/QwikDev https://twitter.com/angular https://twitter.com/adamdbradley https://www.youtube.com/watch?v=r1A1VR0ibIQ https://github.com/BuilderIO https://github.com/BuilderIO/partytown https://github.com/builderio/qwik Contact us https://podrocket.logrocket.com/contact-us @PodRocketpod (https://twitter.com/PodRocketpod) What does LogRocket do? LogRocket combines frontend monitoring, product analytics, and session replay to help software teams deliver the ideal product experience. Try LogRocket for free today. (https://logrocket.com/signup/?pdr) Special Guest: Misko Hevery.
The following is my conversation with Abhi Aiyer and Ward Peeters, two lead engineers behind Gatsby Cloud and the recently announced Gatsby v4, which is at the forefront of what I think is the most significant change in the Jamstack landscape in the past 2 years.Watch the video version here. Links: Gatsby 4 Netlify DPR My blogpost on Smart Clients vs Smart Servers Timestamps: [00:00:00] Cold Open [00:00:28] Swyx Intro [00:01:59] Call Start [00:03:07] Gatsby v4 [00:06:23] Incremental Builds [00:07:16] Cache Invalidation [00:09:03] Gatsby DSG vs Netlify DPR [00:09:35] Abandoning Redux for LMDB [00:11:50] Parallel Queries (PQR) [00:13:32] Gatsby DSG [00:15:24] Netlify DPR vs Gatsby DSG [00:19:19] The End of Jamstack [00:22:12] Tradeoffs and Performance [00:24:34] Image Processing [00:27:25] Automatic DSG [00:29:33] Gatsby Cloud vs Netlify [00:33:34] Gatsby vs Next.js [00:35:41] Gatsby and the Content Mesh [00:37:19] React 18 and Gatsby [00:39:45] Custom rendering page fragments with React 18 [00:42:10] Server Components in Limbo [00:43:33] Smart Servers vs Smart Clients [00:45:21] Apollo and Open Source Startup Strategy [00:47:06] TMA: Too Many Acronyms [00:49:16] Gatsby for Docs Transcript [00:00:00] Cold Open [00:00:00] Abhi Aiyer: And so with LMDB in place, right? We have workers that can read and write to LMDB, which allows us to run parallel queries. So PQR was a huge advancement for us. I think we saw up to like 40% reduction in query running time. And build times went down. We had a goal, I think it was like, we'd try to look for at least 20% reduction in build times and I think we hit 26%, so all cool wins, you know? [00:00:28] Swyx Intro [00:00:28] swyx: The following is my conversation with Abhi Aiyer, and Ward Peeters, two lead engineers behind Gatsby Cloud, and the recently announced Gatsby V4, which is at the forefront of what I think is the most significant change in the JAMstack landscape in the past two years. We discussed how parallel query writing PQR and deferred static generation DSG are achieving 40% faster queries and 300% faster overall builds. [00:00:53] And they did a wonderful job handling the most impolite questions I could think of, including whether it Gatsby Cloud is a Netlify clone or the Gatsby should just be a data layer on top of Next.js and how they're dealing with TMA too many acronyms in web development. This conversation should be viewed together with my past discussions, with Sunil Pai and Misko Hevery in considering the cutting-edge of web development today. Online discussions often present a binary split in that your technical choices either have to optimize for developer experience or user experience. [00:01:25] But I find that it is builders like Abhi and Ward and Misko and Sunil who are constantly trying to improve the experience of developers in building great user experiences by default. I hope you enjoy these long form conversations I'm trying to produce with amazing developers. I still don't have a name for it. [00:01:41] And I still don't know what the plan is. I just know that I really enjoy it. And the feedback from you guys have been really great. So if you like this, share with a friend, if you have other requests for guests, tag them on social media, I basically like to make this a space where passionate builders and doers can talk about their craft and where things are going. [00:01:58] So here's the interview. [00:01:59] Call Start [00:01:59] Abhi Aiyer: I'm Abhi Aiyer. I'm a principal engineer at Gatsby. Thanks for having us. [00:02:05] Ward Peeters: My name is Ward Peeters. I'm a staff software engineer at Gatsby and I'm from Belgium. And I've been working mostly on the open source side. [00:02:15] Abhi Aiyer: I forgot to say where I'm from. I'm from Los Angeles, you know, Hollywood, [00:02:21] swyx: I'm actually heading down to LA, [00:02:22] Abhi Aiyer: in a couple of weeks, there's, [00:02:24] swyx: I'm going to Kubecon, which is like a very interesting thing for a front end engineer to end up at. But that's where my career has taken me. [00:02:34] So this conversation started because I had a chat with Sunil, on this podcast that I accidentally launched. I don't think we did Gatsby much, a good favor. [00:02:45] Like we both saw the new updates and I didn't get to say the nice things that I thought about Gatsby. I should also say that I used to have my blog on Gatsby and I no longer do. I used to work at Netlify and I no longer do. There's a lot of history here for me with Gatsby. It's been a while since I caught up, and I'm curious to see or get the latest. [00:03:07] Gatsby v4 [00:03:07] swyx: Maybe we should start off with like a quick summary of what's new with Gatsby with Gatsby V4, right? [00:03:13] Abhi Aiyer: Is that a good place to start? Yeah, I think so. [00:03:17] swyx: So first of all, I think the marketing was really nice. Gatsby camp, it seems like a really big push and qualitatively very different from Gatsby 3. Tell me about what the behind the scenes was like. [00:03:30] Abhi Aiyer: Yeah, it was, we're getting better at the marketing side of what we're doing these days and Gatsby 4 was a big push. It really changed how we approach the framework as a whole. [00:03:43] For those who don't know, traditionally Gatsby was a static site generator, purely static. We hold ourselves high on our connections to a content management system. [00:03:55] And we provide a really good data layer there, that takes all those requests that you would normally make to a content manager system, turns them into a, like a store of data that you can then use and query from graph QL. And the big thing that we were hitting before gas before was. Company was growing. [00:04:17] And as more customers were using Gatsby cloud, we started realizing that we couldn't scale to really large sites and large sites is like a misnomer. Like you could be, you could be a 50,000 page site and be considered large given the data that you may have. But we're talking like hundreds of thousands of pages. [00:04:38] And the thing that we kind of realized is not all pages are created equal on your site. Especially the ones from like 20, 15, 20 14, where, you know, no one's looking at that people, those pieces of content, if you're a site with a huge archive of content yeah, you should probably go check Google analytics to see how, you know, how, how many people are actually viewing your pages. [00:05:02] And the way gets me. And we'll get into this a little bit later, but today Gatsby isn't as smart as it should be in what pages should be rebuilt. For example, we're looking at the gatsbyjs.com page right here, but there are other data dependencies. This pure content. Like if you look at the nav bar, there's a whole bunch of items there. [00:05:22] And we have this navbar bar on all of our pages, cause that's what a website has, but the problem with Gatsby today and will be changed in the future is. If I change anything about this nav bar, any page, that depends on the nav bar now has a dependency that needs to be invalidated. [00:05:39] And so now I have a hundred thousand pages with this navbar I have 200,000 pages of this nav bar and I spelled Gastby instead of Gatsby or something, the navbar I made a typo and now I'm paying for. A hundred thousand pages of reload to rebuild. And so we just saw that and that this happens a lot, right? [00:05:57] This is a very small example, but this happens a lot to our customers and building a hundred thousand pages is not necessarily easy thing to do. There's memory requirements that come in. There is, what kind of machine are you doing this thing on? And so we had to figure out a way to scale Gatsby and do things differently. [00:06:15] We were traditionally static and now we're trying to be somewhere in between, you can go dynamic or you could go static and it's up to you. [00:06:23] Incremental Builds [00:06:23] swyx: So the new rendering options are SSG, DSG and SSR. Is ISR gone? [00:06:32] Ward Peeters: Well, that's what Next.js has is doing. And I'm like, wait, [00:06:36] swyx: we never have guessed. [00:06:38] We had an incremental mode. [00:06:41] Abhi Aiyer: What do you [00:06:41] Ward Peeters: call it? Yes. And that's still all statically. So when we do it, we have it in open source where we in V3 we enabled it where we only build HTML what's necessary on cloud. We have a more pumped up version of it where When you get the data change, we only update that page more rapidly than in open source, but still when you change your navbar with what Abhi said, you still have to rebuild everything because all the pages get invalidated. [00:07:09] So incremental builds works for data updates, but not so much for code changes. [00:07:16] Cache Invalidation [00:07:16] swyx: Right. Okay. Well, I guess, how do you solve cache invalidation? [00:07:26] Ward Peeters: Well, the thing is that because Gatsby owns the data, like the heads of data layer and a source plugins like WordPress, when we source data and to give us a webhook or, we just go to Wordpress and say like, Hey, what has changed? [00:07:40] Data. I was like, okay, these nodes have changed. Or these pieces, like a poster page has been changed. It gets me knows which node is used where, like, for example, this post is used on this section page. It's used in this article and that's all happening already behind the scenes because graph QL shenanigans. [00:07:59] And that's how we can build incremental builds. So we know, okay. Only these spaces need to be built. And that's also where DSG comes in because as a user, you don't have to care about cache invalidation anymore. Cause it's using the same engine as you were used to with like incremental builds. [00:08:15] When you use SSG and I think that's a major benefit of it, where you as a user, don't really have to care about cache control, because it is difficult to manage on a large scale. Like a lot of corporations just say like every 10 minutes we'll remove the cache because it is difficult to get through when change. [00:08:37] Yeah. [00:08:39] swyx: That's pretty funny. At Netlify, one of the reasons that we constantly talk about for CDN level caching, like people say like, you know, why don't you just enable CDN level caching and then just have a regular server render. One of Matt Billman points that he always makes is that people always turn it off the moment there's a bug, it's like, oh, schedule, call, and turn it off. [00:09:02] And then don't turn it back on again. [00:09:03] Gatsby DSG vs Netlify DPR [00:09:03] swyx: Okay. So let's, let's talk about like, DSG. That's the fancy new one and DPR, right? So maybe we should, is there. Yeah, there's a graphic. Okay. All right. This is new. So first of all, like what was the inspiration? What's the backstory I'm always interested in how these things come about. [00:09:21] Abhi Aiyer: I think we were inspired by DPR a lot, you know? But where we saw the benefit of our approach is our data layer, you know, and it took those many steps even before getting to DSG. [00:09:35] Abandoning Redux for LMDB [00:09:35] Abhi Aiyer: So it started actually in like Gatsby 3.10. We had to redo Gatsby's node store. [00:09:42] So traditionally we were using Redux to persist all these the data that we get from content management systems. And we had a particular customer who could not even persist the cache, like a Gatsby cache between builds, because they had so much data that it would OOM when they try to persist the cache. Right. [00:10:03] So for them, they were running cold builds for every build. Even if you had like a warm cache or you had your pods, you know, we use Kubernetes. So like, if you have your pods up, you're doing like an hour and a half cold build for everything. You could like change the typo and it'd be an hour and a half. [00:10:19] And so from there we were like, We need to reduce peak memory utilization and Redux is not going to help us there. And so we started looking into alternatives. We looked at SQL Lite, we looked at Reddis and we landed on LMDB, which is, Lightning memory, mapped database manager. [00:10:39] It's like a file system DB, which is really cool for us because one, it's pretty fast. It allows you to, to have like a query interface, which is good. You can store more data than available RAM. So for a site like this customer who pretty much is blowing up this pod on every warm build. To try to even have a warm build, we could actually store their data now, which then unlocked warm builds for them. [00:11:05] So an hour and a half, that went to 25 minutes, which is pretty good for them. now we have this thing, now we call it Gatsby DB internally. And so now Gatsby is node store is in LMDB. And the cool thing about LMDB is it's just comprised of a bunch of files. You have a lock file and database files. [00:11:26] And if you have files, that means you can move files around. They don't have to be in one place, right. They could be in storage, they can be in a serverless function. They could be anywhere you, you really want. Right. And so that was step one was we needed to redo the node store. And we did that and memory utilization from a lot of customers went down. Enough to unlock a simple thing as a warm build. [00:11:50] Parallel Queries (PQR) [00:11:50] Abhi Aiyer: So then the second thing that this, these other customers were having was like, wow, it takes so long to query, to run queries. Right. And people have like 25,000, 50,000 queries. And I don't know if they should have those that much, but they do. [00:12:05] Right. They do have that much. And it's a huge part of the build time. Right. A lot of people complained that. You know, Gatsby builds are sometimes slow for large sites and we agree. That's totally true. And so our next foray into like improvement was this thing called parallel queries. Which would allow Gatsby to run chunks of queries at a given time and what PQR in his pool, a diagram of it, you know, query running does take a huge percentage of your builds. [00:12:39] But now we can parallelize that across workers in the Gatsby process. But if you were to do this naively with Redux, like a child process can't write to a JavaScript object in the main process. Right. It's hard to maintain state. There's no easy way to communicate between workers to write state and read it. [00:12:59] And so with LMDB in place, we have workers that can read and write to LMDB, which allows us to run parallel queries. Right. We don't need to do things serially, anymore. So PQR was a huge advancement for us. I think we saw up to like 40% reduction in query running time. And build times went down or we had like a goal, like I think it was like, we'd try to look for at least 20% reduction in build times. [00:13:27] And I think we hit 26%, so all cool wins, you know? [00:13:32] Gatsby DSG [00:13:32] Abhi Aiyer: And so then Ward and I, and the team were all just like thinking like, okay, we have LMDB. We've got PQR. Alright, well really we have a Gatsby data layer that can be accessed from anywhere, right? Cause if you can access it from a worker, you can access it in a serverless function cloud run, you know, on your somewhere, anywhere you spin up your own machine and your own office, if you want it well [00:13:56] swyx: steady coast. [00:13:57] How about that? Like an S3 [00:14:00] Abhi Aiyer: bucket, you put it in an S3 bucket, for sure. You know, like you could put those files there and then retrieve them from wherever you want. And so that's when we started thinking like, okay, we have this information now, what can we do to improve the, the life of our users even more. [00:14:19] And then we started thinking about DPR and like, we saw the approach and we were like, wow, this is exactly what we need, but we have Gatsby's data layer that kind of complicates things, but it's not complicated anymore because we can essentially use the data layer wherever we wants. So I'll let ward kind of go from there on like how DSG came about after these like fundamental pieces. [00:14:42] Ward Peeters: Yeah. So then we looked at like ISR DPR and like what's the difference in both of them. And then we saw like ISR that's where you have a refresh timeout and an hour with, in the latest next, you can also being an endpoint to they're getting validated cache, but it's all manual work. And there were many complaints about it's an index. [00:15:02] It's nothing in Gatsby and they complained about stale data, because what Next.js does is you visit the page and then the next time it will update. So I think it's a refresh or something. Yeah. [00:15:15] swyx: Alright. Alright. We don't have to dig through issues on, on the, on our call, but I just wanted to illustrate the problem. [00:15:24] Ward Peeters: Yeah. [00:15:24] Netlify DPR vs Gatsby DSG [00:15:24] Ward Peeters: And then that's where we took it away and then say, okay, DPR. And then I looked at the spec of DPR, like, okay. Can we use the same name or not? And the problem with DPR was they had Atomic deploys. So every change means blow the whole cache away and do everything new and we were like, what do we have incremental builds from there? We don't want to like invalidate the whole cache. We just want to invalidate the pages that got removed. And there's like a GitHub discussion about it, where I commented as well. [00:15:55] And it felt like they didn't want to change the name. Yep. There you go. [00:16:04] swyx: So you said to me, DPR, doesn't need to be opinionated about if the file is part of the atomic deploy. Can you reiterate why? [00:16:13] Ward Peeters: Yeah, the thing is basically because they mentioned like everyday glory needs to blow the cache away and needs to be fresh. [00:16:20] And for me, like it shouldn't be in a spec like DPR should just say you built pieces at build-time and you build those pieces at runtime. That's basically what I was trying to say. And then because we have incremental builds, we only want to invalidate like five pages, even if you use SSG or DSG, we still want to say if you only changed five pages for evil dates to cache for five pages, I couldn't get that from the spec. [00:16:46] I think that's also because Netlify does it their way, which is totally fine, but then that's why we created a new acronym called DPR. And I think it's also probably explains. What we offer as well, a little bit better too, because it's Deferred Static Generation. It's like lazy SSG, something like that, because that's what we do. [00:17:08] Like you can mark a page as defer and that just means we don't do it at build time, but the first time you hit a request. We rebuild it in like a Lambda, I could use Cloud Run, we build it and then we give the response to a user and then also we save it to disk. So from there on, the second request, it's technically an SSG page. [00:17:29] We store it like you have the CDN cache, but we also have it inside our bucket. Like, your S3 buckets or whatever you want to call it. [00:17:37] Abhi Aiyer: Yeah. We're caching responses, but we're also making that file exist as if it existed at build time. And that's a big distinction for us because what that allows us to do in the future would be like, if nothing changed about the data for the given page, then you don't need to DSG again. [00:17:56] Right. Like if nothing changes for, let's say like there's five builds and build a. Something changed in your data dependencies. So now you have a DSG page and then nothing changed for the next five builds, but a user comes and actually visits that page generates the files. It gets cacheed in our data layer or our files storage layer and on build five because nothing changed. [00:18:24] You're not DSGing. Right. You're not going to go through this process again. And so that's we think is the big thing about DSG. [00:18:31] Yeah. And then I think the extra piece of it is because the date, like you can say it it's a benefit or or a negative point of Gatsby, like we source all the data at the build time. [00:18:41] So even if your APIs go down, even with DSG, you still go to our local database. So debts will never go down. Cause if like your site is down, your database will be down as well, but you, you're not dependent of other API. So let's say GitHub goes down or X go down and you need to get that data. We have it locally in our database, so you're still good to go through, still keep that resilience. [00:19:06] And the security even that you, you used to have with Gatsby, and I think that's a main benefit of the whole datalayer piece of Gatsby and DSG. [00:19:17] Yeah. [00:19:18] swyx: Yeah. Perfect. [00:19:19] The End of Jamstack [00:19:19] swyx: So something I always wonder about like, is this basically the last stage of JAMstack like, I feel like we have explored all possible varieties of rendering. [00:19:30] And this is like the end. This is like, this is it right? Like we have all the options. [00:19:34] Ward Peeters: And now it's mixing them together. It's the next step having been static and on bits of your thesis, SSR. Uh, [00:19:43] swyx: okay. I'll put it this way. Do you think that JAMstack at the end of the day after this, maybe like five-year journey of like, Hey, like a WordPress sucks. [00:19:53] That's everyone moves to static. Right. And then, and then we found like, oh yeah, static. Doesn't scale, big surprise. We were telling you that from the beginning. And now okay. Right. Hybrid. Is that it, like, it was that the Jamstack movement in like a five year period? [00:20:10] Abhi Aiyer: I think it's a yes or no. Like evolution is like, I think we're, you know, we're all coming full circle and I think in engineering, particularly we do the same thing all the time, every 10 years or something. Right. But where DSG came into play is for use cases that we saw, you know, and our customers still prefer static. [00:20:31] So I know we're talking about DSG. Like it's like a great thing and it is, but a lot of our customers prefer static and it's really up to their use case. If you're a small site out of a bunch of top of funnel page, any lag in anything, right? Cause DST is not like instant, right? Like you're doing a runtime build essentially. [00:20:51] Right? So in some cases it could be, you know, it could, it could be a longer response time than what the standards should be. And we have customers that won't DSG anything because they have essentially, most pages are top of funnel or high traffic that they would rather just wait.They don't mind waiting for the performance that they would want. [00:21:11] But we also have customers that have hundreds of thousands of pages, like there's one customer that has like a company handbook or something where like, you can see every employee. And like, if they like dogs and like, you know what I'm saying? Like, Bio's and stuff. And they have a lot of employees worldwide, and there, they can only like before DSG, they can only build their site once a week. [00:21:33] Cause it takes like 24 hours to build. What, and now with DSG, they don't really care about someone who no, one's going to view their profile. No offense to that person, but no one's viewing the non CEO's profile. So then how they can, like, you know, and there are other people that are important too. I'm sure, but like now they can actually, you know, make changes to their site. [00:21:55] You know, we actually had to work with them to make sure that, you know, they can build. I mean, previous to DSG, they can build like, at some cadence that we don't necessarily support, but we help support that. So, so just looking static is still king when it makes sense. For sure. [00:22:12] Tradeoffs and Performance [00:22:12] swyx: I feel like it's a bit scary when you tell people like, okay, you're deferring the build. [00:22:16] And then on the first request, someone's going to build that. It's not going to take that long. Yeah. Right. It's not like it's that bad. I think bottom line is, I think people are very scared whenever you say, like, okay, there's a trade off, but you don't quantify the trade-offs. And then they're like, oh, it's bigger in their mind than it really is. [00:22:37] Ward Peeters: Yeah, I think a big problem with the plugin ecosystem is that it's difficult to, to quantify like what's slow and what's not slow. For example, generating an MDX page is more time-consuming because it has to like get some dependencies make sure that they have bundled together, then use react to render and then render again because it's how the Gatsby plugin, is built right now that takes more time than a simple React renderToString with something. [00:23:07] And I think that's the difficult thing to say like, okay, it's some pages will be instant. Some pages might take a second to build or we'll half a second. [00:23:18] swyx: Yeah. The important thing is that there are not data dependencies that you're waiting on. Right. That's usually the slowest part fetch all the data upfront and then you store it in a LMDB cache. [00:23:28] And that's written to a serverless function or written to I guess your build process or whatever. And then people can render that whenever which I think is great. Like, it should be fairly fast, like we're talking tens of milliseconds difference between like for first render, right? [00:23:44] Like something like that. Like I think, I think when you quantify, like, okay, we're talking tens of milliseconds, not hundreds of milliseconds and not thousands of seconds that really helps me with. Put these things in perspective. [00:23:56] Abhi Aiyer: Yeah. But then, you know, people always find a way to screw it up. So say that like, of [00:24:01] swyx: course. [00:24:01] Yeah. But, but you give a realistic benchmark and then you go like, yeah, for these benchmarks, we tested it like a hundred times or something. The median was this, the P 95 was that. That's it like, I mean, people can't really fault you for not accounting for every use case because no one, no one can, but at least you can give a reasonable basis and say like, [00:24:22] Abhi Aiyer: there's, [00:24:23] swyx: there's an up, there's an upper bound to you know, how bad, how the, the, the trade-off like, you know, when, whenever you miss channels, I like to quantify it basically. [00:24:32] Um, that's a good, that's a good idea. [00:24:34] Image Processing [00:24:34] Abhi Aiyer: And like, one thing to know for DSG is like, your data may be like available and that's cool that that may not be the long pole, but let's say you have a portfolio site that generates 20 different types of images for every image. Now you're getting into image processing at runtime, you know? [00:24:54] And so there, there are ways to kind of not do this properly. Right. And or like, for example, let's say your homepage, I love this example. Your homepage has links like to every other page on your site,and it's all DSG, right? So you load the homepage and because Gatsby does prefetch for link tags are doing Gatsby link to other pages. [00:25:17] We go and prefetch every page on your site. And essentially you're doing your build at runtime. So we're going to try to prevent these cases from happening, but just natively going through DSG everything is not my recommendation. That's for sure. [00:25:32] Not today. At least not today. [00:25:35] swyx: so a couple of things on that. So, this Gatsby image point is very interesting. So how does Gatsby image work with DSG? [00:25:42] Abhi Aiyer: So yeah it works how it does it in Gatsby build. currently today Gatsby uses Gatsby-plugin-sharp and the sharp transformers to take one image, turn it into another. [00:25:54] And even in Gatsby cloud, before we implemented parallel image processing, images were like the slowest part of the Gatsby build because a lot of time, a lot of memory, et cetera. And so we solved that problem. And so in the DSG runtime, we do image processing there for a particular page. [00:26:15] So you will have to wait for image processing. If you're image heavy on a DSG page. [00:26:21] swyx: Which I mean, does that mean that you cannot do a DSG in a serverless function? [00:26:26] Abhi Aiyer: In a total? We do. We actually do DSG in serverless. And that's totally fine. Like you can do image processing, you know? But like, I would say your mileage may vary given what kind of transformations you have going on, how many images you have, right. [00:26:42] But like you said, there's, trade-offs right. If the page makes sense for it, you know, we have a bunch of examples that do have images and they work great, you know? But I don't know if I go full on portfolio with like a, you know, like a masonry thing where like, there's like tons of images and they have sub images and you have to go, like, I'll be like a carousel of images and stuff that may not be good for your. [00:27:06] I don't know, but the choices, the users, that's, what we're trying to get at is like, we're trying to give as many options. We're going to give guidance and like we're having our own opinions, but you, you can choose to listen or not, or, you know, do your own thing and we should try to support you as much as we can. [00:27:25] Automatic DSG [00:27:25] swyx: Yeah, you give me some thought about like, having sort of like a browsers list type of API where you can say like, okay, top 100 most visited pages. No, this is not it. You know what I mean? Like, as a handholding for what should be DSG and what should be statically generated you know, plug into my Google analytics, tell me like top hundred pages statically render those, everything else, DSG. [00:27:48] I'm sure you've thought about it. And I think like maybe four years ago, Gatsby and Guess.js had someone in collaboration, which I assume went nowhere. But let me know if there's. [00:27:59] Ward Peeters: Uh, okay. [00:28:02] For now. Yeah, because there is a new way to do it because now greet guests, it stored everything in one file. So we have to like sometimes download a five megabyte Jason file to make guess.js work. Mondays switching around that you could make, get smarter to say like a guess for this route. You only need the bit of the JSON file. But we never implemented it. So, [00:28:26] Abhi Aiyer: yeah. And we have this, so I'm speaking from the Gatsby cloud perspective, but like you're right, Shawn. Like, if you can hook into Google analytics, you'll get the same thing. [00:28:36] But if you host with Gatsby cloud, we know what, what routes coming through our hosting layer. We know what routes for your site. Are the most hit, you know, we know the requests per route. I mean, how much bandwidth you're using, like per route. And so we could be smarter and tell people exactly how. How to DSG, right? How should you DSG and get it done that way, for sure. [00:29:04] swyx: Okay. So like a, to be, to be complete, uh, typical to be [00:29:08] Abhi Aiyer: complete, you know, we're still in beta forgets before, so I would say like, maybe like after we launched for, for sure, we'll start adding some sugar on. [00:29:17] swyx: Got it. So first of all I did, so this was my first time trying out Gatsby Cloud. I, I think it was behind like a signup wall, like a private beta in the past. And I never really gave it a spin, but again, you know, the V4 announcement really got me going and And yeah. I mean, I'm pretty impressed. [00:29:33] Gatsby Cloud vs Netlify [00:29:33] swyx: So how much of this, you know, the hard question, right? How much of this is a Netlify clone, what are you doing differently? [00:29:40] Abhi Aiyer: Let's talking about that. How much does like DSG is [00:29:45] swyx: how much of Gatsby Cloud? Isn't it [00:29:48] Abhi Aiyer: like? 0%. Ooh, okay. Yeah. Probably 0% of it is a Netlify clone. [00:29:56] swyx: I do like when you provision it, it gives me like a really good set of options. Uh, let's see, uh, you know, connect CMS guests. Netlify does not have that. [00:30:07] Abhi Aiyer: Yeah. I mean, I would, yeah. We're far from an elephant clone Mo multiple weeks. We've built our whole system based on the needs of Gatsby. The way our cloud front end and our back ends talk to our customers, Gatsby Sites is a novel way of doing it. We've exposed that in open source and I think Netlify actually did implement something for external jobs or something with Google pub sub I, I saw that, but everything we do in Gatsby cloud is for Gatsby. We have no other framework that we need to maintain nor care about, sorry. Luke's or whatever. Like we don't care about that. On Gatsby cloud, we've optimized our hosting layer with Fastly to be part of the data. And so if Gatsby changes, Gatsby cloud changes, and if we need to get to be framework to change, it will for Gatsby cloud. So, and we use Google cloud, so we're not on AWS. [00:31:09] I would say we have the similar features though, and that's a valid point to bring out. [00:31:13] We have, we have functions, right. [00:31:15] We have domains and we don't have a purchasing domains or anything yet, but you know, we have the whole hosting product and everything like that. Yeah. [00:31:27] swyx: Is that, is that what you would need for Gatsby Cloud to come out of beta? Like. Domains or like what, what, what are you waiting [00:31:35] Abhi Aiyer: for essentially? Well, Gatsby cloud isn't in beta. [00:31:38] It's like a [00:31:38] Oh Gatsby v4 [00:31:40] swyx: is in beta [00:31:41] Abhi Aiyer: yeah. V4 it's in beta. Yeah. Sorry. Yeah. Yeah, domain like domain registry and all that stuff is more sugar on top that we'll be probably releasing mid next year. But we're just trying to be I mean, Gatsby cloud, from that perspective, we just want to be at the table with all the other JAMstack providers. [00:31:59] But our edge is if you want to build a Gatsby site the best way, you know, you have our support team, that'll help you. Right. As a customer of ours, you're like our family. The Gatsby family, you know, we're, we'll help. We help our customers. We have great support and everything we do on the platform is for Gatsby and making Gatsby better. [00:32:18] So there's like so many things in the framework that we've improved by having Gatsby cloud. Cause we didn't know all the sites that could exist and not do things nicely or have problems or, you know, because of Gatsby cloud that the framework is getting so much better because we have real users feedback and they have a lot of demands and we like to, you know, fulfill them. Yeah. [00:32:41] swyx: Okay. Actually I should probably clarify this earlier. How much of what we just talked about is Gatsby Cloud-only? [00:32:48] Abhi Aiyer: Pretty much all of it, DSG, SSR, they're all capable, you know, you can run it locally and stuff. And I know Netlify has a Gatsby plugin as well that will allow you to run DSG and SSR as well. [00:33:03] For those who are not using those platforms, it's like maybe you're using Amplify or whatever. You're going to have to implement this yourself. I don't recommend it though, because it was a pain in the ass to put it together. But yeah, it should work the best on Gatsby cloud. [00:33:19] Ward Peeters: So technically all of that we building with v4 is in open source. [00:33:22] So you could wire it up all yourself, but why bother if you can use, like Gatsby Cloud. Yeah, you don't have to care about it. [00:33:34] Gatsby vs Next.js [00:33:34] swyx: That's true. Okay. So, just on the rendering side of things, right? I made this observation that, Gatsby now has SSR, now has serverless rendering. All the different rendering modes, like this looks very similar to next JS. [00:33:48] Is it possible to basically say like, okay, Gatsby is the data layer and is this the best data layer and most advanced or whatever, because this is basically what Next.js does, right? Like it's a very, very constrained rendering layer. Why can't you, I mean, you know, sunk costs aside. Why can't you be a next JS layer? [00:34:08] Ward Peeters: Well, technically we could now, because they like implemented everything too, like they have SSG, they have ISR, they have SSR and we could technically move the data layer out of, and use it with next. That could be a possibility, but. We've been, we've come so far and I think do already have built this. [00:34:31] And then now they're also parity. I think having two separate ones and having different dev experience, and maybe Next.js is winning now and Gatsby will a win in, in two months or vice versa. I think it's just a healthy balance. Like it's and I think it's the same thing as a browser wars, like everyone is going to Chrome or chromium and then there is still like, Firefox and iOS, but how long will they survive? [00:34:58] And I think just the competition is what you need. And I think that's why a good reason why we keep separate. And also, I don't think that Next.js is for like, merging with Gatsby or like having the like the same. [00:35:13] swyx: Oh, I think I know Next.js, it be super happy about it, because then they, when they, when the server for reacts you know, role, and then you focus on the data role, right? [00:35:22] Like, uh, Makes sense to me, obviously I'm brushing over a lot of the plugins actually have a rendering portion as well. So how much can you separate those things [00:35:33] Abhi Aiyer: if in the next. No, this is possible. I don't, I mean, we're not going to like say that it's happening or anything. [00:35:41] Gatsby and the Content Mesh [00:35:41] Abhi Aiyer: Like if we look at Gatsby's like, this is how it's set up. [00:35:45] It's, it's what we call the content mesh. You have all these different data warehouses that exist. WordPress Drupal, et cetera, can even be a freaking Google Sheets. You know, like whatever, and we assemble this data layer at build time. And in doing DSG and SSR, we build something called the query engine that allows you to query this LMD B store that has like the manifested data in there. [00:36:13] So. It really opens up the gate for yeah. If you want to use our data layer in a Next.js app, like, I mean, go ahead. Like once we expose this API to our customers then you can essentially have Gatsby data in an iOS app or an Android app react native. Like, it's just an API call at that point. And you know, Gatsby cloud hosts, like a graphical API for you that you can just query your data. [00:36:38] I don't know if any data scientists would care for that. They could add that into Looker or something. You know, like I remember they want to do it like that stuff would be available and it's almost like a content data lake versus, you know, traditional data lake I guess. It's purely for content and you would have the benefits of Gatsby because we normalize and we create structures and you like, the user can customize a schema, however you want. [00:37:05] And then now you can use it on multiple platforms, right? It's not an immediate goal for us to do so. It's a logical next step. Yeah. Yeah. [00:37:15] swyx: Awesome. Awesome. Cool. Yeah, I, I feel like that's a really good and in depth coverage. [00:37:19] React 18 and Gatsby [00:37:19] swyx: Maybe let's end off with talking about the future of React 18 and your plans there. First of all, what's happening in react 18. Is it out? Like the plan for the react 18 and published in June? Okay. All right. Let's talk about it. What's what's going on? [00:37:35] Ward Peeters: So, yeah, so we are working closely with the React team and we also in the working group to figure out like, okay, how can we help the team, make it more stable and give it in user hands. [00:37:46] So I think from may or something, we have introduced React 18 as part of Gatsby. So you can now install React 18 alpha. And we just moved to the new rendering mode. So the async mode suspense and all those things were. Like what, what we're planning on, at least when you use Gatsby, like we have page queries and we have static queries and there's a big pain point is static queries, cause it's a graph QL query, but you cannot have any variables, which means you're kind of limited to the unit. And then you have to move everything to page queries going to have to know all the content up front and wait the new async rendering bits of React to get into like a useQuery, because you can yield the rendering of React at any time. [00:38:34] Cause async doesn't mean you have to go like, uh, use Apollo Server to get server data tree or something or other pieces, or you kind of have two have React async mode or React Suspense in SSR and we can all move it to the page components or the components of your reactor. So basically look that you're just recreating an react application and then every async bit like using react-fetch or a useQuery, it all just works. [00:39:02] I think that's where, where we activate in benefits a lot where it's. It just removes a lot of cruft or that you have to do now. It gets you where you have to be in the Gatsby mindset when you're developing and, and you basically go to a, creating a react app and you have a data layer, but I think React 18 opens so many doors with the new cache APIs. It just becomes way smarter and when you look at it from a performance perspective with the whole concurrent mode where inputs gets priority over rendering, it's just going to be way smoother than what they had so far. [00:39:39] Abhi Aiyer: And hopefully people stop complaining about lighthouse scores and stuff. That'll be great. [00:39:45] Custom rendering page fragments with React 18 [00:39:45] Abhi Aiyer: Another cool thing that React 18 kind of unlocked for Gatsby in particular is a concept of fragments. And so we were talking about that nav bar example earlier with the a hundred thousand pages. And we want to leverage react 18 with like custom renderers so that we can essentially create fragments of a page that had beta dependent. [00:40:07] Because there's no page query or static query anymore. That's just a query. Your navbar component has a query and essentially Gatsby can make that nap bar a navbar fragment and your body has a fragment, or maybe your footer has a fragment. Your sidebar has a fragment. And as data changes incrementally, we only rebuild fragments and our hosting layer, stitches, fragments together. This is an old concept called ESI includes like if everyone did PHP back in the day, like, you know, very familiar with this stuff, like I said, every 10 years, things has come back around and we're going to try to do that. We're going to try to build fragments of pages, stitch them together. So a navbar change doesn't break the bank, you know? But we can only do that once react 18. It's like, you know, fully there. I mean, we could do it now, but like why, when we should just like work off the, the, the work of others. [00:41:02] swyx: So when you say fragments, are you referring to GraphQL Fragments or, or like [00:41:06] Abhi Aiyer: Asian fragment might be a, maybe we call it like, you know, today, like an HTML page that has specific. [00:41:13] You know, I like to call him like the rectangles that we all draw around are our websites. Right. They all have independent data isolation. Right. And so these are like what maybe a Gatsby slice of a page or a fragment or some type of include, you know, like in the templating days. Right. And that's what I kind of mean there. [00:41:31] So these includes or templates or whatever you want to call them would be independently built. And then independently stitched at the cache layer. And then, you know, the data dependencies don't cross, and now I'm not building a hundred thousand pages because I misspelled Gasby and it should've been, you know, [00:41:51] swyx: sounds like it happens a lot, [00:41:54] Abhi Aiyer: but definitely those, [00:41:56] Ward Peeters: and it looks a lot like donut caching. [00:41:58] If you're more familiar with that piece, like you have a page where I said parks has a different. Limit and another one. So that's more or less the technical piece out of [00:42:10] Server Components in Limbo [00:42:10] swyx: a server components. Anything on any implications on that forgets me? [00:42:15] Ward Peeters: Not yet. I would say because they're not going to ship it with react 18. [00:42:19] We've been talking about it, but it's still very fresh or very new, like even the React team hasn't, hasn't worked more on it, so they did their demo, but then it's got like a little bit [00:42:31] swyx: stagnated. Oh my God. [00:42:37] Ward Peeters: All the pieces. Like they need to build all the pieces underneath it to make it work. [00:42:45] swyx: They jumped, they jumped the gun, maybe in announcing I got so excited. I was like, wow. Okay. I can cut my Javascript bundle by 40% and run backend functions in my react component. And then nothing, nothing for 10 months, [00:43:01] Ward Peeters: because we are super excited about it too. Because when you look at especially marketing sites, like marketing pages or blogs, there's only a small piece of JavaScript that you actually need. [00:43:13] Like maybe you need a bit for your newsletter button or you like something like that. And why. 200 kilobytes of JavaScript could bring technically only need maybe 10, 20 kilobytes. So I think it's static or with like marketing pages. Uh, [00:43:33] Smart Servers vs Smart Clients [00:43:33] Abhi Aiyer: yeah, so the world was server rendered. Then we went client side rendered. Then we went static rendered. Now we're DSG rendered, and then we're going to go back to server run. So, you know, time just keeps spinning. Partially server. [00:43:47] swyx: I called it smart server versus smart clients is my term for it. So this is the, I think maybe my, my most recent posts, because I have been trying to write more, but then I keep have having real life get in the way. [00:44:01] But why is traditional, which is server rendered, different from the new server rendered. We have essentially is essentially exactly the same, but there's a thin runtime, which I'll ship the stuff that we send over the wires changes. And we actually doing rendering in the browser, but like partial rendering, maybe I should say. [00:44:20] And yeah. I dunno. I think, I think this is a very interesting exploration. Phoenix live view is also the other one that, that gets a lot of love for this. And then rails is also adopting Hotwire. So, I don't know where this goes. I mean, I, I it's, it seems like we fully explored the smart client space and the smart server revolution is just kind of get, getting going. [00:44:41] Ward Peeters: We're going back to Meteor. [00:44:44] swyx: Back to meteor, but not so opinionated, I think, you know, I was very excited about meteor. Like when I, when I first started as a web dev, I was like, oh yeah. Okay. Everything is in there. I actually mentioned Meteor here because it had the mini Mongo data store, which was I thought it was just such a great experience. [00:44:59] Did you use. [00:45:02] Abhi Aiyer: Oh, both my last company, we used meteor for our backend, and then we had to kind of migrate slowly off of it. Cause they were just ahead of their time. You know, now all those concepts. Those are like, those are the concepts of today. Right. And that's the beautiful thing they were [00:45:19] swyx: just ahead of their time. [00:45:21] Apollo and Open Source Startup Strategy [00:45:21] swyx: I mean, you know, what they did was they became Apollo. They were just like, oh no, one's no, one's handling all the hard parts of GraphQL. Well, [00:45:29] Abhi Aiyer: okay. We'll do it. Yeah, good job of that too, [00:45:33] swyx: which is by the way, like in terms of just honestly, I'm interested in startups, entrepreneurship, uh, you know, we worked so hard in web dev stuff. [00:45:41] A lot of this, we never charge a cent for and something I would like to make money on the smart things that we do in tech. [00:45:47] Taking an under specified spec, which most of the times is intentionally under specified, and then building all the hard parts around it, is a very interesting formula for success. [00:45:58] So essentially React and under specified framework and Next.js came in and went like, oh, okay, well, we'll build the get initial props that you guys forgot. And great, very successful Gatsby, same thing. And then Apollo and Relay by the way, but, but relay was not a serious company, a company effort. [00:46:19] I mean, Relay is a serious effort. It's not a startup that was like existentially relying on like, uh unsuccess. Whereas was Apollo was like, okay, GraphQL was under specified. There's a reference JS implementation, but no one's building the production quality standard. We'll do it. And then, and yeah, like it's really interesting. Cause as the spec grows or as adoption of the thing grows, you're you grow with it and, you serve the audience and you also capture a lot of the value and you essentially have Facebook working for you in the sense of like, oh, there's the spec maintainers, you know, whatever, whatever the spec is, they're working for you because every time they contribute to the spec, you. [00:47:06] TMA: Too Many Acronyms [00:47:06] Abhi Aiyer: Yeah, maybe that's what the what's going to happen with DPR. Right? [00:47:10] swyx: The naming socks, too many, three letter acronyms. I'm sure. Like, look like you and I, and everyone in like the WebDev, like Twitter sphere or whatever, we don't mind new things and like understanding the differences in nuances, but anyone who is like just a regular web dev or just like not web dev, but talking to web devs, they think we're crazy. [00:47:36] This is actually bad. Like it, we look like the nerds, uh, who. Talking about all these minor differences and inventing new acronyms for them. I don't know how to fix it. Jargon is important for specialists to understand in a very short amount of time, the differences between what we referring to. Jargon is important, but we don't do ourselves, our industry a favor when we have all these acronyms and then people just throw them on onto a page or a blogpost or a slide deck. [00:48:05] And then. People would just go like, okay. Yeah, the JS ecosystem [00:48:09] Abhi Aiyer: is crazy. And you ended up explaining the same thing all the time. Right? Cause you use some acronym. It was funny, like on the way to Gatsby camp, like we had, like all of our release had all of the releases and gas before had the acronym. Yeah, like PQR parallel query, running DSE, SSR, SSG, man. [00:48:26] We were like trying to figure it out. How many more acronyms can we fit to, to get like the, the acronym count up, but it's a serious problem for us too, because our, some of our customers have never used Gatsby before they're coming from a WordPress full on WordPress background and our sales team marketing, we all need to be able to convey like, yeah, this is what it really is. [00:48:45] And this is what it means. And maybe. The acronym sticks after they understand it, but that's a really uphill battle to explain right on the way. So I would love if a community we all got together and like, kind of just understood it. You know, it's kind of like the GraphQL spec have a formal definition for what this is. [00:49:02] Don't be too heavy handed on approach, let people implement however they want to. And then there's just a concept that has different flavors. Yeah. Oh, it's different [00:49:14] swyx: flavors. Okay. That'd be interesting. [00:49:16] Gatsby for Docs [00:49:16] swyx: Is there anything else that we haven't covered that you wanted to shout out? [00:49:21] Abhi Aiyer: This is fun. I really enjoyed talking to you too. [00:49:24] swyx: Yeah, I love, uh, I love catching up. Um, uh, Fun fact, we're actually at my workplace. We use Docusaurus right now for our docs. We're actually considering moving to Gatsby. [00:49:35] Nice. Not something I thought I would do this year, but we're, we're running into enough limitations to Docusaurus that we're essentially customizing so much that we don't get much benefit anymore. So maybe a good standard docs implementation. It would be interesting for you guys actually, because a lot of the reason that people pick Docusaurus is basically it has docs in the name and it's got a lot of good defaults for docs, right? [00:50:04] And Gatsby, maybe it doesn't have such a developed theme for docs. [00:50:07] Ward Peeters: We've mostly pushed people to the Apollo team. Like they have a great, like the whole Apolo site is, or docs site is built with Gatsby and a open source. The building blocks up there. So, or you could start from there and then, oh [00:50:20] Abhi Aiyer: yeah. [00:50:23] New Relic is with Gatsby and they're working on something similar too. [00:50:30] swyx: Awesome. Awesome. Yeah. All right. Cool. Well thanks for those pointers. I'm actually going to go explore them. [00:50:38] Abhi Aiyer: Yeah. If you need any help. Yeah, we'll do. [00:50:41] swyx: And there's no reason why we shouldn't move to Gatsby cloud, if that makes sense for us as well. Okay. Okay. [00:50:47] Ward and Abhi,thanks so much, and this is really great chatting, thanks for reaching out. And, yeah, I hope [00:50:52] Abhi Aiyer: people would try out Gatsby. [00:50:54] Thanks for having us.
In today's episode of the Angular Experience, we have a unique conversation with Misko Hevery about his journey into tech. Misko shares his first experiences with programming to his time at college, on to his first jobs in the tech industry and how that led to working at Google where he eventually became the Father of Angular and beyond.LINKS:https://www.builder.io/https://dev.to/mhevery/a-first-look-at-qwik-the-html-first-framework-afhttp://misko.hevery.com/CONNECT WITH US:Misko Hevery @mheveryBrooke Avery @JediBraveryErik Slack @erik_slack
This podcast involves two live demos, you can catch up on the YouTube verison here: https://youtu.be/T3K_DrgLPXMLinks Builder.io https://www.builder.io/ PartyTown https://github.com/BuilderIO/partytown Qwik https://github.com/builderio/qwik https://dev.to/mhevery/a-first-look-at-qwik-the-html-first-framework-af Timestamps [00:01:53] Misko Intro [00:03:50] Builder.io [00:08:31] PartyTown [00:11:41] Web Workers vs Service Workers vs Atomics [00:15:02] PartyTown Demo [00:21:46] Qwik and Resumable vs Replayable Frameworks [00:25:40] Qwik vs React - the curse of Closures [00:27:32] Qwik Demo [00:42:40] Qwik Compiler Optimizations [00:53:00] Qwik Questions [01:00:05] Qwik vs Islands Architecture [01:02:59] Qwik Event Pooling [01:05:57] Qwik Conclusions [01:13:40] Qwik vs Angular Ivy [01:16:58] TED Talk: Metabolic Health Transcript [00:00:00] Misko Hevery: So the thing that I've learned from Angular.js days is make it really palatable, right. And solve a problem that nobody else has. Doing yet another framework in this state of our world would be complete suicide cause like it's just a different syntax for the same thing, right? So you need to be solving a problem that the other ones cannot solve. [00:00:22] swyx: The following is my conversation with Misko Hevery, former creator of Angular.js, and now CTO of Builder.io and creator of the Qwik framework. I often find that people with this level of seniority and accomplishment become jaded and imagine themselves above getting their hands dirty in code. [00:00:39] Misko is the furthest you could possibly get, having left Google and immediately starting work on the biggest problem he sees with the state of web development today, which is that most apps or most sites don't get a hundred out of a hundred on their lighthouse scores. We talked about how Builder.io gives users far more flexibility than any other headless CMS and then we go into the two main ways that Misko wants to change web performance forever: offloading third-party scripts with PartyTown, and then creating a resumable framework with Qwik. Finally, we close off with a Ted Talk from Mishko on metabolic health. Overall I'm incredibly inspired by Misko's mission, where he wants to see a world with lighter websites and lighter bodies. [00:01:23] I hope you enjoy these long form conversations. I'm trying to produce with amazing developers. I don't have a name for it, and I don't know what the plan is. I just know that I really enjoy it. And the feedback has been really great. I'm still figuring out the production process and trying to balance it with my other commitments so any tips are welcome. If you liked this, share it with a friend. If you have requests for other guests, pack them on social media. I'd like to basically make this a space where passionate builders and doers can talk about their craft and where things are going. So here's the interview. [00:01:53] Misko Intro [00:01:53] swyx: Basically I try to start cold, [00:01:55] assuming that people already know who you are. Essentially you and I met at Zadar and, I've heard of you for the longest time. I've heard you on a couple of podcasts, but I haven't been in the Angular world. And now you're no longer in the Angular world. [00:02:11] Misko Hevery: The child has graduated out of college. It's at a time. [00:02:15] swyx: My favorite discovery about you actually is that you have non-stop dad jokes. Um, we were walking home from like one of the dinners and that you're just like going, oh, that's amazing. [00:02:27] Yes. Yeah. [00:02:28] Misko Hevery: Yes. Um, most people cringe. I find it that it helps break that. It does and you know, the Dad jokes, so they're completely innocent. So you don't have to worry. I also have a good collection of, uh, computer jokes that only computer programmers get. [00:02:47] swyx: Okay. Hit me with one. [00:02:48] Misko Hevery: Um, "How do you measure functions?" [00:02:51] swyx: How do I measure functions? And the boring answer is arity, [00:02:55] Misko Hevery: and that's a good one! "In Para-Meters." Uh, [00:03:03] swyx: yeah. So for anyone listening like our entire journey back was like that it just like the whole group just groaning. No, that's really good. Okay. Well, it's really good to connect. I'm interested in what you're doing at Builder. You left Google to be CTO of Builder. I assumed that I knew what it was, from the name, it actually is a headless CMS and we can talk about that because I used to work at Netlify and we used to be very good friends with all the headless CMSes. And then we can talk about Qwik. How's that ? [00:03:34] Misko Hevery: I can jump into that. Sorry. My voice is a little raspy. I just got over a regular cold, like the regular cold ceilings [00:03:42] swyx: conference call, right. I dunno, I, I had it for a week and I only just got over it. [00:03:46] Misko Hevery: It was from the conference. Maybe it wasn't from the other trip I made anyways. [00:03:50] Builder.io [00:03:50] Misko Hevery: So let's talk about Builder. So Builder is what we call a headless visual CMS. Uh, I did not know any of that stuff. Would've meant. So I'm going to break it down because I assume that the audience might not know either. [00:04:01] So CMS means it's a content management system. What it means is that non-developers, uh, like typically a marketing department think like Gap. Gap needs to update .... If you're showing stuff on the screen, you can go to Everlane. Everlane is one of our customers. Okay. And so in Everlane case, the marketing department wants to change the content all the time. [00:04:22] Right? They want to change the sales, what things are on the top, what product that they want to feature, et cetera. And, um, this is typically done through a content management system. And the way this is typically done is that it's like a glorified spreadsheet where the engineering department makes a content. [00:04:39] And then it gives essentially key value pairs to the marketing. So the marketing person can change the text, maybe the image, but if the developer didn't think that the marketing person might want to change the color or font size, then there is no hook for it, and the marketing person can't do that. [00:04:54] Certainly marketing person won't be able to add new columns, decide that this is better shown in three columns versus two column mode or show a button or add additional text. None of that stuff is really possible in traditional content management systems. So, this is where the visual part comes in. So Builder.io is fully visual, right? [00:05:13] Drag and drop. You can add it, whatever you want in the page. And the last bit is headless, meaning that it's running on the customer's infrastructure and we don't host the website. If you are, if we are hosted CMS, then it's relatively easy to make a drag and drop editor. [00:05:28] But because we don't host it, it's not on our infrastructure. It's actually quite a head-scratcher. And the way we do this, which I think is pretty cool, is, we have this open source technology called Mitosis, which allows us to give one input to Mitosis and it can produced any output in terms of like, whether you use Angular, React, Vue, Svelte, Solid, it doesn't matter what you use on the backend. [00:05:50] We will generate a component for you. And because we're generating an actual component, it drops into the customer's backend infrastructure, right. And everything just works there. Server-side rendering works. Everything that, that the customer might have on a backend, it just worked because it's a full-on regular component, whether it's Angular, React, or whatever the company might use. [00:06:13] So that's the unique bit that nobody knows how to do. And it's also the bit that attracted me to Builder.io and joining them. And the reason for that is because it is really easy for them to create new technology. So one of the things we're going to talk about later is this thing called Qwik. [00:06:30] What's super easy with Builder.io is that they can easily produce new output. So if you have a customer that already has their content, let's say on react or Angular, and they decided they want to move over to something different, like Qwik, and I will talk about why that might be a reason, it is super easy because with a push of a button, because we generate the content, we can generate the components in a different framework. [00:06:55] swyx: Got it. It's interesting. Have you seen Tailwind? [00:06:57] Misko Hevery: So Tailwind is more of a CSS framework with my understanding is correct for [00:07:01] swyx: building, but they had to build something for doing this essentially like having different outputs, uh, we have one central template format that outputs all these different [00:07:11] Misko Hevery: things. [00:07:12] So this is what Mitosis would do. Right. But Mitosis can do this across all of them, not just Vue and React, right? Every single one. Like, I don't even know what the list is, but there's a huge list of possible outputs that uh, Mitosis [00:07:25] swyx: can do. Yeah. You have, Liquid and JSON. [00:07:30] Misko Hevery: There's more, I mean, this for ones that you see over here. [00:07:33] Yeah. You can see pretty much everything's analyst here. We can import from Figma, given some constraints. Cause it's not a one-to-one thing kind of a thing, but we can import from Figma. So the idea is that people can design their site in Figma provided that they follow a certain set of guidelines. [00:07:49] We can actually import them and to turn it into HTML and then serve it up, whether it's React or whatever. One of the things is that's actually important. For example, for us is Liquid, right? Liquid is a templating system on Shopify. But it's a server side templating system and it cannot be done on the client side. [00:08:05] So if you pre-render on Liquid, how do you get a component to bind to it on the client? Because you would need to have the same component. Right? One of the things we can do is we can present it on a liquid and then produce an, a equivalent react component on the client and they automatically bind to it on a client. [00:08:21] Right. So we can do these kinds of tricks which are normally quite difficult. [00:08:25] swyx: So you went from building one framework to building all the frameworks. [00:08:29] Misko Hevery: You can think of it that way. [00:08:31] PartyTown [00:08:31] Misko Hevery: But my real thing, the real passion is that I want to get all sides to be 100/100. Yeah. Okay. Uh, on mobile, not on this stop, you know, a lot of people claim on desktop that they can do 100 out of a hundred mobile, that's the bar. [00:08:46] So I want to figure out how to do this. And in order to do that, you really have to get super, super good at rendering these things. And it turns out that if you just make a blank page and blank, white page with nothing on it, and you add a Google tag manager, that alone puts you essentially on the cusp of a hundred, out of a hundred on mobile. [00:09:08] So that alone, that, that act alone, right, he's kind of uses up all your time that you have for rendering. And so the question becomes like, how do we make this as fast as possible? So you can get a hundred out of a hundred on mobile. And it's very little processing time that you get to have and still get to have a hundred. [00:09:25] And so we do two things. One is be introducing a new framework called Qwik. little later. But the other thing we're talking about is introducing this thing called PartyTown okay. And I absolutely love PartyTown. So the person behind PartyTown is Adam Bradley, who you might know him from, making the Ionic framework. [00:09:43] The guy is absolutely genius. And this is a perfect example of the cleverness of it. All right? So you have, something like a Google tag manager that you want to install on your website. And that thing alone is going to eat up all of your CPU time. So you really would like to put it on a WebWorker, but the problem is you can't because the WebWorker doesn't have DOM API. [00:10:02] It doesn't have a URL bar. It doesn't have just about everything that the Google tag manager wants to do. Right? Google tag manager wants to insert a tracking pixel on your screen. It wants to register a listener to the, to the, uh, URL changes. It wants to set up listeners for your mouse movements, for the clicks, all kinds of stuff. [00:10:21] So running it on a Web Worker becomes a problem. And so the clever bit of geniuses that Adam came up with is that, well, what you really want is you want to proxy the APIs on the main thread into the web worker thread, and you can proxy them through, you know, we have these, these objects called proxies. [00:10:39] The problem is that the code on a Web Worker expects everything to be synchronous. And our communication channel between the main thread and the web worker thread is async. And so the question becomes like, well, how do you solve this particular problem? And it turns out there is a solution to this problem. [00:10:56] And the solution is that you can make a XML HTTP request, which is synchronous, on a Web worker. And then you can intercept that the request using a service worker and then service worker can talk to the main thread. Figure out what exactly did you want to do? So for example, let's say you want to set up a, uh, you want to know the bounding rectangles of some div, the Web Worker thread can make that request, encode that request inside of a XML HTTP request, which goes to the service worker. Service worker calls the main thread, the main thread figures out what the rectangle boxes, and then sends the information back to the web worker thread, which then doesn't notice anything special. As far as it's concerned, it's just executing stuff, synchronously. It's like, you're laughing, right? Because this is hilarious. [00:11:41] Web Workers vs Service Workers vs Atomics [00:11:41] swyx: So I'm one of those. Okay. You're, you're a little bit ahead of me now. I'm one of those people I've never used web workers or service workers. Right. Um, can we talk a little about, a little bit about the difference and like, are they supposed to be used like that? Like, [00:11:54] Misko Hevery: uh, so we did these two because they are supported under the most browsers. [00:11:59] There's a different way of making synchronous call and that is through something called Atomics, but Atomics is not available on all browsers yet. [00:12:07] So web worker is basically just another thread that you have in the browser. [00:12:12] However, that thread doesn't have access to the DOM. So all DOM APIs are kind of gone from there. So you can do a lot of CPU intensive things over there, but, , with limited abilities and this is what PartyTown solves is it proxies all of the API from the main thread into the Web Worker thread. Yeah. [00:12:32] Now service worker is kind of a safe thing, but the difference is that a service worker can watch HTTP requests go by and it can intercept them. And so think of it as almost like a mini web server in your browser. And so what the service worker does over here is intercepts the request that the web worker makes, because that's the only way we know how to make it blocking call. [00:12:56] swyx: Uh, this is the one that we use for caching and Create React App and stuff like that. [00:13:00] Misko Hevery: Yeah. And then, because we can make a blocking call out of a web worker, the service worker who can use the blockiness of it to make an asynchronous call to the main thread and get all the information that you need. [00:13:12] swyx: that's pretty smart. Is there any relation to, uh, I know that I think either Jason Miller or Surma did a worker library that was supposed to make it easier to integrate, um, are you aware of, I think [00:13:25] Misko Hevery: all of these worker rivalries are in heart they're asynchronous, right. And that's what prevents us from using it, right. [00:13:31] Because the code as written assumes full asynchronicity, and that is the bit that's. Different. Right. That's the thing that allows us to take code as is, and just execute it in a, Web Worker. And so by doing that, we can take all of these expensive APIs, whether it's, Google tag manager, Analytics, Service Hub, I think that mispronouncing it, I think, all of these libraries can now go to the main thread and they have zero impact on your Google page speed score. And we actually talked to Chrome and we said like, Hey, we can do this. Do you think this is cheating? Right? Like, do you think that somehow we're just gaming the system and the message was no, no, because this actually makes the experience better for the user, right? [00:14:17] Like the user will come to the website. And because now the main thread is the thing that is running faster and none of this stuff is blocking. You actually have a better experience for the user. The other thing we can do is we can actually throttle how fast the Web Worker will run because when the Web Worker makes a request back to the main thread to say, like, I want the bounding box, or I'm going to set up a tracking pixel or anything like that, we don't have to process it immediately. [00:14:43] We can just say, well, process this at the next idle time. And so the end result is that you get a really high priority for the main thread and then the analytics loads when there's nothing else to do. Which is exactly what you want, right? You want these secondary things to load at a low priority and only be done when there's nothing else to do on the main thread. [00:15:02] PartyTown Demo [00:15:02] swyx: That's amazing. Okay. All right. We have some demos here if we want to [00:15:05] Misko Hevery: So if you, let's pick out the simple one, the element, right. And what you see in the console log is this is just a simple test, which performs, uh, synchronous operations. But what you see on the console log is that all of these operations are intercepted by the service worker. [00:15:22] Right. And we can see what particular API on the web worker is trying to do and what the result is, what the return code is, you know, how do we respond and so on and so forth. And so through this,you can kind of observe what your third party code does. By the way. The nice thing about this is also that, because you can observe, you can see is ECP. [00:15:43] If you're a third-party code, because we essentially trust them, right. Fully trust this third party code on your website and who knows what this third party code is doing. Right? So with this, you can see it and you can sandbox it and you can, for example, say like, yeah, I know you're trying to read the cookie, but I'm not going to let you, I'm just going to return an empty cookie because I don't think it's your business to do that. [00:16:04] You know, or any of those things we can do. So you can create a security sandbox around your third party code. That is kind of, as of right now is just implicitly trusted and you can, you have a better control over it. [00:16:18] swyx: I could filter for it, I'm basically, I need HTTP calls and then I need any cookies. [00:16:23] Right. So, [00:16:25] Misko Hevery: yeah. So in this case, there will be nothing because this is just showing off element API, but I think you go to previous page [00:16:33] swyx: Before we go there. is there anything significant and? It says startup 254 milliseconds? [00:16:38] Misko Hevery: Yeah. So the thing to understand is that it is slower, right? We are making the Google tag manager slower to start up. [00:16:46] Right. So it's definitely not going to be as fast as if it was on a main thread, but it's a, trade-off, we're doing intention. To say like, Hey, we want to give the CPU time to a user so that the user has a better experience rather than eagerly try to load analytics at the very, very beginning and then ruining it for the user. [00:17:04] So while in theory, you could run a react application and the web worker, I wouldn't be recommended because it will be running significantly slower. Okay. Um, because you know, all of these HTP requests, all these calls across the boundary, uh, would slow down. So it is a trade-off. [00:17:23] swyx: So this is really for the kind of people who are working on, sites that are, have a lot of third-party scripts for, [00:17:30] Misko Hevery: well, all the sides have third party scripts, right? [00:17:32] Like any kind of a site will have some kind of third-party whether it's analytics ads or just something that keeps track of what kind of exceptions happen on the client and send them back to the server, right. Standard standard things that people have on a website. And instead of the standard things that are making, preventing you from getting a hundred out of a hundred on your score. [00:17:52] Right. Okay, amazing. So this is a way of unloading stuff from the main thread Got [00:17:58] swyx: What's the API? I haven't seen the actual code that, Party Town. Okay. There's a, there's a adapter thingy and then [00:18:05] Misko Hevery: you stick it. So we, those are just for react components. There is also vanilla. Just go a little over. [00:18:14] So do [00:18:16] swyx: you see how we have to prioritize, React above Vanilla? [00:18:20] Misko Hevery: Even lower? This just shows you how you get the PartyTown going. Oh, here we go. Text to pay. We go right there. [00:18:25] You're looking at it right there. So notice what. We asked you to take your third party script, which, you know, if you go to Google on an exit, it tells you like, oh, take this script tag and just drop it inside of your head. Right. Or something like that. So what we do is we say like, do the same exact thing, except change the type to text/partytown. [00:18:43] And that basically tells the browser don't execute it. Instead, PartyTown will come later, read the stuff, ship it over to the web worker and then do it over there. [00:18:54] swyx: So the only API is you, you just change this, that's it? Yes. Yes. [00:18:58] Misko Hevery: So you drop a party down script into, uh, into, which is about six kilobytes. And then you go to all of the third-party places and just add, type text/partytown, and that ships them off to the other place. [00:19:10] swyx: So, um, it feels like Chrome should just build this in like script, script type third party. Right. And then just do it. [00:19:20] Misko Hevery: Yeah. I mean, we're having chats with them. You never know. Maybe if this shows up to be very useful technique. It might be something that Chrome could consider. Well, certainly we need a better way of making synchronous calls from the web worker thread to the main thread, not from the main ones of the web, right. [00:19:37] That's clearly a bad idea, but from the web worker, the main, it would be really nice to have a proper way of doing synchronous calls. [00:19:44] Atomics [00:19:44] Misko Hevery: Atomics might be the answer. And so it might be just as simple as getting all the browsers to adopt Atomics because the standard already exists. [00:19:51] swyx: And I see what, what is this thing I've never heard of it? [00:19:55] Misko Hevery: Atomics is basically a shared memory array buffer between two threads and you can do, atomic operations like locking and incrementing and things of that sort on it. And they can be done in a blocking way. So you can, for example, say, increment this to one and wait until whatever result is three or something like that. [00:20:14] So then you're giving a chance for the other thread to do its work. I [00:20:18] swyx: mean, this is like, so I'm writing assembly, like, [00:20:22] Misko Hevery: It's not assembly it's more, you know, semaphore synchronization. [00:20:26] swyx: Um, okay. Yeah. I see the, I see the locks and stuff, but this is, I can't just like throw in a third party script here. [00:20:33] Misko Hevery: No, no, no. This is something that the PartyTown would use to get synchronous messaging across. Right. Because currently it is kind of a hack that we create an XML HTTP request that is blocking that stuff with a service worker. Like this is craziness, right. So Atomics would definitely be a nicer way to do this. [00:20:51] swyx: I think the goal is definitely very worthwhile that the underlying, how you do it is a bit ugly, but who cares? [00:20:57] Misko Hevery: Yeah. So the goal is very simple, right? The goal is, for us, we think we can have the best CMS, if we can produce websites that are a hundred out of a hundred on mobile, right? [00:21:07] That's the goal. And if you look at the current state of the world, and if you go to e-commerce websites, it's pretty dismal. Like everybody gets like 20 something on their scores for their sites, right? Even Amazon that has all the resources to spend, will only get 60 out of a hundred on their score. [00:21:24] Even Google website themselves gets it only about 70, out of a hundred. Right? So the state of the world is not very good. And I feel like we are in this cold war in a sense that like everybody's website is equally bad, so nobody cares. Right. But I'm hoping that if you can build a couple of websites that are just amazingly fast, then the world's going to be like, well, now I have to care. [00:21:46] Qwik and Resumable vs Replayable Frameworks [00:21:46] Misko Hevery: Right? Because now it is different. And so now we're getting into the discussion of Qwik. So what is clicking and why do we need this? So, um, the basic idea behind Qwik, or rather than, let me back up a second of why existing websites are slow. [00:22:04] And so there's two reasons, right? One is third party scripts, and we just discussed how we can solve this through PartyTown right? I mean, we can move all of their party scripts off. [00:22:12] However, even if you move all the third party scripts off, your problem is still going to be that, uh, the startup time of your website is going to be pretty slow. And the reason for that is because all websites ship everything twice. First it's a server side rendered HTML, right. [00:22:30] And the page comes up quickly and then it's static. So we need to register listeners. Well, how do we adjust your listeners? Well, we download the whole site again, this time they came to in a form of TypeScript or JavaScript, and then we execute the whole site again, which is by the way, the server just did that. [00:22:49] Right? Yup. Yup. And then we know where to put up listeners and, that causes, you know, this is a perfect graphic for it, right. That causes double loading of everything. So we, we download everything once as HTML and then we load everything again, as JavaScript and then the execute the whole thing again. [00:23:07] So really we're doing everything twice. So what I'm saying is that the current set of framework are replayable, meaning that in order for them to have the bootstrap on the client, they have to replay everything that the server, literally just did, not even a second ago. And so Qwik is different in a sense, because it is resumable. [00:23:27] The big difference with Qwik is that the Qwik can send HTML across, and that's all. That's all it needs to send across. There's a little tiny bootstrapper, which is about one kilobyte and about one millisecond run, which just sets up a global listener and alert for the system. And no other code needs to be downloaded and it can resume exactly where the server left off. [00:23:48] So you need to have some formal way of serializing, the state, getting the state to the client, having a way of deserializing the state. More importantly, there's an importance to be able to render components independently from each other, right? And this is a problem with a lot of frameworks, which is - even if you could delay the startup time of a, uh, of an application, the moment you click on something react has to rerender the whole world right now, not rerender, that might be the wrong term, but it has to re execute its diffing algorithm from the root, right. It has to build up the vDOM. It has to reconcile the vDOM, has to do all these things, starting at the root. [00:24:26] There's no real way to not make it from the root. And so that means that it has to download all the code. And so the big thing about Qwik is, how can we have individual components be woken up individually from each other in any order? Right? I mean, people tend to talk about this in form of micro components or microservices on the client, right? [00:24:46] This is what we want, but at like the ultimate scale, where every component can act independently from everybody else. [00:24:54] swyx: Yeah. Yeah. I think, we should talk a little bit about that because basically every single component is its own module and separately downloaded. So you're really using the multiplexing or whatever you call it of HTTP/2, right? [00:25:05] Like you can parallelize all those downloading. Right. The main joke I made, because I saw this opportunity and I was like, immediately, like, I know this will be the most controversial part, which is essentially. Uh, the way you serialize is you put everything in HTML, right? Like, like that. [00:25:23] So, so I, I immediately feel that, and it will stir up some controversy, but like also, like, I think the, the interesting, I mean, we should talk a bit about this. Like, obviously this is not handwritten by, by, by people. So people should not be that worried. Um, but also like there are some legitimate concerns, right. [00:25:40] Qwik vs React - the curse of Closures [00:25:40] swyx: About how I think basically Dan Abramov was, was also the, the, you, you responded to Dan. Um, so Dan said something like this, okay. So it wasn't a direct response to Qwik but Qwik serializes all state in HTML, and that's something that we considered for React Suspense. And he says, basically the question was, have you considered allowing server components to have serializable state using equivalent? [00:26:03] it's been proposed somewhere earlier. This doesn't work generally state is in reaction arbitrary. Payloads would get huge essentially, like, "does it scale?" Is the question. Uh, and he said that this was done before and I went and looked it up and he was like, yeah. And it's actually what we used to do for ASP .NET WebForms. Right. [00:26:18] Misko Hevery: So if you will look at react the way to React does things. And so I want to pull this up on one of the dev, uh, dogs. I actually talk about it and it might be useful to kind of pull it out. Yeah, the one you are on right now, the answer adoptable fine-grained lazy loaded. The point is that if you have a react component, react components take heavily, closures, right? Closure is the bread and butter of react components and they rely on closures everywhere and it's beautiful. I it's absolutely nice. I really like the mental model. However, it doesn't serialize, right? [00:26:50] You can't take a closure and serialize it into HTML. So what Qwik is trying to do is it's trying to break this up into individual functions. Clearly functions cannot be serialized, but functions can get a URL , a globally known URL, uh, which can load this. So if you scroll a little lower, you will see a, uh, Qwik component , and the difference is, in a Qwik component, we'll have these declaration template, which is which points to a location to where this particular thing can be loaded, if you scroll even further, it talks about how this particular thing can be served up in pieces to the client, if you do this thing. Right. So while it's maybe true that like, oh, it's been tried before and we didn't do it right. [00:27:32] Qwik Demo [00:27:32] Misko Hevery: Have people really tried to solve every single one of these problems. Right. And there's a huge myriad of them that Qwik is trying to solve and kind of get over. And so maybe I can show it to you as a demo of what I kind of have a to-do app working. So let's let me, let's talk about this. [00:27:50] One of the things. So by the way, the screenshot you have on your Twitter account, that is the old version of Qwik, I've been chatting with you and bunch of other people at the conference, I really got inspired by lots of cool things. And this is a kind of a new version I'm working on, which has many of the issues fixed up and improved. So the thing I'm going to show you is standard todo example, right? I mean, you've seen this millions of times before. [00:28:15] swyx: By the way. I did not know that, uh, I think Addy Osmani made this original to do yes, he did. He did. And it's like the classic example. That was a classic example, [00:28:24] Misko Hevery: right? [00:28:27] So remember the goal for us is to serialize everything and send to the client in a form that the client can resume where the silver left off. Right. And then everything can be downloaded in pieces. So there's a lot of things to talk about. So let's start with, with how this works first, and then we can talk about how different pieces actually fit together. [00:28:46] So, you know, first thing you need to do, is, standard, define your interface for an item and define your interface for Todos, which is the collection of items, which contains , number of items completed in the current filter state, and just a list of items like so far, nothing. [00:29:02] Now the special thing comes in that when you declaring a object that you want to serialize, you will run it through this special function called Q object. And it's a marker function and does a couple of things to an object. But you're just basically passing all the stuff in and notice the individual items on Q objects as well. [00:29:20] The reason I did it this way is because I want to serialize individual line items separately, because I know that I'm going to be passing the individual items into separate components individually. Right? So what this basically says to the system is like, there is a top level object. Which is this guy right here and it can have rich state, but remember it has to be JSON serializable. [00:29:43] Therefore it cannot have cyclical things inside of it. It has to be a tree, but inside of it, it can have other objects and those can form cyclical things. So using the combination of those two, you can actually get cyclical graphs going inside of your application. But individually, each Q objects doesn't have that. [00:30:02] So that's a bit of a magic. If I scroll over to the actual running application, what you will notice is these Q objects get serialized like right here. So for example, this one has some ID and you notice it says completed zero and the inside of it has individual items. And notice these items are actually IDs to other locations. [00:30:22] So this ID ending in Zab is actually pointing to this object right here, which has other things. So the whole thing gets serialized. And unlike the demo I showed in Zadar, I have moved all the serialized content at the end, because I don't want to slow down the rendering of the top part. And so if you go, let's go back to our application. [00:30:41] So if you have Todo app, the Todo app is declared in a slightly more verbose way than the way the one would be declared in React. But if we do it this way, then we can serialize the closures, right? The closures don't have the issue with non serialized. By the way, the regular React way of doing things still works here and you can do that is just, they become permanently bound to their parents. [00:31:05] They cannot be lazy loaded. So you can think of it as having two mental models here. You can have lightweight components, which are essentially the same as react components, or you could have Q components, which are slightly more heavyweight, but they get the benefit of having the whole thing, be composable and get lazy a little bit so on and so forth. [00:31:24] So in this particular case, we're saying that there is a Todo app component and the QRL is this magical marker function that tells the system that this content here needs to be lazy. Or rather let me phrase it differently, it says the content here can be lazy loaded. The beauty of Qwik is that it allows you to put a lazy load of boundaries all throughout the system. [00:31:48] And then an optimization phase later decides whether or not we should take advantage of these lazy loaded motor boundaries, right in normal world, the developer has to put dynamic imports and that imports that asynchronous and a pain in the butt to work with, it's not simple. Right? So instead, what Qwik wants to do is say like, no, let's put dynamic imports everywhere, but do it in a way where the developer doesn't have to worry about it and then let the tooling figure out later whether or not we should actually have a dynamic import at this location or not. [00:32:18] Yeah. So even though this file, this there's two applications is in a single file in the tooling. We'll be able to break this file up into lots of small files and then decide in which order the things should be shipped to the client in order to get the best experience. You know, if there's a piece of code that never runs in the client will then put it at the bottom of the, of the chunks, right? [00:32:38] If there's a piece of code that is going to be most likely, you're going to click on it and put it up to the top. So, anyway, so that's kind of a diatribe here with a little bit of an off the rails here, but what this produces is a to-do and it turns the code, right? This QRL function, it says on render, it gets turned into a URL. [00:32:58] And this is what allows the build system to rearrange the code. And so this URL basically says, if you determine that Todo needs to be re re rendered, uh, then you can go download this piece of code. And that will tell you how do we render the Todo, right. [00:33:14] You know, you're using a header and we're using main, notice we're binding Todos in there. So it looks like a regular binding, but the system has to do more work. So in this particular case, the main has to see if it has Todos, it has to refer to a object. So notice this, this ID here matches the ID here. And this is basically how the system knows that this component here, because if you look over here, the main and foot are, both of them want to know that you do this right? [00:33:42] So both of these components need to have the same object. And so, yeah, exactly. So this main here, as well as the footer, they both have a same ID passed in here. And that's how the system knows like, all right, if I wake you up, I have to make sure to provide you with the same exact ID. Now, not only that there is also this particular thing, which is just a copy of it, but, but in this particular. [00:34:08] What it does is, is the list, all of the objects that could potentially affect the state of this component. And when you go and you modify one of these, state objects, the state, these objects actually keep track of each other and they know which components need to be woken up and affected. So I think there's an example of it somewhere here later, uh, like right here, right in here, it says, Hey, if you, uh, you know, do a key up on the input right here, if I type here over here, something, then the key up runs and then eat, enter runs, you know, add a new item, which is just the function that the function right here, which just pushes an item and new item into the list. [00:34:54] And it sets my current state to text me. And so the system knows that in this political case, in a header, this input right here, Has its own state right here. So let me refresh this again. Um, this header has its own state one eight, whatever, right? Which if you look over here is right here. It's text blank, right? [00:35:16] So we find typing here. I'm going to change the state over here. And then if I set the state to blank, then the system knows, oh, that's object 1 8, 7 1, or whatever. I can run a query. I can run document DOM, querySelectorAll. And I can say, give me, uh, all the queue objects, remember how the selector for this start something like this. [00:35:44] Anyways, there's a way to run a selector that will allow me to whatever, whatever the code is, right? I'll run the selector and this selector will then return this header back to me saying this is the object or rather, this is the component that is, has interests registered into this object, which means. [00:36:04] Because I've selected this thing. I have to find the Q render message and send the Q render message to download its template and we render the object. And so what this allows you to do is have a completely distributed set of components that can be awoken only when a relative, you know, appropriate data is changed rather than having this world of like, well, the state has changed and I don't know who has a reference to what? [00:36:30] So the only thing I can do is we learn that the whole page. Well, that's kind of a, it doesn't help you, right? Cause if you run the, the whole page, then there's the whole, the code has to come in here. Right. So that's not helpful. We want to make sure that we only download the code is actually needed. And so you need to have some mechanism by which, you know, like if I change this piece of code, if I change this object, which component needs to be awoken, right. [00:36:54] And normally like if you have Svelte, Svelte does through subscription, this particular trick, the problem is subscriptions cannot be serialized into the DOM. And so we need a mechanism where the subscription information is actually DOM serializable, right? And this is what the Q object is, or the subscriptions that the individual components have to undo to other things. [00:37:18] And so the other thing I kinda want to point out is that we can then bind a complex object. Like in this case, it's a complicated state that'd be assigned to reduce yet. It turned into a binding that's serializable into the bottom, right? So if I go back here, see I'm jumping around. So we have our footer. [00:37:38] If we have our main, the main is declared over here, you know, standard, uh, JSX in here where you, you want to iterate over a bunch of items. There's a host. Okay. So one of the things we need to do is, um, in react, when you have a component, the component is essentially hostless, or I would say it's life component in the sense that it doesn't have a parent, right. [00:38:02] Uh, and that is wonderful in many, many situations, but sometimes it isn't. The problem we have is that we need to have a component. We need to have a DOM element for each component that can be queried using querySelectorAll so that we can determine if there is a listener on it, or if there is a subscription on a particular object or a single back. [00:38:24] So we have this concept of a host element, and this is one way in which the Qwik Q component is more heavyweight than the react component. You can still use react components if you want, you just don't get the benefits we talked about. And, and so a host element is, is a way of referring to the, the host element and adding an attribute to it. [00:38:47] Right. And saying like, oh, I want the host, I'm going to have a classmate. And so if you go into, let's see Maine, uh, right. So it's supposed to be a classmate, right. So it's the component that, that adamant. So normally, uh, the way you do this normally in react is that the main would be a object that the JSX of the re. [00:39:07] The child react component, right? In this particular case for a variety of reasons, we need to eagerly create this particular thing. So then it's a placeholder for other things to go in. And so we need to do an eagerly and then we need a way of like referring to it. So that's what host is, sorry for the, uh, diatribe anyways, but this is how you create your items, right? [00:39:31] And notice the way you got your items is you just got it from your prompts and you can iterate over them. Right? You can reiterate and run the map and produce individual items. And for each item you will pass. And the key. So if you look at the item here, it's prompt says like, I am going to get an item in here. [00:39:50] And my internal state is whether an I am not, I am an editable state. So these are you, basically your props. And this is the components state in here. And, uh, you know, on mound, we create a component states that we're not, we're not an editable state. And then when the rendering runs, uh, it has both the information about the item as well as about whether or not you are currently editing. [00:40:13] Uh, and if you look at the UL, so here's our, one of our items that got generated, notice that the item that passed in as a ID here, right? So if you go to the script at the bottom and see this one ends in PT six, so we should be able to find, here we go, this is what actually is being passed in to that particular component. [00:40:34] But notice there's a second object. Not only is there a, um, a PT six objects, there's also the secondary option. That's the state of the components. So if the state of the component, we're basically saying here is like, if this object changes or this object changes, I want to know about it and I need to be. [00:40:52] So these objects form a graph, right? The presents, the state of your system. And then the Qwik provides a mechanism to serialize all this information into the DOM in such a way that we know which component is to be woken at what time. So if I start typing in one of the things you're going to see is that on the first interaction, this script that will disappear, because what actually happens is that when you interact with the system, it says like "I need to rehydrate myself". Right? And so it goes to the script tag and, uh, reads it. Let me give it back over here, read it leads to the script tag and figures out. You know, these utilizes all these objects because takes this object, puts them inside of this object to build up the graph and then goes back into the DOM tree and say like, okay, so I need to put this one over here. [00:41:40] I need to put this one over here, this one over here and so on and so forth and puts all these objects back. What are they supposed to be? And now you are, your state is back in a, in these components, but the components aren't present yet. They're not awoken, right? Because none of their, uh, Mount or their render functions actually got called. [00:41:59] And because the functions didn't get called, uh, the code didn't have to get downloaded. So everything is super lazy. Right. So when I go and I hit a key over here, the state gets de-centralized, but the only piece of code that gets downloaded is right. It is, it is right. This thing right here. [00:42:18] Nothing else. [00:42:19] swyx: Can we show that the network actually, ah, [00:42:22] Misko Hevery: I would love to, but that part is mocked out right now in the old demo, in the demo that I have, that I did for the conference, that one actually had it properly working. But the feedback was that the D as a developer, there was a lot of things I had to do. [00:42:40] Qwik Compiler Optimizations [00:42:40] Misko Hevery: And so I wanted to simplify it. So one of the things I did is I figured out a way, or rather I spoke with Adam, uh, the same Adam that did PartyTown. And we figured out how to make it, make the tooling smarter so that the developer doesn't have to do this. So what actually happens is that when you have the QRO over here, what actually happens is you, the, the code automatically gets refactored. [00:43:06] And you will get a new function with factor like this. The system will put an expert on it. And what gets placed in this location is a string that says something like, you know, ABC. Uh, hash you local, right. Or something like that. Right? So by doing this transformation and that piece of code is not working in this transformation, um, the, uh, the system can then, uh, lazy load, just the spirit physical code, nothing else. [00:43:39] But in order to do this transformation, we have to make sure that this code here doesn't have any closures. Right? I cannot, it cannot close over something and keep that variable because if it does the whole thing doesn't work. And so the nice thing is that we can still write it in a natural form, but one of the constraints here here is that you can't close over any variables. [00:44:01] Now there's no variables to close over them. The system is designed in such a way that it doesn't need it. Instead of things like props and state are explicitly passed into you, as well as to the thing of the child, whether they're halo as well. So you don't have a needs to create these kinds of closures, but it is a constraint. [00:44:19] And this is what allows the optimizer to go in and rearrange your code base in a way where we can then determine what things are used. So, so in this particular case, we can, for example, determined that you're likely to go and interact with the input box, but you are very unlikely to actually call this on render, because this is the kind of the Chrome, the shell of the application, and wants to show them the applications loaded you will never, ever interacted. [00:44:46] Right? So what you can do is you can take all these imports and you can sort them not alphabetically. You can sort them by the probability of usage. And then once you haven't sorted by the probability of usage, you can tell the optimizer like, okay, take the first N ones so that I have a chunk that's about 20 kilobytes because we think 20 kilobyte chunks. [00:45:08] And then the system can be like, okay, let me add a whole bunch of them until I have 20 kilobytes. Let me add a nice chunk, then underline about 20 clubs. And I kind of do these chunking all the way on the end. And then the last chunk we'll probably end up with a bunch of stuff that never ever gets loaded. [00:45:22] Right. But the problem is the current way we design applications. You can't do that. You just can't right. And so we have this mentality of like, we have frameworks that have amazing developer experience, but they set up the overall experience down the path of monolithic code base and any kind of, um, lazy loading that the Builder can add after the fact. [00:45:50] It's just like kind of a kloogey workaround. Right? And that's the thing that the Qwik solves it says like, no, no, no, let me help you design an application that has still nice developer experience, but let me structure things in a way so that I can later rearrange things, right? Let me keep you on this guide rails of like, make sure you do it in these ways. [00:46:12] And so everything is in the quickest set up in a way where it keeps you in this guide rails. And the result is, is a piece of code that the optimizer, then the Qwik can rearrange, right? It can go and pull out this function. It can pull out this function. It can pull out all of these functions and turn them into a top level functions that are exportable. [00:46:31] And it can then, um, tree shake the stuff that's not needed and produce chunks that can then be lazy loaded into your application. [00:46:41] swyx: Like four or five years ago, I think there was some, uh, I think even at the Chrome dev summit or something like that, there was a effort to use Guess.js to basically use Google analytics, to optimize all this, intelligent pre-loading or loading predictions. [00:46:58] Um, is that how I think I missed the part about how, like, how you pull in the statistics for, for optimizing. [00:47:05] Misko Hevery: So the first thing to talk about, I think is important to understand is that unless you can take your application and break it up into lots and lots and lots of chunks, I do that. Yeah. There's nothing to talk about. [00:47:15] Right? If your application is one big chunk, there's nothing to talk about. You would have to load the chunk end of discussion. [00:47:21] swyx: Well, so the chunk goes page level, and now you're doing component level, right? So they were, they were saying we split it by page and we can predict the next page. So, [00:47:30] Misko Hevery: so look at Amazon, right? [00:47:34] Most of this stuff, you will, I mean, you can click on stuff and there's a menu system up here and let's pick a random component here. How do I, let me just go to something. Oh, come on. Just give me a detail view of something every day. Uh, you know, most things here never have to be rendered. Like, for example, there's a component here. [00:47:52] This component never, ever changes. Nothing here. We're render nothing. We'll run it there, here. Uh, yes, these are components and I can click on them and they update the UI over here. But if I'm interacting here, why am I downloading the menu system? Right. And so the point is, if you have a page like this, there is huge number of components in here, but most of them either never update, or in my current path of interaction, I just don't need to update them. Right. If I'm using the menu system, then I don't need to download this thing here. And if I'm interacting with my item then I don't need the menu system, and I'm not, unless they put something out to car, do I have to worry about my shopping cart? [00:48:33] Right? And, and this is the problem is that we currently bundle the whole thing up as one giant monolithic chunk. And yes, there are ways to break this out, but they are not easy. And everybody knows how to do route level break up. But like even on rough level, it's, it's not, it's not fine grain enough. [00:48:53] Right. And so the magic of Qwik is the magic of writing the code in this particular style. Is that for a typical size application, I can break up the application in literally thousands of chunks. Now that's too much. We've gone way too far. I do. These, these chunks are too small and we don't want that. [00:49:13] Right. But when I can break things up, it's easy for me to assemble bigger chunks out of it. But the opposite isn't true, right? If I have a big chunk and I want to break it, well, good luck. You know, no amount of tooling is going to do this. As a matter of fact, the best AI system we have, which is right here in our brains. [00:49:31] Right. Even if you give it to the developer and say, go break this thing up, it's a head-scratcher that takes like weeks of work. Right? And so we are in this upside down world of like build a humongous thing and then have this attitude of like, somehow tooling will solve it. Tooling can solve this problem. [00:49:52] Right. You have to do it the other way around. You have to design a system which breaks into thousands of little chunks. And then the tooling can say, yeah, but that's too much. It's too fine-grained. And let me glue things together and put them together into bigger chunks because. Through experience. We know that an optimal chunk size is about 20 kilobytes, right? [00:50:11] And so now the thing you want is to get a list, the order of which the chunks are used, and that's easy, right? If you're running your application, you can just keep statistics on what, how users interact with your application and that's that the sticks can be sent back to the server. And so once you can get back on a server is just a ordered list of the probability by which you're going to need individual chunks. [00:50:35] And that sort of lists that sorted list is all you need to tell the optimizer, like start at the top of the list, keep adding items until you get to a correct chunk size, they'll start a new job, right. And you keep doing this over and over. Okay. Now the reason I get excited about this, the reason I talk about it is because we completely ignored this problem. [00:50:57] Right. We, we have these amazing frameworks, whether it's Angular, React, Svelte or whatever that allow you to build these amazing sites. But on the end of the day, we all have horrible page speed scores, because we're not thinking about it from the correct way. And the attitude for the longest time has been, the tooling will solve it later. [00:51:18] And my argument here is no, the tooling will not solve it later. If you make a mess of this code base, there's nothing that tooling can do. Yeah. [00:51:27] swyx: Um, there's so many directions. I could take that in. So first of all, uh, the React term for this is a sufficiently smart compiler, which has been in the docs for like four or five years. [00:51:36] Yeah. That's an exhibit, [00:51:39] Misko Hevery: but that's my point. Like you cannot make a sufficiently smart compiler [00:51:43] swyx: so is, I mean, is there a compile step for this because of the QRL section. [00:51:47] Misko Hevery: So right now it's actually running without compilation whatsoever. So one of the things I want to make sure that it runs both in a compiled and uncompiled state, and that's why it comes up with these bogus things like mock modules, et cetera. [00:52:01] Uh, and I think if you go to the network stab, it loads the mock module, and it just re-exports it. I can't really show you, but basically all of these things are kind of just in there. So currently this thing runs as a single monolithic application, but the, the way this thing would work is that as I pointed out everything, every place that you see QRL is a hint to the compiler to go and extract this. [00:52:26] The compiler, literally, we would just think. Ctrl+Shift+R extract here and then gives it a name which will be a header pull on a key up. Right. And then it repeats the same exact thing over here. So Ctrl+Shift+R extract. This is a header onMount. I mistyped it. It's okay. I get it right. And the same thing here, controls have to go Ctrl+Shift+R [00:53:00] Qwik Questions [00:53:00] swyx: what if I need to do like conditional loading because the competitor doesn't know which branch I need to go down. [00:53:09] Misko Hevery: So I'll answer the question in a second, did you want to point out, so notice what ends up here? The header is super, super lightweight. There's nothing in here. Cause these things, these two things will get converted into these URLs, right? Yeah. And because of that, this header is permanently bound to the onRender of the to-do app. [00:53:28] Right? If you load a to-do app you're also loading the header and of Main and a footer, but the thing we've done over here is we made this super lightweight, and this is what allows the lazy loading to happen. [00:53:41] Now you're asking what about other components? Uh, easy. I mean, uh, if you want it to conditionally include the header, you know, standard stuff. [00:53:51] Uh, true. Right now the, the header itself will always be permanently bound into the, on render of the to-do app. Right. However, because we did the trick when we extracted everything out of it had already super, super lightweight. It doesn't contain anything. Right? So the only thing the header really contains if you go in here is the what to do on this URL was the only thing that's in there and also this vendor, right? [00:54:18] So these two URLs are the only thing that is contained inside of the header by itself. Okay. It's only when we decide to render the header, do we go into the header? And we say, okay, we're doing a rendering. So what's your URL. And we look at this URL right here, we download the code. And so now the rendering pipeline has to be a synchronous. [00:54:38] We download the code and then we go and execute the content. And we basically fill in the content the better now in the process, we also realize, oh, we also have to download this piece of code. And this is where statistics would come together. And we basically tell us that this URL and this URL always get downloaded together. [00:54:57] And therefore the optimizer will be smart enough to always put them together in the same file in the same chunk. And, uh, you know, we rented the content. Got it. [00:55:09] swyx: Okay. So, uh, one small piece of, uh, API feedback slash questions. Uh, yeah, you have, the tag name is optional there. I guess that's a hint to what to store, right. [00:55:18] Misko Hevery: So right now it says to-do right here. If I have a [00:55:22] swyx: out, [00:55:24] Misko Hevery: it becomes, uh, just the div. Um, so the system doesn't care. What the thing is, it means eight element. Um, it could be any element they will do just fine. It's easier to kind of on the eyes if it actually says to do right. So that's the only reason for okay. [00:55:42] Got it. [00:55:43] swyx: the bigger piece is okay. It's like a lot of HTTP requests. Every time I basically, like every time I make a request, every time I interact with the app, I essentially need to do a whole new handshake, a whole new network transfer. There's some baseline weight for that. [00:56:00] Right. Chunking links that helps, um, is there a preload essentially? Is there a less programmatically say like, okay. And by the way, uh, this is important for offline capable apps. So I like, let's say like, I'm going offline. Like it's five things. I know I don't need it right now, but like as an app developer and [00:56:18] Misko Hevery: I know. [00:56:19] Yes. So, uh, we can totally do that. Um, we, uh, there is a level worker that will be set up and the web worker will get a list of all the chunks in the woodwork who will try to go and download them and set up the caching for you, uh, in these chunks of time. So that Y when you interact, the only thing that the browser has to do is execute the code now, because these chunks are small, the execution code, if we don't, we're not worried about it, right. [00:56:46] In the case of like on typical framework, that's replaceable. The problem is that the first time you interact with this thing, you have this huge amount of code to download parts and execute. But this isn't the case here because every interaction really only brings in the code that's strictly necessary for this interaction. [00:57:04] So again, we go to like Amazon, right? If I hover over here over these things, and it changes the image on the right side, the only code that gets downloaded and executed is the code for this. Now it's already pre downloaded because their web worker would go and pre fetch it for you. So the only thing that the browser has to do is parse the code and execute the code for the on hover, a callback that goes and updates this components URL. [00:57:27] Right. That's it? No other code needs to be downloaded in a presence. Yep. [00:57:31] swyx: Got it. anything else that we should cover real Qwik? [00:57:35] Misko Hevery: I feel like I have talked your ear off and you have been such a good and gracious host. Uh, happy to answer questions. I don't want to overwhelm people, but I am super excited as you can talk. [00:57:46] I'm super excited about this. I think it's a fundamental shift about how you think about a framework. So like, if you look at all the existing frameworks, they're all arguing about, like, I have a better index, I can do this better or that better and et cetera. Right. But fundamentally they're not the same, like essentially the same buckets they can all do about the same thing Qwik. [00:58:05] I think it's a whole new ballgame because the Qwik thing is not about like, oh, I can render a component just like, you know, 50 other frameworks can do as well. The thing that Qwik has is I can do it. I can give you microservices for free. I can give you this micro component architecture for free and I can produce a bundling. I am the sufficiently advanced compiler. Okay. Let's put it this way. This thing that you thought you could have and solve for you, doesn't exist unless you have the current guidelines. Right? So the thing with Qwik is that it is the thing that allows you to have a sufficiently smart compiler to give you this amazing times to interactivity, right? [00:58:48] At the end of the day, is the, there's nothing faster than downloading HTML for your website. I mean, that's the cake, right? Yep. So the reason why Qwik is fast is not because Qwik is clever in the way it runs JavaScript or anything like that. So no Qwik as fast because they don't have to do anything. [00:59:04] Right. When you, when you come to a Qwik website, there is literally nothing to do, right. We're fast because we don't do anything. And that's [00:59:13] swyx: your baseline is like a one kilobyte bike loader, right? [00:59:16] Misko Hevery: One come on loader with all the loader, does it sets up a global list? Right. So let me, let me go back. Sorry, let me share one more thing. [00:59:22] So here's your input, right? So if you go to a header, here's the input, right? The reason we know how to do something on it is because we serialize this thing called on:keyup, and there is a URL, right? So when this thing is first executed, nothing is done. Like this content shows up and it said we're done. [00:59:41] And the only reason why we know to do something next is because when I do a key up here, the event, bubbl
In this episode of the Angular Show, the panelists (Aaron, Brian, and Jennifer) have the esteemed privilege to be chat with Misko Hevery. In case you haven't heard, Misko is the creator (and sometimes lovingly referred to as the father) of Angular. Misko has spent the last 16 years building Angular at Google, and we have much to thank him and the team for. For some of us, we make a living from teaching, writing, speaking, and coding with Angular. We cannot thank Misko and the entire Angular Team enough!Now, don't get your feathers ruffled - Misko recently transitioned from the Angular team at Google to join the Builder.io team that is building (pun intended) Qwik - a DOM-Centric, resumable web-app framework. Does this mean that Angular is doomed? No, definitely not. This means that Misko continues to pioneer in the land of the web.What is Qwik and how is this framework any different than Angular (or Vue or React)? Join us as we learn about Qwik with Misko Hevery!Show notes:https://github.com/builderio/qwik
Recording date: 07/01/2021John Papa @John_PapaWard Bell @WardBellDan Wahlin @DanWahlinCraig Shoemaker @craigshoemakerMisko Hevery @mheveryBrought to you byAG GridIonicResources:@Qwikdev on TwitterA first look at Qwik - the HTML first frameworkDeath by Closure (and how Qwik solves it)TTI (Time to Interactive)PageSpeedAngularAngularJSLazy LoadingDefer attribute in HTMLDo google analytics slow down my site?Adam Bradley on TwitterAsynchronous JavaScriptBrowser and JavaScript performance memoryASP.NET View StateQwik on TwitterQwik on GitHubQwik DiscordTimejumps03:54 Guest introduction05:50 What is your new web framework?08:48 Sponsor: Ag Grid09:49 How does it work to delay code that you need?17:34 How does a developer decide how to handle button clicks?22:15 What mental model is required for developers to use this?25:00 How is Qwik different in it's rendering?35:19 Sponsor: Ionic36:07 How does it work with apps that have lots of components?41:52 When did this idea come to you?43:11 We're not taking advantage of browsers in 202145:35 What's the road map for Qwick?47:32 How do people get started with Qwick now?Podcast editing on this episode done by Chris Enns of Lemon Productions.
In this episode, Misko Hevery is featured in an interview with Tracy Lee on leaving Angular, and his new project Builder. He talks about a new way to think about frameworks that our community should start embracing, as well as, why he's so excited about Builder, the space, and what he will be doing next. Host: Tracy Lee (@ladyleet) - CEO, This Dot Labs Guest: Misko Hevery (@mhevery) - CTO, Builder.io & Creator of Angular This episode is sponsored by This Dot Labs.
https://www.ng-conf.org/ Тайм коды: 00:00 - Приветствие и о госте 01:37 - Day 1 Keynote | Brad Green & Igor Minar - https://youtu.be/O0xx5SvjmnU 12:36 - Crash Course: Angular and ngRx | Aspen Payton - https://youtu.be/272KDxSIQBw 21:47 - Using Monorepos for Scalable Apps | Dylan Johnson & James Henry & Mike Haas - https://youtu.be/WFzph5uTdmw 24:45 - Not Every App is a SPA | Rob Wormald - https://youtu.be/JX5GGu_7JKc 35:42 - Day 3 Keynote | Stephen Fluin & Misko Hevery - https://youtu.be/-kYtw3CSe6s 45:25 - It’s just a compliment after all! | Katerina Skroumpelou - https://youtu.be/6RobEjMnHtQ 49:13 - Angular and CSS Grid: Get ready to fall in love | Bill Odom - https://youtu.be/lh6n0JxXD_g 58:55 - Why Humans Need To Move To Mars | Stephen Petranek - https://youtu.be/_Up7GU-F9zc 01:14:30 - Итоги конференции
Sponsors Sentry use the code “devchat” for 2 months free on Sentry small plan Clubhouse CacheFly Host: Charles Max Wood Special Guest: Miško Hevery Episode Summary In this episode of My JavaScript Story, Charles hosts Miško Hevery, creator of Angular and Senior Computer Scientist at Google. Miško was introduced to computers when his father brought a Sinclair ZX Spectrum home for them to play with. When they moved to the United States from Czech Republic, Miško attended Rochester Institute of Technology and studied Computer Engineering. After working for companies such as Adobe, Sun Microsystems, Intel, and Xerox, he joined Google where created the Angular framework. For more on the story of how Miško created AngularJS, listen to the ‘Birth of Angular’ episode on the Adventures in Angular podcast here. Miško is currently working on Angular Ivy at Google and plans to restart a blog in the future. Links Adventures in Angular: The Birth of Angular JavaScript Jabber: Dependency Injection in JavaScript with Vojta Jína & Misko Hevery Miško's Twitter Miško's GitHub Miško's Medium Miško's LinkedIn How to Talk so Kids Will Listen and Listen so Kids Will Talk https://devchat.tv/my-angular-story/ Picks Miško Hevery: Prusa3D - 3D Printers from Josef Prusa Charles Max Wood: The Kingfountain Series by Jeff Wheeler
Sponsors Sentry use the code “devchat” for 2 months free on Sentry small plan Clubhouse CacheFly Host: Charles Max Wood Special Guest: Miško Hevery Episode Summary In this episode of My JavaScript Story, Charles hosts Miško Hevery, creator of Angular and Senior Computer Scientist at Google. Miško was introduced to computers when his father brought a Sinclair ZX Spectrum home for them to play with. When they moved to the United States from Czech Republic, Miško attended Rochester Institute of Technology and studied Computer Engineering. After working for companies such as Adobe, Sun Microsystems, Intel, and Xerox, he joined Google where created the Angular framework. For more on the story of how Miško created AngularJS, listen to the ‘Birth of Angular’ episode on the Adventures in Angular podcast here. Miško is currently working on Angular Ivy at Google and plans to restart a blog in the future. Links Adventures in Angular: The Birth of Angular JavaScript Jabber: Dependency Injection in JavaScript with Vojta Jína & Misko Hevery Miško's Twitter Miško's GitHub Miško's Medium Miško's LinkedIn How to Talk so Kids Will Listen and Listen so Kids Will Talk https://devchat.tv/my-angular-story/ Picks Miško Hevery: Prusa3D - 3D Printers from Josef Prusa Charles Max Wood: The Kingfountain Series by Jeff Wheeler
Sponsors Sentry use the code “devchat” for 2 months free on Sentry small plan Clubhouse CacheFly Host: Charles Max Wood Special Guest: Miško Hevery Episode Summary In this episode of My JavaScript Story, Charles hosts Miško Hevery, creator of Angular and Senior Computer Scientist at Google. Miško was introduced to computers when his father brought a Sinclair ZX Spectrum home for them to play with. When they moved to the United States from Czech Republic, Miško attended Rochester Institute of Technology and studied Computer Engineering. After working for companies such as Adobe, Sun Microsystems, Intel, and Xerox, he joined Google where created the Angular framework. For more on the story of how Miško created AngularJS, listen to the ‘Birth of Angular’ episode on the Adventures in Angular podcast here. Miško is currently working on Angular Ivy at Google and plans to restart a blog in the future. Links Adventures in Angular: The Birth of Angular JavaScript Jabber: Dependency Injection in JavaScript with Vojta Jína & Misko Hevery Miško's Twitter Miško's GitHub Miško's Medium Miško's LinkedIn How to Talk so Kids Will Listen and Listen so Kids Will Talk https://devchat.tv/my-angular-story/ Picks Miško Hevery: Prusa3D - 3D Printers from Josef Prusa Charles Max Wood: The Kingfountain Series by Jeff Wheeler
Sponsors Sentry use the code “devchat” for 2 months free on Sentry small plan Triplebyte offers a $1000 signing bonus CacheFly Host: Charles Max Wood Special Guest: Miško Hevery Episode Summary In this episode of My Angular Story, Charles hosts Miško Hevery, creator of Angular and Senior Computer Scientist at Google. Miško was introduced to computers when his father brought a Sinclair ZX Spectrum home for them to play with. When they moved to the United States from Czech Republic, Miško attended Rochester Institute of Technology and studied Computer Engineering. After working for companies such as Adobe, Sun Microsystems, Intel, and Xerox, he joined Google where created the Angular framework. For more on the story of how Miško created AngularJS, listen to the ‘Birth of Angular’ episode on the Adventures in Angular podcast here. Miško is currently working on Angular Ivy at Google and plans to restart a blog in the future. Links Adventures in Angular: The Birth of Angular JavaScript Jabber: Dependency Injection in JavaScript with Vojta Jína & Misko Hevery Miško's Twitter Miško's GitHub Miško's Medium Miško's LinkedIn How to Talk so Kids Will Listen and Listen so Kids Will Talk https://devchat.tv/my-angular-story/ Picks Miško Hevery: Prusa3D - 3D Printers from Josef Prusa Charles Max Wood: The Kingfountain Series by Jeff Wheeler
Sponsors Sentry use the code “devchat” for 2 months free on Sentry small plan Triplebyte offers a $1000 signing bonus CacheFly Host: Charles Max Wood Special Guest: Miško Hevery Episode Summary In this episode of My Angular Story, Charles hosts Miško Hevery, creator of Angular and Senior Computer Scientist at Google. Miško was introduced to computers when his father brought a Sinclair ZX Spectrum home for them to play with. When they moved to the United States from Czech Republic, Miško attended Rochester Institute of Technology and studied Computer Engineering. After working for companies such as Adobe, Sun Microsystems, Intel, and Xerox, he joined Google where created the Angular framework. For more on the story of how Miško created AngularJS, listen to the ‘Birth of Angular’ episode on the Adventures in Angular podcast here. Miško is currently working on Angular Ivy at Google and plans to restart a blog in the future. Links Adventures in Angular: The Birth of Angular JavaScript Jabber: Dependency Injection in JavaScript with Vojta Jína & Misko Hevery Miško's Twitter Miško's GitHub Miško's Medium Miško's LinkedIn How to Talk so Kids Will Listen and Listen so Kids Will Talk https://devchat.tv/my-angular-story/ Picks Miško Hevery: Prusa3D - 3D Printers from Josef Prusa Charles Max Wood: The Kingfountain Series by Jeff Wheeler
Sponsors Sentry use the code “devchat” for 2 months free on Sentry small plan Triplebyte offers a $1000 signing bonus CacheFly Host: Charles Max Wood Special Guest: Miško Hevery Episode Summary In this episode of My Angular Story, Charles hosts Miško Hevery, creator of Angular and Senior Computer Scientist at Google. Miško was introduced to computers when his father brought a Sinclair ZX Spectrum home for them to play with. When they moved to the United States from Czech Republic, Miško attended Rochester Institute of Technology and studied Computer Engineering. After working for companies such as Adobe, Sun Microsystems, Intel, and Xerox, he joined Google where created the Angular framework. For more on the story of how Miško created AngularJS, listen to the ‘Birth of Angular’ episode on the Adventures in Angular podcast here. Miško is currently working on Angular Ivy at Google and plans to restart a blog in the future. Links Adventures in Angular: The Birth of Angular JavaScript Jabber: Dependency Injection in JavaScript with Vojta Jína & Misko Hevery Miško's Twitter Miško's GitHub Miško's Medium Miško's LinkedIn How to Talk so Kids Will Listen and Listen so Kids Will Talk https://devchat.tv/my-angular-story/ Picks Miško Hevery: Prusa3D - 3D Printers from Josef Prusa Charles Max Wood: The Kingfountain Series by Jeff Wheeler
On this episode of Eat Sleep Code, guests Brad Green and Todd Motto talk about Angular 2. Brad Green, Engineering director on the Angular 2 project shares what's in the Angular 2 road map including the new Angular 2 CLI. Performance improvements, model change technologies and web workers are discussed. Cross platform development with Angular 2 including desktop and mobile using NativeScript are also included in the discussion. http://developer.telerik.com/content-types/podcast/engineering-angular-2-brad-green/ Brad Green: Hey, good morning. EC: And Todd Motto is also joining us. Hey, Todd. Todd Motto: Hey, good evening. EC: I've brought these folks on the show today to talk about Angular 2. Brad Green is here from Google. Brad, why don't you go ahead and let folks know what you do at Google and what you work on with Angular 2? BG: Yeah. So I am an Engineering Director here at Google, and I've been working the Angular project for the past, almost six years now, and was one of the project originators along with Misko Hevery and some other folks. And we're excited to roll out Angular 2. We're in beta now and we're getting towards final not too long. EC: And we also have Todd with us. Todd, give us a quick intro. We just had you on the show last week, but folks tuning in for the first time might not know who you are. TM: So I am a recent addition to the Telerik team. I'm a developer advocate near London, in England, hence the accent. So I cover the European side of things. EC: And today, we're gonna discuss Angular 2 in detail. And we're gonna kick things off with some of the tools that you use to build Angular 2. Because things are changing in that regard, especially with the introduction of TypeScript and some of the CLI and whatnot. Brad, you wanna give us some info on what the new tooling is like? Find the full transcript on Telerik Developer Network http://developer.telerik.com/content-types/podcast/engineering-angular-2-brad-green/
43.5 ngAir - Angular 2 Beta - The Angular Team stops by to announce the arrival of Angular 2 Beta!!! Also, Thomas Burleson announces the 1.0 release of Angular Material. This show is amazing! Guests: Brad Green, Misko Hevery, Igor Minar, and Thomas Burleson Panelists: Olivier Combe, Aimee Knight, Scott Moss, Carmen Popoviciu, PatrictJS, and Jeff Whelpley Picks/Tips: Brad - Developer News Worldwide Misko - xkcd Igor - http2 Olivier - Auth0 Angular 2 Blog Posts Aimee - Read the Source Carmen - Light Table, Patrick - Angular 2 Beta Jeff - Aerobatic.com, RxJS 5.0 Beta Angular Air is a video podcast all about Angular hosted by Jeff Whelpley. Please visit the Angular Air website (http://angularair.com) to see upcoming and past episodes. Also be sure to follow Angular Air on Twitter and Google+ to stay up to date with future episodes. Also, all episodes are on the YouTube channel as well. AngularAir is sponsored by: AngularClass Learn AngularJS, Angular 2, and Modern Web Development form the best. Looking for corporate Angular training, want to host us, or Angular consulting? twitter: @AngularClass email: info@angularclass.com chat: Join AngularClass Chat --- Support this podcast: https://anchor.fm/angularair/support
Today's show features the creator of the landmark Javascript framework, AngularJS. I spoke to Misko Hevery about the rise of Angular in our current, "Good Parts JS" ECMAScript 5 world, how it evolved, and his focus on the next chapter, Angular 2.0. My second guests, Alex Poon and Matt Casey, have created the AI-based digital assistant, Amy Ingram, for coordinating meeting schedules by reading and responding to real email texts and learning your preferences. The post TechCast #84 – AngularJS creator Misko Hevery on Angular 2.0 and x.ai team on Amy Ingram, A/I calendar assistant appeared first on Chariot Solutions.
The panelists discuss dependency injection with Vojta Jína & Misko Hevery.
The panelists discuss dependency injection with Vojta Jína & Misko Hevery.
The panelists discuss dependency injection with Vojta Jína & Misko Hevery.
Panel Misko Hevery (twitter github blog) Igor Minar (twitter github blog) Jamison Dance (twitter github blog) Joe Eames (twitter github blog) Tim Caswell (twitter github howtonode.org) AJ O’Neal (twitter github blog) Discussion 01:33 - Angular.js (twitter github blog) 02:33 - Angular.js compared to other frameworks 04:03 - How does it work? 05:22 - Cost 06:06 - HTML Compiler 07:02 - Directives 10:31 - Working with browsers in the future 12:07 - Dependency injection 16:50 - Main method 18:48 - Using require.js 20:53 - How would you build a TreeView widget in Angular? 24:07 - Where data is stored 24:42 - Scope 29:47 - Syncing to servers RESTClient 31:34 - Testability & Services in Angular 39:04 - Benefits of Angular Dependency injection Directives Picks The Arrow (Joe) Font Awesome (Tim) Testacular (Igor) Plunker (Igor) The Better Angels of our Nature: Steven Pinker (Misko) XCOM (Jamison) The Foundation Series: Isaac Asimov (Jamison) Influencer: The Power to Change Anything (AJ) Transcript [This episode is sponsored by ComponentOne, makers of Wijmo. If you need stunning UI elements or awesome graphs and charts, then go to wijmo.com and check them out.] [Hosting and bandwidth provided by the Blue Box Group. Check them out at bluebox.net] JAMISON: Hi everybody and welcome to episode 32 of the JavaScript Jabber podcast. I'm not your host Charles Max Wood, I'm Jamison Dance. Chuck is at a conference this week. So, he is not here. We have with us Joe Eames. JOE: Hey everybody! JAMISON: Tim Caswell. TIM: Hello. JAMISON: And we have two special guests. I'm going to mangle your names, so I'm sorry. It’s Misko Hevery. MISKO: Misko Hevery. Yeah, thank you. JAMISON: Misko Hevery and Igor Minar? IGOR: Minar. Yeah. JAMISON: Great. You guys wanna introduce yourself really quick? MISKO: Sure. So, this is Misko Hevery, original creator of Angular.js. IGOR: Hi everybody! I'm Igor. I joined Misko about 2 years ago on this venture of creating better browser and better environment for creating client-side applications. JAMISON: And if you can’t tell, we are going to talk about Angular.js this week. So, I know it is kind of a Google project now. Did it start out that way? MISKO: It started out with something I was working on and eventually I've open sourced it at a product with Google internal application and just gotten such a rave reviews and new features that people actually says, “Hey why don’t you work on this full time and turn in on to a real product?” So, that's how it’s started. JAMISON: Oh, wow. So, there’s actually a team in Google who are working on Angular as their job? MISKO: Yeah. IGOR: Yes. JAMISON: That's awesome. IGOR: It’s just two of us here now, but we have a bunch of other people working full time on Angular.js and also main contributors-- JAMISON: Oh, go ahead sorry. IGOR: There is a team behind Angular.js. JAMISON: Do you think you can give an overview and kind of a comparison to contrast Angular to some of the other MVC frameworks that people like before you? I mean, Backbone I guess is what most people know. So, what makes Angular different from Backbone? How does it work? MISKO: So, I have never used Backbone besides it’s framework. But, my understanding is that Backbone is basically you have declare model and then launch on changes on its mode. And the way it does so is that there is a model class object. And whenever you modify the models that use special getters and setters methods, the Backbone know about the changes. So, this is pretty different from Angular because we don’t require you to inherit from anything. We have special getters and setters. Basically, any JavaScript object can be a model. So, that’s one big difference. JAMISON: But you can still observe the changes on objects like that? MISKO: Right.
Panel Misko Hevery (twitter github blog) Igor Minar (twitter github blog) Jamison Dance (twitter github blog) Joe Eames (twitter github blog) Tim Caswell (twitter github howtonode.org) AJ O’Neal (twitter github blog) Discussion 01:33 - Angular.js (twitter github blog) 02:33 - Angular.js compared to other frameworks 04:03 - How does it work? 05:22 - Cost 06:06 - HTML Compiler 07:02 - Directives 10:31 - Working with browsers in the future 12:07 - Dependency injection 16:50 - Main method 18:48 - Using require.js 20:53 - How would you build a TreeView widget in Angular? 24:07 - Where data is stored 24:42 - Scope 29:47 - Syncing to servers RESTClient 31:34 - Testability & Services in Angular 39:04 - Benefits of Angular Dependency injection Directives Picks The Arrow (Joe) Font Awesome (Tim) Testacular (Igor) Plunker (Igor) The Better Angels of our Nature: Steven Pinker (Misko) XCOM (Jamison) The Foundation Series: Isaac Asimov (Jamison) Influencer: The Power to Change Anything (AJ) Transcript [This episode is sponsored by ComponentOne, makers of Wijmo. If you need stunning UI elements or awesome graphs and charts, then go to wijmo.com and check them out.] [Hosting and bandwidth provided by the Blue Box Group. Check them out at bluebox.net] JAMISON: Hi everybody and welcome to episode 32 of the JavaScript Jabber podcast. I'm not your host Charles Max Wood, I'm Jamison Dance. Chuck is at a conference this week. So, he is not here. We have with us Joe Eames. JOE: Hey everybody! JAMISON: Tim Caswell. TIM: Hello. JAMISON: And we have two special guests. I'm going to mangle your names, so I'm sorry. It’s Misko Hevery. MISKO: Misko Hevery. Yeah, thank you. JAMISON: Misko Hevery and Igor Minar? IGOR: Minar. Yeah. JAMISON: Great. You guys wanna introduce yourself really quick? MISKO: Sure. So, this is Misko Hevery, original creator of Angular.js. IGOR: Hi everybody! I'm Igor. I joined Misko about 2 years ago on this venture of creating better browser and better environment for creating client-side applications. JAMISON: And if you can’t tell, we are going to talk about Angular.js this week. So, I know it is kind of a Google project now. Did it start out that way? MISKO: It started out with something I was working on and eventually I've open sourced it at a product with Google internal application and just gotten such a rave reviews and new features that people actually says, “Hey why don’t you work on this full time and turn in on to a real product?” So, that's how it’s started. JAMISON: Oh, wow. So, there’s actually a team in Google who are working on Angular as their job? MISKO: Yeah. IGOR: Yes. JAMISON: That's awesome. IGOR: It’s just two of us here now, but we have a bunch of other people working full time on Angular.js and also main contributors-- JAMISON: Oh, go ahead sorry. IGOR: There is a team behind Angular.js. JAMISON: Do you think you can give an overview and kind of a comparison to contrast Angular to some of the other MVC frameworks that people like before you? I mean, Backbone I guess is what most people know. So, what makes Angular different from Backbone? How does it work? MISKO: So, I have never used Backbone besides it’s framework. But, my understanding is that Backbone is basically you have declare model and then launch on changes on its mode. And the way it does so is that there is a model class object. And whenever you modify the models that use special getters and setters methods, the Backbone know about the changes. So, this is pretty different from Angular because we don’t require you to inherit from anything. We have special getters and setters. Basically, any JavaScript object can be a model. So, that’s one big difference. JAMISON: But you can still observe the changes on objects like that? MISKO: Right.
Panel Misko Hevery (twitter github blog) Igor Minar (twitter github blog) Jamison Dance (twitter github blog) Joe Eames (twitter github blog) Tim Caswell (twitter github howtonode.org) AJ O’Neal (twitter github blog) Discussion 01:33 - Angular.js (twitter github blog) 02:33 - Angular.js compared to other frameworks 04:03 - How does it work? 05:22 - Cost 06:06 - HTML Compiler 07:02 - Directives 10:31 - Working with browsers in the future 12:07 - Dependency injection 16:50 - Main method 18:48 - Using require.js 20:53 - How would you build a TreeView widget in Angular? 24:07 - Where data is stored 24:42 - Scope 29:47 - Syncing to servers RESTClient 31:34 - Testability & Services in Angular 39:04 - Benefits of Angular Dependency injection Directives Picks The Arrow (Joe) Font Awesome (Tim) Testacular (Igor) Plunker (Igor) The Better Angels of our Nature: Steven Pinker (Misko) XCOM (Jamison) The Foundation Series: Isaac Asimov (Jamison) Influencer: The Power to Change Anything (AJ) Transcript [This episode is sponsored by ComponentOne, makers of Wijmo. If you need stunning UI elements or awesome graphs and charts, then go to wijmo.com and check them out.] [Hosting and bandwidth provided by the Blue Box Group. Check them out at bluebox.net] JAMISON: Hi everybody and welcome to episode 32 of the JavaScript Jabber podcast. I'm not your host Charles Max Wood, I'm Jamison Dance. Chuck is at a conference this week. So, he is not here. We have with us Joe Eames. JOE: Hey everybody! JAMISON: Tim Caswell. TIM: Hello. JAMISON: And we have two special guests. I'm going to mangle your names, so I'm sorry. It’s Misko Hevery. MISKO: Misko Hevery. Yeah, thank you. JAMISON: Misko Hevery and Igor Minar? IGOR: Minar. Yeah. JAMISON: Great. You guys wanna introduce yourself really quick? MISKO: Sure. So, this is Misko Hevery, original creator of Angular.js. IGOR: Hi everybody! I'm Igor. I joined Misko about 2 years ago on this venture of creating better browser and better environment for creating client-side applications. JAMISON: And if you can’t tell, we are going to talk about Angular.js this week. So, I know it is kind of a Google project now. Did it start out that way? MISKO: It started out with something I was working on and eventually I've open sourced it at a product with Google internal application and just gotten such a rave reviews and new features that people actually says, “Hey why don’t you work on this full time and turn in on to a real product?” So, that's how it’s started. JAMISON: Oh, wow. So, there’s actually a team in Google who are working on Angular as their job? MISKO: Yeah. IGOR: Yes. JAMISON: That's awesome. IGOR: It’s just two of us here now, but we have a bunch of other people working full time on Angular.js and also main contributors-- JAMISON: Oh, go ahead sorry. IGOR: There is a team behind Angular.js. JAMISON: Do you think you can give an overview and kind of a comparison to contrast Angular to some of the other MVC frameworks that people like before you? I mean, Backbone I guess is what most people know. So, what makes Angular different from Backbone? How does it work? MISKO: So, I have never used Backbone besides it’s framework. But, my understanding is that Backbone is basically you have declare model and then launch on changes on its mode. And the way it does so is that there is a model class object. And whenever you modify the models that use special getters and setters methods, the Backbone know about the changes. So, this is pretty different from Angular because we don’t require you to inherit from anything. We have special getters and setters. Basically, any JavaScript object can be a model. So, that’s one big difference. JAMISON: But you can still observe the changes on objects like that? MISKO: Right.
Misko Hevery is the Chief Technology Officer at Builder.io. He is also the creator of Angular.io, known for zone.js, and helped co-create karma. He returns to the show to discuss "Qwik" in greater detail alongside AJ and Steve. No matter how complex your website is, Qwik provides the fastest possible page load times. In contrast to other frameworks, Qwik has special features that make it more user-friendly.About This EpisodeHow Qwik addresses any issueDifferent Qwik features that make it convenient and efficient to useOverview of precision lazy-loadingIntroduction to MitosisSponsorsChuck's Resume TemplateDeveloper Book Club starting with Clean Architecture by Robert C. MartinBecome a Top 1% Dev with a Top End Devs MembershipLinksQwikPapanasi UI LibraryMitosis FiddleBuilder.io and Qwik - JSJ 540Qwik with Misko Hevery - JSJ 549PicksAJ - Vornado heatersAJ - Replacement Parts for Office ChairsMisko - Flux | Where the world builds hardwareSupport this podcast at — https://redcircle.com/javascript-jabber/donationsAdvertising Inquiries: https://redcircle.com/brandsPrivacy & Opt-Out: https://redcircle.com/privacy