parasocial

feedback

Youtube profile pic for dev talk: anatomy of a modern web application

dev talk: anatomy of a modern web application

back
A youtube thumbnail wor dev talk: anatomy of a modern web application

[00:14 - 00:37]Lecture on web engineering with guest lecture from Christian Sito

A youtube thumbnail wor dev talk: anatomy of a modern web application

[00:38 - 00:44]Discussion on topics not covered in class such as scaling applications and dealing with databases

A youtube thumbnail wor dev talk: anatomy of a modern web application

[01:14 - 01:24]Q&A session for feedback on current semester and plans for next year's class

A youtube thumbnail wor dev talk: anatomy of a modern web application

[01:26 - 01:33]Christian Sito's background in web development and projects he has worked on

A youtube thumbnail wor dev talk: anatomy of a modern web application

[03:09 - 03:19]Examples of Christian's projects, including a film festival verification app, a web app for a popular streamer, and a political questionnaire app

A youtube thumbnail wor dev talk: anatomy of a modern web application

[04:52 - 05:01]Details on the political questionnaire app, including the inspiration from a similar project and the technology used (TypeScript, React, Next.js, MySQL, Prisma, Tailwind CSS)

A youtube thumbnail wor dev talk: anatomy of a modern web application

[08:07 - 08:21]Discussion on the data model and querying data from MySQL using SQL

A youtube thumbnail wor dev talk: anatomy of a modern web application

[08:49 - 09:08]Explanation of Prisma and its use for interacting with databases in JavaScript/TypeScript, defining database schema, handling migrations, and maintaining type safety

A youtube thumbnail wor dev talk: anatomy of a modern web application

[00:00 - 09:15]Lecture on web engineering with guest lecture from Christian Sito, who discusses his background and various projects he has worked on, including a political questionnaire app using TypeScript, React, Next.js, MySQL, Prisma, and Tailwind CSS. The app received significant usage and media coverage.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[09:15 - 09:25] Every column in a table has a data type, such as string, integer, or date, which can catch 25-30% of bugs.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[11:48 - 11:55]Querying data with Prisma is simple and readable.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[14:11 - 14:21]Invalid data types will result in a types of error.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[14:58 - 15:12]Prisma will compile a statement down to SQL.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[14:58 - 15:12]Rendering is executing the view code with data to create the user interface.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[16:07 - 16:14]Prisma does internal optimization to make the experience faster for the database.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[16:16 - 16:29]Routing and rendering are core parts of the web experience.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[16:16 - 16:29]Routing is the URL which defines what data to fetch and what view code to render.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[17:08 - 17:24]Dynamic servers allowed for dynamic generation of HTML based on routes and data sources.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[17:08 - 17:24]Server-side rendering serves a complete HTML page to the client, which then executes a JavaScript bundle for rendering and interactions.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[17:45 - 17:58]Routing and rendering can happen on the server or client.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[17:45 - 17:58]There are several paradigms for web rendering.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[17:45 - 17:58]Client-side rendering became popular to improve speed and user experience.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[17:45 - 17:58]The latest iteration is server-side rendering with partial hydration, where only necessary components are sent to the client for rendering.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[17:45 - 17:58]The pros of client-side rendering include not needing a server for rendering and the server acting as a lightweight file CDN.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[17:59 - 18:04]In the beginning, there were just static files.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[09:15 - 18:13]The overall evolution of web rendering has been from static files to dynamic servers to client-side rendering to server-side rendering with partial hydration.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[18:26 - 18:43]CDN is responsible for hosting files and serving them quickly

A youtube thumbnail wor dev talk: anatomy of a modern web application

[22:16 - 22:25]CDN locations can be all over the world for faster response times

A youtube thumbnail wor dev talk: anatomy of a modern web application

[25:31 - 25:37]Data fetching can take time, resulting in a slow first page load

A youtube thumbnail wor dev talk: anatomy of a modern web application

[27:28 - 27:35]Server-side rendering splits responsibility between browser and server

A youtube thumbnail wor dev talk: anatomy of a modern web application

[27:28 - 27:35]Server will match route, fetch data, and use React to render and send to client

A youtube thumbnail wor dev talk: anatomy of a modern web application

[27:28 - 27:35]Cons: more complex mental model, need for servers and potential cost

A youtube thumbnail wor dev talk: anatomy of a modern web application

[27:36 - 27:51]Not optimized for search engines, as Google expects valid HTML within first two seconds

A youtube thumbnail wor dev talk: anatomy of a modern web application

[27:36 - 27:51]Client downloads HTML with valid data, executes JavaScript for further interactions

A youtube thumbnail wor dev talk: anatomy of a modern web application

[27:36 - 27:51]Pros: fast initial response of actual data, optimized for search engines

A youtube thumbnail wor dev talk: anatomy of a modern web application

[27:51 - 28:02]Browser requests index page, server returns HTML, CSS, and JavaScript

A youtube thumbnail wor dev talk: anatomy of a modern web application

[27:51 - 28:02]Browser downloads empty HTML and renders it, React takes over and fetches data

A youtube thumbnail wor dev talk: anatomy of a modern web application

[27:51 - 28:02]This switch from dynamic servers is cost-effective and has a simple mental model

A youtube thumbnail wor dev talk: anatomy of a modern web application

[27:51 - 28:02]React component is returned and rendered on the server, with HTML and JavaScript response

A youtube thumbnail wor dev talk: anatomy of a modern web application

[28:03 - 28:19]Cannot access private data directly, must leave API keys and credentials in server rendering

A youtube thumbnail wor dev talk: anatomy of a modern web application

[28:03 - 28:19]Next.js is a progressive and cutting edge framework for routing and rendering

A youtube thumbnail wor dev talk: anatomy of a modern web application

[28:03 - 28:19]Routes are defined in the file system, with parameters specified in the function

A youtube thumbnail wor dev talk: anatomy of a modern web application

[28:03 - 28:19]Data is fetched from the database using Prisma

A youtube thumbnail wor dev talk: anatomy of a modern web application

[28:03 - 28:19]If candidate not found, routing stops and shows a 404 page

A youtube thumbnail wor dev talk: anatomy of a modern web application

[28:03 - 28:19]First request is full URL, subsequent requests are a special HTTP GET route from Next.js

A youtube thumbnail wor dev talk: anatomy of a modern web application

[18:14 - 28:19]CDN hosts files for fast response times, browser requests index page and server returns HTML, CSS, and JS. React takes over and fetches data for rendering. Server-side rendering splits responsibility, routes defined in file system, data fetched from database, and React component returned for rendering. First request is full URL, subsequent requests are a special route.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[28:19 - 28:26] After second request, all on client in service rendering

A youtube thumbnail wor dev talk: anatomy of a modern web application

[28:34 - 28:40]Components mostly rendered on server and never sent to client

A youtube thumbnail wor dev talk: anatomy of a modern web application

[28:41 - 28:53]Components can fetch data directly from database because code never sent to client

A youtube thumbnail wor dev talk: anatomy of a modern web application

[28:54 - 29:06]React Server Components allow defining of async functions to run on server and not sent to client

A youtube thumbnail wor dev talk: anatomy of a modern web application

[29:17 - 29:34]Questionnaire component rendered on client and gets data from React Server component for server-side rendering

A youtube thumbnail wor dev talk: anatomy of a modern web application

[29:52 - 30:00]Caching is important for scaling applications to hundreds of thousands of users

A youtube thumbnail wor dev talk: anatomy of a modern web application

[30:02 - 30:16]Caching means saving expensive data into a place for quick and cheap access

A youtube thumbnail wor dev talk: anatomy of a modern web application

[30:18 - 30:25]Next.js allows for defining caching strategies for pages and fetches

A youtube thumbnail wor dev talk: anatomy of a modern web application

[30:35 - 30:41]Strategies include static, dynamic, and revalidate

A youtube thumbnail wor dev talk: anatomy of a modern web application

[30:42 - 30:52]Static means data fetched once on deployment and never refetched

A youtube thumbnail wor dev talk: anatomy of a modern web application

[31:00 - 31:08]Dynamic means fresh data fetched for every request

A youtube thumbnail wor dev talk: anatomy of a modern web application

[31:20 - 31:31]Revalidate sets interval for data to be cached and updated in the background

A youtube thumbnail wor dev talk: anatomy of a modern web application

[35:24 - 35:32]Serverless functions abstract away the idea of servers and spin up new instances for each request

A youtube thumbnail wor dev talk: anatomy of a modern web application

[36:14 - 36:24]Pro of serverless functions is only using necessary compute for each request

A youtube thumbnail wor dev talk: anatomy of a modern web application

[36:14 - 36:24]Serverless functions have more control than platform as a service

A youtube thumbnail wor dev talk: anatomy of a modern web application

[36:32 - 36:37]Useful for applications with few users

A youtube thumbnail wor dev talk: anatomy of a modern web application

[36:47 - 36:58]Platform as a service allows for more freedom in organizing files and code

A youtube thumbnail wor dev talk: anatomy of a modern web application

[36:47 - 36:58]Platform as a service may also have a run time for applications

A youtube thumbnail wor dev talk: anatomy of a modern web application

[28:19 - 37:45]After second request, all on client in service rendering. Components mostly rendered on server and can fetch data from database. Caching is important for scaling and Next.js allows for defining strategies. Serverless functions abstract away servers and only use necessary compute. Platform as a service provides more freedom for code and file organization.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[37:45 - 37:52] Temporary compute environments used to be more restricted

A youtube thumbnail wor dev talk: anatomy of a modern web application

[44:34 - 44:46]Caching may not be possible with serverless functions

A youtube thumbnail wor dev talk: anatomy of a modern web application

[46:28 - 46:37]Caching may be done by a CDN

A youtube thumbnail wor dev talk: anatomy of a modern web application

[46:38 - 46:48]Vercel used for serverless functions and CDN

A youtube thumbnail wor dev talk: anatomy of a modern web application

[46:49 - 46:57]Technology has progressed, allowing for easier use of temporary compute environments

A youtube thumbnail wor dev talk: anatomy of a modern web application

[46:49 - 46:57]Platform as a service (PaaS) provides a runtime that automatically scales

A youtube thumbnail wor dev talk: anatomy of a modern web application

[46:49 - 46:57]Cold starts are a common issue with serverless functions

A youtube thumbnail wor dev talk: anatomy of a modern web application

[46:49 - 46:57]Land of functions have a warm phase to improve response time

A youtube thumbnail wor dev talk: anatomy of a modern web application

[46:49 - 46:57]Database scaling using a platform called planet scale

A youtube thumbnail wor dev talk: anatomy of a modern web application

[46:58 - 47:10]Two types of serverless functions: Lambda functions and edge functions

A youtube thumbnail wor dev talk: anatomy of a modern web application

[47:30 - 47:39]Hosting costs estimated at around 210,000 page views and 500,000 requests in a month

A youtube thumbnail wor dev talk: anatomy of a modern web application

[37:45 - 47:49]Temporary compute environments have become more accessible and advanced, with PaaS providing automatic scaling and options for caching through CDNs. Serverless functions have two types, Lambda and edge, with the former having a warm phase to improve response time but the latter being quicker and cheaper. Database scaling is done through planet scale, while hosting is managed through Vercel.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[47:50 - 47:56] Person talks about getting 100 euros and asking for other questions or ideas

A youtube thumbnail wor dev talk: anatomy of a modern web application

[48:06 - 48:12]Mention of 20 euros, 150 euros, and zero cost for plans

A youtube thumbnail wor dev talk: anatomy of a modern web application

[48:13 - 48:19]Person discusses using Vercel plan and running multiple projects on it

A youtube thumbnail wor dev talk: anatomy of a modern web application

[48:13 - 48:19]Project discussed was around 2% usage of Vercel plan or possibly free

A youtube thumbnail wor dev talk: anatomy of a modern web application

[48:20 - 48:25]Plant scale was more expensive but still had a lot of room to grow

A youtube thumbnail wor dev talk: anatomy of a modern web application

[48:32 - 48:39]Possibility of reaching a million page views without leaving the free plan

A youtube thumbnail wor dev talk: anatomy of a modern web application

[48:42 - 48:50]Person hosted their website on a service for free and didn't have any servers

A youtube thumbnail wor dev talk: anatomy of a modern web application

[48:58 - 49:04]Only pay $20 a month for Vercel plan

A youtube thumbnail wor dev talk: anatomy of a modern web application

[49:04 - 49:11]Pro plan needed for selling a service

A youtube thumbnail wor dev talk: anatomy of a modern web application

[49:11 - 49:18]Can run a free project on the free plan

A youtube thumbnail wor dev talk: anatomy of a modern web application

[50:04 - 50:12]Can do this too, it's not hard and mostly free

A youtube thumbnail wor dev talk: anatomy of a modern web application

[50:12 - 50:18]Building things is fun and a great way to learn

A youtube thumbnail wor dev talk: anatomy of a modern web application

[50:54 - 50:59]Recommended tools: Next.js, Remix, Nux, Russell, Netlify, Cloudflare, Plan-scale, Super-base, Neon, Railway, Sadie, Postgres

A youtube thumbnail wor dev talk: anatomy of a modern web application

[52:31 - 52:40]Data and request can stay in EU by setting functions to run in specific locations

A youtube thumbnail wor dev talk: anatomy of a modern web application

[52:49 - 52:55]Different approaches to developing using services

A youtube thumbnail wor dev talk: anatomy of a modern web application

[54:59 - 55:06]Services all interconnected and accessible by URL

A youtube thumbnail wor dev talk: anatomy of a modern web application

[55:18 - 55:25]Can run all of this on your own

A youtube thumbnail wor dev talk: anatomy of a modern web application

[55:33 - 55:39]Database can be Postgres, Plan-scale, or SQLite

A youtube thumbnail wor dev talk: anatomy of a modern web application

[56:07 - 56:21]Latency for database is usually very quick

A youtube thumbnail wor dev talk: anatomy of a modern web application

[56:07 - 56:21]Data centers are in the same place and networking inside is very fast

A youtube thumbnail wor dev talk: anatomy of a modern web application

[56:38 - 56:49]Takes about 10 to 30 milliseconds for service function to get data from database

A youtube thumbnail wor dev talk: anatomy of a modern web application

[56:55 - 57:03]Can use different hosting services

A youtube thumbnail wor dev talk: anatomy of a modern web application

[47:50 - 57:22]Person discusses using free hosting services, recommended tools, and various options for databases and data privacy, emphasizing the ease and affordability of building and developing projects on these platforms.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[57:24 - 57:29]Experience with performance hits from cloud database

A youtube thumbnail wor dev talk: anatomy of a modern web application

[57:30 - 57:38]Importance of proper caching for database

A youtube thumbnail wor dev talk: anatomy of a modern web application

[57:47 - 57:53]List of 300+ developers to follow for resources

A youtube thumbnail wor dev talk: anatomy of a modern web application

[58:07 - 58:13]Personal recommendations for YouTubers and Twitch streamers

A youtube thumbnail wor dev talk: anatomy of a modern web application

[58:33 - 58:45]Benefits of attending local meetups for networking and job opportunities

A youtube thumbnail wor dev talk: anatomy of a modern web application

[59:30 - 59:38]Other considerations for choosing a serverless platform

A youtube thumbnail wor dev talk: anatomy of a modern web application

[59:30 - 59:38]Example of deploying a project using serverless

A youtube thumbnail wor dev talk: anatomy of a modern web application

[1.00:04 - 1.00:12]Serverless is ideal for simple applications with all necessary data within the code

A youtube thumbnail wor dev talk: anatomy of a modern web application

[1.00:28 - 1.00:36]Serverless becomes more complicated when integrating external data sources or needing asynchronous processing

A youtube thumbnail wor dev talk: anatomy of a modern web application

[1.01:32 - 1.01:38]Personal preference for serverless due to ease of use and cost-effectiveness

A youtube thumbnail wor dev talk: anatomy of a modern web application

[1.06:01 - 1.06:06]Personal experience with learning JavaScript and TypeScript

A youtube thumbnail wor dev talk: anatomy of a modern web application

[1.06:20 - 1.06:35]Flexibility in switching between providers without needing to change code

A youtube thumbnail wor dev talk: anatomy of a modern web application

[57:24 - 1.07:36]Speaker's experience, recommendations, and personal preference for serverless technology.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[1.07:48 - 1.07:58] The speaker talks about not wanting to rely on a single company for data and how Prisma makes it easy to switch databases.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[1.07:58 - 1.08:06]Prisma can generate a schema for different databases and handle queries and insertions automatically.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[1.10:27 - 1.10:33]The speaker mentions some common performance issues, such as not having foreign key functionality and not having the server and database in the same data center.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[1.11:34 - 1.11:42]The speaker emphasizes the importance of caching and optimizing images and scripts.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[1.12:01 - 1.12:08]The speaker shows a demo of building a full-stack Next.js app with Vercel and explains the importance of optimization for performance.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[1.12:44 - 1.12:50]The speaker explains how serverless functions work and how Vercel abstracts away the hosting process.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[1.12:44 - 1.12:50]The speaker shows an example of mapping endpoints to URLs for serverless functions.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[1.14:31 - 1.14:40]The speaker mentions the future of database offerings and how platforms will handle the storage of data.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[1.15:56 - 1.16:02]The speaker concludes the talk and thanks the audience for their questions.

A youtube thumbnail wor dev talk: anatomy of a modern web application

[1.07:36 - 1.16:13]The speaker summarizes the main points of the talk and thanks the audience for their attention.