Building WebApps That Light Up the Internet with QwikCity

Rate this content
Bookmark
Github

Building instant-on web applications at scale have been elusive. Real-world sites need tracking, analytics, and complex user interfaces and interactions. We always start with the best intentions but end up with a less-than-ideal site.


QwikCity is a new meta-framework that allows you to build large-scale applications with constant startup-up performance. We will look at how to build a QwikCity application and what makes it unique. The workshop will show you how to set up a QwikCitp project. How routing works with layout. The demo application will fetch data and present it to the user in an editable form. And finally, how one can use authentication. All of the basic parts for any large-scale applications.


Along the way, we will also look at what makes Qwik unique, and how resumability enables constant startup performance no matter the application complexity.

Miško Hevery
Miško Hevery
170 min
12 Jun, 2023

Comments

Sign in or register to post your comment.

Video Summary and Transcription

Quick is a framework that focuses on performance optimization and reducing JavaScript overload in websites. It allows for lazy loading of components and efficient downloading and execution of code. Quick integrates with various tools and platforms, including Auth.js, Superbase, and headless CMS. It provides features like client-side navigation, route loaders, and the ability to fetch and update data. Quick's rendering paradigm makes every application instantly interactive, and React-Quickify allows for the use of existing React components in Quick applications.

1. Introduction to Quick and Performance Optimization

Short description:

Hello, my name is Misko and I'm the CTO of builder.io. I work on projects like Angular JS, Karma, and Quick. Builder.io is a headless visual CMS that allows for a drag and drop editor. We focus on open source projects like Party Town and Mitoses. The world needs a new framework because existing websites have poor performance due to the amount of JavaScript. We need a framework that doesn't overwhelm the browser with JavaScript. Service site rendering and reasonability are two approaches to improve performance by reducing duplicate information and downloading less JavaScript.

Hello, how's it going? Hi, my name is Misko. I'm the CTO of builder.io and I work on other projects, Angular JS and Karma and now I work on a project called Quick.

And so, before I tell you about Quick, just a little quick overview. So builder.io is a headless visual CMS. Basically what we allow you to do is to have a drag and drop editor for your application so that your marketing people can design the website without constantly bugging the engineering department about all the changes they have to do. And the cool thing about it is that it's running on your infrastructure rather than being hosted somewhere else. Because it's running on your infrastructure you can register your own components. Anyways, here is kind of their open source theme. So builder is about 50 people. Actually, we're probably pushing 55 at this point. And we love open source. And so we have a couple of projects besides Quick which is Party Town and Mitoses. Party Town is for running your third-party code like Google Analytics inside of web workers. And Mitoses allows you to make design systems, existing components that your company needs. And then it translates them into all major frameworks for you so you can have a native version of React, a native version of Angular components, and Quick web components, React Salt, whichever one you can imagine. So this is our team working at it. Adam Bradley used to work at Ionic. And Manuel also worked in Ionic and created Gin. And we have some Jabber who also worked at Mitoses. So that's kind of the open source we focus on.

And so the question then becomes, why does the world need a new framework? And the answer for that is, well, because if you look at the existing websites, the performance of these websites is not that great. So Google has spent a lot of time making sure that kind of trying to encourage the world to create faster websites. The way they do this is they create something called Core Web Vitals and a Lighthouse score, a PageSpeed score, and they're trying to basically show you how performant your website is. Core Web Vitals is actually instrumenting in Chrome. So it's a real world user experience. And it basically shows how interactive, you know, how well the user experience is. And as you can see, most websites don't have a very good Core Web Vitals numbers. And even the companies that try really, really hard, like Amazon, you know, they get much, much better, but they don't have the best numbers. And so the question is, like, why is this? You know, why are we having so much trouble? And the thing I'm gonna try to convince you is that it really comes down to the amount of JavaScript. And so the more JavaScript you have on your website, the slower the website becomes. And that's kind of obvious. You know, it's not really that difficult to imagine why that would be the case. And so the thing we're trying to figure out is how do you build, I mean, you need JavaScript, right? Because JavaScript is the thing that makes the webpages interactive. And so if you don't have JavaScript, your pages are not interactive. So the question becomes, like, how do you, oops, how do you design websites so that you can use JavaScript to build them, but at the same time don't overwhelm the end user with all of the code. Rather don't overwhelm the browser. And so this graph really shows that, like, over the years, we just keep shipping more and more JavaScript because we expect more out of our websites today than we had ten years ago. We expect a lot more interactivity, a lot better user experience. And all of that requires JavaScript, right? I'm here saying that we need less, but not in the form of like, you know, write less JavaScript and go back ten years. That's unrealistic. Instead I'm saying, hey, let's keep writing JavaScript, but like, how about we design a framework so they don't overwhelm the browser with all this JavaScript? So instead of dumping all the JavaScript all at once on the user, you know, could we have framework where the JavaScript kind of shows up on an as needed basis rather than overwhelming the whole system all at once? Okay. And so this is another chart. And it basically shows the same information. So it shows that on the left-hand side, you can see the scores and on the right-hand side, you can see the amount of JavaScript that is being shipped. And what you can see is that there is an inverse relationship, right? The more JavaScript we ship, the worse the performance is. And the less JavaScript we ship, the better the performance is. And so it all comes down to shipping less JavaScript. And if you look at the Core Web Vitals that the Google page speed gives you, it's the same kind of a story in the sense that the Google will oftentimes recommend that, hey, you know, can you ship less JavaScript. The hard part is how exactly do you do that? And so the thing I'm trying to convince you or rather kind of share with you is that if look at history of how we got here, you're going to realize that hydration is a bit of a workout. Here's what I mean by that. So first we sent HTML and then we originally had blank page. And the blank page had a script inside of it that downloaded JavaScript which then executed the application, which then rendered the application and this is where you had your app shown and you can interact with it. And so the problem is there's this white blank page. And people said, you know what, we really like the fact that it's super interactive, but this white page over here is problematic. So can we do something about it? And so what they created is a service app. So in the service app rendering, the HTML is much bigger, but as a result, instead of having a blank page, you actually have the page that you see. And so the site appears faster, but this site is not interactive. You can't click on it. So you still have to download the JavaScript. You still have to execute the application and you still have to render it, except this time we're going to call it reconciliation because we're trying to reuse the DOM elements. And then so at this point, you actually have a site that you can click on. And so service site rendering has this interesting contradiction where the site appears faster, but it actually is slower to get it to interact with. And so this is kind of the situation we have. And so instead oh, yeah, I want to point out that there's a lot of duplicated information. If you look at this visually built on your text stack, this string is found both inside of the HTML and inside of JavaScript. There's duplication going on. And so we'd like to have something some other way of doing it. And so I'm going to skip a couple of slides and I'm going to show you what reasonability is. So reasonability, basically, does something differently. So you start with the HTML. The HTML is big. And as a result, you have the page here. But the unique thing about reasonability is that there is a listener that knows how to interact with the page. So already you can interact with the page at this moment. Now you still need JavaScript. So the application appears faster. And so you eagerly start to download the JavaScript immediately as you show up. But here's the thing. Notice all this missing JavaScript. So the amount of JavaScript you download is a lot less. And that's because reasonability can actually remove duplicate information. Right here you have JavaScript for interactivity. But all of this was basically the static information that's already found in the HTML. And so this removing of duplication means that you don't have to re-execute the application. You don't have to re-render the application. And so you can just interact it way, way faster. Okay, I think this is kind of a good introduction. So I'm going to pause here. And then we're going to use this to build some application. But first, I want to see if people have questions.

2. Introduction and Workshop Setup

Short description:

We have a person from Slovakia. Any questions or should we jump in and try to build something with Quick and see how different? Here is the URL for the workshop. You can follow along and ask me questions. The link is also available in the chat room and the discord channel.

Oh, there's somebody in the chat. There we go. Is the darkness. OK, so we have a person from Slovakia. Awesome. Any questions or should we jump in and try to build something with Quick and see how different? All right. I'm going to take the silence. It has no questions. So here is the URL. the URL inside of the the I can paste it here instead of the chat window. But I also pasted it inside of the good nation. Discord channel so you can follow along. OK, so all of the steps for this workshop you can find this URL and we're going to go over it together. You're welcome to follow along and ask me questions, etc. Somebody says again, I'm not sure I understand. Which mean by again? Oh, the link again. Oh, I see. Oh, because I only sent it to a specific person. Oops, sorry. So here's the link in the chat room. And the link is also available if you go to the discord right here.

Watch more workshops on topic

React Performance Debugging Masterclass
React Summit 2023React Summit 2023
170 min
React Performance Debugging Masterclass
Top Content
Featured WorkshopFree
Ivan Akulov
Ivan Akulov
Ivan’s first attempts at performance debugging were chaotic. He would see a slow interaction, try a random optimization, see that it didn't help, and keep trying other optimizations until he found the right one (or gave up).
Back then, Ivan didn’t know how to use performance devtools well. He would do a recording in Chrome DevTools or React Profiler, poke around it, try clicking random things, and then close it in frustration a few minutes later. Now, Ivan knows exactly where and what to look for. And in this workshop, Ivan will teach you that too.
Here’s how this is going to work. We’ll take a slow app → debug it (using tools like Chrome DevTools, React Profiler, and why-did-you-render) → pinpoint the bottleneck → and then repeat, several times more. We won’t talk about the solutions (in 90% of the cases, it’s just the ol’ regular useMemo() or memo()). But we’ll talk about everything that comes before – and learn how to analyze any React performance problem, step by step.
(Note: This workshop is best suited for engineers who are already familiar with how useMemo() and memo() work – but want to get better at using the performance tools around React. Also, we’ll be covering interaction performance, not load speed, so you won’t hear a word about Lighthouse 🤐)
Back to the Roots With Remix
React Summit 2023React Summit 2023
106 min
Back to the Roots With Remix
Featured Workshop
Alex Korzhikov
Pavlik Kiselev
2 authors
The modern web would be different without rich client-side applications supported by powerful frameworks: React, Angular, Vue, Lit, and many others. These frameworks rely on client-side JavaScript, which is their core. However, there are other approaches to rendering. One of them (quite old, by the way) is server-side rendering entirely without JavaScript. Let's find out if this is a good idea and how Remix can help us with it?
Prerequisites- Good understanding of JavaScript or TypeScript- It would help to have experience with React, Redux, Node.js and writing FrontEnd and BackEnd applications- Preinstall Node.js, npm- We prefer to use VSCode, but also cloud IDEs such as codesandbox (other IDEs are also ok)
Next.js 13: Data Fetching Strategies
React Day Berlin 2022React Day Berlin 2022
53 min
Next.js 13: Data Fetching Strategies
Top Content
WorkshopFree
Alice De Mauro
Alice De Mauro
- Introduction- Prerequisites for the workshop- Fetching strategies: fundamentals- Fetching strategies – hands-on: fetch API, cache (static VS dynamic), revalidate, suspense (parallel data fetching)- Test your build and serve it on Vercel- Future: Server components VS Client components- Workshop easter egg (unrelated to the topic, calling out accessibility)- Wrapping up
React Performance Debugging
React Advanced Conference 2023React Advanced Conference 2023
148 min
React Performance Debugging
Workshop
Ivan Akulov
Ivan Akulov
Ivan’s first attempts at performance debugging were chaotic. He would see a slow interaction, try a random optimization, see that it didn't help, and keep trying other optimizations until he found the right one (or gave up).
Back then, Ivan didn’t know how to use performance devtools well. He would do a recording in Chrome DevTools or React Profiler, poke around it, try clicking random things, and then close it in frustration a few minutes later. Now, Ivan knows exactly where and what to look for. And in this workshop, Ivan will teach you that too.
Here’s how this is going to work. We’ll take a slow app → debug it (using tools like Chrome DevTools, React Profiler, and why-did-you-render) → pinpoint the bottleneck → and then repeat, several times more. We won’t talk about the solutions (in 90% of the cases, it’s just the ol’ regular useMemo() or memo()). But we’ll talk about everything that comes before – and learn how to analyze any React performance problem, step by step.
(Note: This workshop is best suited for engineers who are already familiar with how useMemo() and memo() work – but want to get better at using the performance tools around React. Also, we’ll be covering interaction performance, not load speed, so you won’t hear a word about Lighthouse 🤐)
Master JavaScript Patterns
JSNation 2024JSNation 2024
145 min
Master JavaScript Patterns
Workshop
Adrian Hajdin
Adrian Hajdin
During this workshop, participants will review the essential JavaScript patterns that every developer should know. Through hands-on exercises, real-world examples, and interactive discussions, attendees will deepen their understanding of best practices for organizing code, solving common challenges, and designing scalable architectures. By the end of the workshop, participants will gain newfound confidence in their ability to write high-quality JavaScript code that stands the test of time.
Points Covered:
1. Introduction to JavaScript Patterns2. Foundational Patterns3. Object Creation Patterns4. Behavioral Patterns5. Architectural Patterns6. Hands-On Exercises and Case Studies
How It Will Help Developers:
- Gain a deep understanding of JavaScript patterns and their applications in real-world scenarios- Learn best practices for organizing code, solving common challenges, and designing scalable architectures- Enhance problem-solving skills and code readability- Improve collaboration and communication within development teams- Accelerate career growth and opportunities for advancement in the software industry
High-performance Next.js
React Summit 2022React Summit 2022
50 min
High-performance Next.js
Workshop
Michele Riva
Michele Riva
Next.js is a compelling framework that makes many tasks effortless by providing many out-of-the-box solutions. But as soon as our app needs to scale, it is essential to maintain high performance without compromising maintenance and server costs. In this workshop, we will see how to analyze Next.js performances, resources usage, how to scale it, and how to make the right decisions while writing the application architecture.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

A Guide to React Rendering Behavior
React Advanced Conference 2022React Advanced Conference 2022
25 min
A Guide to React Rendering Behavior
Top Content
React is a library for "rendering" UI from components, but many users find themselves confused about how React rendering actually works. What do terms like "rendering", "reconciliation", "Fibers", and "committing" actually mean? When do renders happen? How does Context affect rendering, and how do libraries like Redux cause updates? In this talk, we'll clear up the confusion and provide a solid foundation for understanding when, why, and how React renders. We'll look at: - What "rendering" actually is - How React queues renders and the standard rendering behavior - How keys and component types are used in rendering - Techniques for optimizing render performance - How context usage affects rendering behavior| - How external libraries tie into React rendering
Building Better Websites with Remix
React Summit Remote Edition 2021React Summit Remote Edition 2021
33 min
Building Better Websites with Remix
Top Content
Remix is a new web framework from the creators of React Router that helps you build better, faster websites through a solid understanding of web fundamentals. Remix takes care of the heavy lifting like server rendering, code splitting, prefetching, and navigation and leaves you with the fun part: building something awesome!
Speeding Up Your React App With Less JavaScript
React Summit 2023React Summit 2023
32 min
Speeding Up Your React App With Less JavaScript
Top Content
Too much JavaScript is getting you down? New frameworks promising no JavaScript look interesting, but you have an existing React application to maintain. What if Qwik React is your answer for faster applications startup and better user experience? Qwik React allows you to easily turn your React application into a collection of islands, which can be SSRed and delayed hydrated, and in some instances, hydration skipped altogether. And all of this in an incremental way without a rewrite.
Full Stack Documentation
JSNation 2022JSNation 2022
28 min
Full Stack Documentation
Top Content
Interactive web-based tutorials have become a staple of front end frameworks, and it's easy to see why — developers love being able to try out new tools without the hassle of installing packages or cloning repos.But in the age of full stack meta-frameworks like Next, Remix and SvelteKit, these tutorials only go so far. In this talk, we'll look at how we on the Svelte team are using cutting edge web technology to rethink how we teach each other the tools of our trade.
React Concurrency, Explained
React Summit 2023React Summit 2023
23 min
React Concurrency, Explained
Top Content
React 18! Concurrent features! You might’ve already tried the new APIs like useTransition, or you might’ve just heard of them. But do you know how React 18 achieves the performance wins it brings with itself? In this talk, let’s peek under the hood of React 18’s performance features: - How React 18 lowers the time your page stays frozen (aka TBT) - What exactly happens in the main thread when you run useTransition() - What’s the catch with the improvements (there’s no free cake!), and why Vue.js and Preact straight refused to ship anything similar
SolidJS: Why All the Suspense?
JSNation 2023JSNation 2023
28 min
SolidJS: Why All the Suspense?
Top Content
Solid caught the eye of the frontend community by re-popularizing reactive programming with its compelling use of Signals to render without re-renders. We've seen them adopted in the past year in everything from Preact to Angular. Signals offer a powerful set of primitives that ensure that your UI is in sync with your state independent of components. A universal language for the frontend user interface.
But what about Async? How do we manage to orchestrate data loading and mutation, server rendering, and streaming? Ryan Carniato, creator of SolidJS, takes a look at a different primitive. One that is often misunderstood but is as powerful in its use. Join him as he shows what all the Suspense is about.