Michele Riva
Senior Software Architect @NearForm
Google Developer Expert
Microsoft MVP
MicheleRivaCode
Build scalable, high performances and modern web applications using Next.js, the React framework for production
MicheleRivaCode
MicheleRivaCode
MicheleRivaCode
Client-side rendering (CSR)
MicheleRivaCode
Client-side rendering (CSR)
MicheleRivaCode
MicheleRivaCode
Server-side Rendering (SSR)
MicheleRivaCode
MicheleRivaCode
Static-site generation (SSG)
MicheleRivaCode
*can be fixed via incremental static regeneration (ISR)
MicheleRivaCode
MicheleRivaCode
Client-side rendering
MicheleRivaCode
Server-side rendering
MicheleRivaCode
Static site generation
MicheleRivaCode
MicheleRivaCode
MicheleRivaCode
MicheleRivaCode
MicheleRivaCode
MicheleRivaCode
MicheleRivaCode
MicheleRivaCode
MicheleRivaCode
git clone git@github.com:micheleriva/high-performance-nextjs-workshop.git
MicheleRivaCode
npm i -g autocannon
MicheleRivaCode
- Build the Next.js app
- Run autocannon against it
- Change getServerSideProps into getStaticProps
- Run autocannon again
- Compare results
15min
MicheleRivaCode
npm i -g clinic
MicheleRivaCode
- Build the Next.js app
- Run the script below
- Comment the results
clinic doctor \
--autocannon [ http://localhost:3000 -c 500 -d 30 ] \
-- node node_modules/.bin/next start
15min
MicheleRivaCode
- Create a new page for each product
- Which rendering method will you use?
30min
MicheleRivaCode
MicheleRivaCode
You have to write a social network webapp.
The homepage is common for every user, content changes depending on the logged-in user.
MicheleRivaCode
Write an ADR to determine the best strategy for rendering the homepage
Template: https://adr.github.io/madr/examples.html#long-version
20min
MicheleRivaCode
Write an ADR to determine the best strategy for rendering a single post page
Template: https://adr.github.io/madr/examples.html#long-version
20min
MicheleRivaCode
Write an ADR to determine the best strategy for rendering the private "account" page
Template: https://adr.github.io/madr/examples.html#long-version
20min
MicheleRivaCode
You have to write an e-commerce webapp.
The homepage needs to be SEO compliant and fast.
Content changes from time to time (one every 2 days).
MicheleRivaCode
Write an ADR to determine the best strategy for rendering the e-commerce homepage
Template: https://adr.github.io/madr/examples.html#long-version
20min
MicheleRivaCode
Write an ADR to determine the best strategy for rendering the single product page
Template: https://adr.github.io/madr/examples.html#long-version
20min
MicheleRivaCode
Write an ADR to determine the best strategy for rendering the private "account" page
Template: https://adr.github.io/madr/examples.html#long-version
10min
MicheleRivaCode
MicheleRivaCode
@MicheleRiva
@MicheleRivaCode
/in/MicheleRiva95
www.micheleriva.dev