SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
Stefan Adolf
Pump up the JAM with Gatsby
what‘s this field good for?
Please sendtemplates in openformats next time
pump up the JAM with
Gatsby
Generates super fast static PWAs
Stefan Adolf, Turbine Kreuzberg
Hello, I am
Stefan Adolf
Developer Ambassador
Foostack developer
Turbine Kreuzberg
@stadolf
#reactjs #mongodb #ethereum #codingberlin
# Apps #symfony #turbinejetzt #microservicesĐApps #symfony #turbinejetzt #microservices
A brief history of “CMS”
CMS Systems
Run software on
your own
infrastructure
Website build kits
Let a dentist create
her own website
without any knowledge
Flat file CMS
Render and cache
content server side
The do it yourself desaster
“Could you please add
this commerce
component and
change text to RTL?”
Let a 3rd
party shoot
in your foot
“Yet another
outdated server
template language
to learn”
Content smells past due
“Damn, someone
broke into my
Apache because I
forgot to upgrade
my Linux server”
Meet the JAM stack
Javascript APIs Markup
Javascript APIs Markup
JAM in a nutshell
 SPAs / PWAs
 Rich frontend applications (J/M)
 fetch, post & interpolate content when it’s needed
 All user interaction logic happens in frontend / JS
 Oh hello, I found a public API here.. .
Javascript APIs Markup
Static site generators
 Prebuild everything as static markup
 Deploy on a web server: painless & brainless
 Deploy on CDNs & edges
 API never needed at render time (only at build)
How “static site generators” work
Static page 1
Static page 2
Static page N
Optimized assets
./_site
Layout/pipeline
middleman
❍
creates layouts using erb
❍
provides content by json
❍
renders assets using gulp
❍
runs bundle exec middleman build on deployment
❍
upload results from ./build
jekyll
❍
creates layouts using liquid
❍
provides content by markdown
❍
renders assets using ruby-sass
❍
runs jekyll b on deployment
❍
upload results from ./_site
hugo
❍
creates layouts using go
❍
provides content by yaml
❍
renders assets using pipes
❍
runs hugo on deployment
❍
upload results from ./public
“Gatsby.js is a static Progressive Web App generator.”
“Don't build a website with last decade's tech.”
“Liberate your sites from legacy CMSs and fly into the future.”
gatsby
❍
creates layouts using React
❍
provides content by GraphQL
❍
renders “assets” using webpack
❍
runs gatsby build on deployment
❍
uploads results from ./public
❍
generates (re-)active PWA!
How Gatsby works
createNode
createPageStaticpagetransformers
Static page 1
Static page 2
Static page N
Content for 1
Content for 2
Optimized assets
./public
Most features are just plugged in
❍CMS / CMS API adapters
❐ Contentful, Wordpress, Craft, Drupal, Dropbox Paper, Directus, ButterCMS,
Ghost, Morty, cockpit, sulu, Transifex, Silverstripe,...
❍Filesystem based (“flat”) content
❐ Markdown, JSON, Yaml, CSV, toml,...
❍Database / API support
❐ Mongo, GSheets, Mysql, Dynamo,...
❐ Trello, Strapi, Instagram, Shopify,...
❍Transformer plugins
❐ Image processing (!)
❐ Markdown / MD / MDX
Pages, Layout & Routing
❍ components in src/pages render as page
❐ filename == URL
❐ Gatsby Link integrates with @reach/router
❍ React Helmet for metadata
❍ Supports allTM styling variants
❐ Sass compile steps (Bootstrap, Bulma)
❐ Component CSS
❐ Styled components (Grommet) & JSS
❍ createPageApi creates pages out of code / nodes
GraphQL
❍ Gatsby automatically infers GraphQL a schema
❐ all content sources become queryable data nodes
❍ Allows simple filtering of page data
❐ allTextFiles({filter: { content: { regex: “code”} } })
❍ StaticQuery hook for inline (“static”) page queries
createNode API
hvv-plugin/gatsby-node.js
Add any data source to Graphql
createNode
Create pages from nodes
gatsby-node.js
createPage API
templates/article.js
query details in page template
Frontmatter, JSON & MDX
❍Frontmatter: (meta)data in your MD files
❐ Becomes part of GraphQL schema queryable!→ queryable!
❍Use plain JSON files to store tabular data
❍MDX: embed React JSX components in MD, e.g for
❐ Slideshows
❐ Signups / interactive forms
❐ Dynamic advertisments
❐ Tweets & Youtube Videos, all inlined in content
Frontmatter
Markdown
JSX
MDX
data/some-meetup.mdx
MDX page template
templates/mdx.js
MDX
data/some-meetup.mdx
Unholy world of sh(i|or)tcodes
Gatsby Image / Sharp
pages/planets.js
Speed (frontend)
❍“performance isn’t optional, it’s built in”
❍inlines critical CSS
❍code/data splitting per route
❍Prefetch page data (JSON) on link hovers
❍offline support: service workers cache content
locally
Speed (backend)
❍All API queries are serialized in a Redux cache
❍Only impacts of changed data are rerendered
❍20.000 product pages = 180s (cold start)
~ 1000 pages/s = 20s for complete page build
❐ =3.5 min overall build
❐ =600M of statically generated output
❍Rebuilds = ~30s
Wrapup
❍ Not yet another “static site generator”
❐ content agnostic, GQL driven, React PWA SSR engine
❐ Forget all your server side performance issues
❍ connects to any CMS (even Wordpress) or DB
❍ Gatsby Image
❍ incredibly simple to deploy
❐ Just upload your files.
❐ Run npm install && gatsby build on your CD
Conclusion
Start using Gatsby today.
No excuses.
it’s really that great.
Thank you o/
Stefan Adolf
Turbine Kreuzberg
@stadolf
@elmariachi111
#reactjs #mongodb #ethereum #codingberlin
#elastic #symfony2 #turbinejetzt #microservices

Weitere ähnliche Inhalte

Was ist angesagt?

Serverless Big Data Architecture on Google Cloud Platform at Credit OK
Serverless Big Data Architecture on Google Cloud Platform at Credit OKServerless Big Data Architecture on Google Cloud Platform at Credit OK
Serverless Big Data Architecture on Google Cloud Platform at Credit OKKriangkrai Chaonithi
 
SitePrism vs PageObject
SitePrism vs PageObjectSitePrism vs PageObject
SitePrism vs PageObjectAnadea
 
The Next Generation Software Stack: Meteor
The Next Generation Software Stack: MeteorThe Next Generation Software Stack: Meteor
The Next Generation Software Stack: MeteorMongoDB
 
Confoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to startConfoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to startQuentin Adam
 
MongoDB for Oracle Experts - OUGF Harmony 2014
MongoDB for Oracle Experts - OUGF Harmony 2014 MongoDB for Oracle Experts - OUGF Harmony 2014
MongoDB for Oracle Experts - OUGF Harmony 2014 Henrik Ingo
 
Gutenberg Extended
Gutenberg ExtendedGutenberg Extended
Gutenberg ExtendedSören Wrede
 
Speedup Magento Website
Speedup Magento WebsiteSpeedup Magento Website
Speedup Magento WebsiteBeehexa
 
Ruby on Rails Workshop
Ruby on Rails WorkshopRuby on Rails Workshop
Ruby on Rails WorkshopYos Riady
 
Embracing Serverless with Google
Embracing Serverless with GoogleEmbracing Serverless with Google
Embracing Serverless with GoogleJoseph Lust
 
SilverStripe Modules for a Better Life
SilverStripe Modules for a Better LifeSilverStripe Modules for a Better Life
SilverStripe Modules for a Better LifeColin Richardson
 
Firebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overviewFirebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overviewJoseph Lust
 
Kubernetes & Google Container Engine @ mabl
Kubernetes & Google Container Engine @ mablKubernetes & Google Container Engine @ mabl
Kubernetes & Google Container Engine @ mablJoseph Lust
 
Through the looking glass an intro to scalable, distributed counting in data...
Through the looking glass  an intro to scalable, distributed counting in data...Through the looking glass  an intro to scalable, distributed counting in data...
Through the looking glass an intro to scalable, distributed counting in data...Geoff Cooney
 
Frontend performance on the web | Presentation @ecommercecamp 2019
Frontend performance on the web | Presentation @ecommercecamp 2019Frontend performance on the web | Presentation @ecommercecamp 2019
Frontend performance on the web | Presentation @ecommercecamp 2019dreistromland
 
How we build Videome
How we build VideomeHow we build Videome
How we build VideomeKane Zhu
 
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCampHow to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCampJesus Manuel Olivas
 

Was ist angesagt? (20)

Serverless Big Data Architecture on Google Cloud Platform at Credit OK
Serverless Big Data Architecture on Google Cloud Platform at Credit OKServerless Big Data Architecture on Google Cloud Platform at Credit OK
Serverless Big Data Architecture on Google Cloud Platform at Credit OK
 
SitePrism vs PageObject
SitePrism vs PageObjectSitePrism vs PageObject
SitePrism vs PageObject
 
The Next Generation Software Stack: Meteor
The Next Generation Software Stack: MeteorThe Next Generation Software Stack: Meteor
The Next Generation Software Stack: Meteor
 
Confoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to startConfoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to start
 
MongoDB for Oracle Experts - OUGF Harmony 2014
MongoDB for Oracle Experts - OUGF Harmony 2014 MongoDB for Oracle Experts - OUGF Harmony 2014
MongoDB for Oracle Experts - OUGF Harmony 2014
 
HTML5 and friends
HTML5 and friendsHTML5 and friends
HTML5 and friends
 
Gutenberg Extended
Gutenberg ExtendedGutenberg Extended
Gutenberg Extended
 
Speedup Magento Website
Speedup Magento WebsiteSpeedup Magento Website
Speedup Magento Website
 
Ruby on Rails Workshop
Ruby on Rails WorkshopRuby on Rails Workshop
Ruby on Rails Workshop
 
SnapyX - ParisJS
SnapyX - ParisJSSnapyX - ParisJS
SnapyX - ParisJS
 
Embracing Serverless with Google
Embracing Serverless with GoogleEmbracing Serverless with Google
Embracing Serverless with Google
 
CollegeDiveIn presentation
CollegeDiveIn presentationCollegeDiveIn presentation
CollegeDiveIn presentation
 
Lean and mean MongoDB
Lean and mean MongoDBLean and mean MongoDB
Lean and mean MongoDB
 
SilverStripe Modules for a Better Life
SilverStripe Modules for a Better LifeSilverStripe Modules for a Better Life
SilverStripe Modules for a Better Life
 
Firebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overviewFirebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overview
 
Kubernetes & Google Container Engine @ mabl
Kubernetes & Google Container Engine @ mablKubernetes & Google Container Engine @ mabl
Kubernetes & Google Container Engine @ mabl
 
Through the looking glass an intro to scalable, distributed counting in data...
Through the looking glass  an intro to scalable, distributed counting in data...Through the looking glass  an intro to scalable, distributed counting in data...
Through the looking glass an intro to scalable, distributed counting in data...
 
Frontend performance on the web | Presentation @ecommercecamp 2019
Frontend performance on the web | Presentation @ecommercecamp 2019Frontend performance on the web | Presentation @ecommercecamp 2019
Frontend performance on the web | Presentation @ecommercecamp 2019
 
How we build Videome
How we build VideomeHow we build Videome
How we build Videome
 
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCampHow to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
 

Ähnlich wie Gatsby (Code.Talks) 2019

Pump up the JAM with Gatsby
Pump up the JAM with GatsbyPump up the JAM with Gatsby
Pump up the JAM with GatsbyStefan Adolf
 
Modern Static Site with GatsbyJS
Modern Static Site with GatsbyJSModern Static Site with GatsbyJS
Modern Static Site with GatsbyJSRiza Fahmi
 
JS Fest 2019/Autumn. Александр Товмач. JAMstack
JS Fest 2019/Autumn. Александр Товмач. JAMstackJS Fest 2019/Autumn. Александр Товмач. JAMstack
JS Fest 2019/Autumn. Александр Товмач. JAMstackJSFestUA
 
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
Rob Tweed :: Ajax and the Impact on Caché and Similar TechnologiesRob Tweed :: Ajax and the Impact on Caché and Similar Technologies
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologiesgeorge.james
 
JAMstack with gatsby, contentful and netlify aka the dream stack
JAMstack with gatsby, contentful and netlify aka the dream stackJAMstack with gatsby, contentful and netlify aka the dream stack
JAMstack with gatsby, contentful and netlify aka the dream stackzonathen
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pagesNilesh Bafna
 
Magento Performance Optimization 101
Magento Performance Optimization 101Magento Performance Optimization 101
Magento Performance Optimization 101Angus Li
 
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるIt is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるSadaaki HIRAI
 
The Future Is The Cloud
The Future Is The CloudThe Future Is The Cloud
The Future Is The CloudGatsbyjs
 
Meetup Performance
Meetup PerformanceMeetup Performance
Meetup PerformanceGreg Whalin
 
Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Asher Martin
 
Where does Laravel fit in the Jamstack concept?
Where does Laravel fit in the Jamstack concept?Where does Laravel fit in the Jamstack concept?
Where does Laravel fit in the Jamstack concept?Tihomir Opačić
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Sadaaki HIRAI
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebJames Rakich
 
阅读类Web应用前端技术探索
阅读类Web应用前端技术探索阅读类Web应用前端技术探索
阅读类Web应用前端技术探索taobao.com
 
阅读类 Web 应用前端技术探索
阅读类 Web 应用前端技术探索阅读类 Web 应用前端技术探索
阅读类 Web 应用前端技术探索Yan Shi
 

Ähnlich wie Gatsby (Code.Talks) 2019 (20)

Pump up the JAM with Gatsby
Pump up the JAM with GatsbyPump up the JAM with Gatsby
Pump up the JAM with Gatsby
 
Modern Static Site with GatsbyJS
Modern Static Site with GatsbyJSModern Static Site with GatsbyJS
Modern Static Site with GatsbyJS
 
JS Fest 2019/Autumn. Александр Товмач. JAMstack
JS Fest 2019/Autumn. Александр Товмач. JAMstackJS Fest 2019/Autumn. Александр Товмач. JAMstack
JS Fest 2019/Autumn. Александр Товмач. JAMstack
 
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
Rob Tweed :: Ajax and the Impact on Caché and Similar TechnologiesRob Tweed :: Ajax and the Impact on Caché and Similar Technologies
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
 
JAMstack with gatsby, contentful and netlify aka the dream stack
JAMstack with gatsby, contentful and netlify aka the dream stackJAMstack with gatsby, contentful and netlify aka the dream stack
JAMstack with gatsby, contentful and netlify aka the dream stack
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
 
Always on! Or not?
Always on! Or not?Always on! Or not?
Always on! Or not?
 
Magento Performance Optimization 101
Magento Performance Optimization 101Magento Performance Optimization 101
Magento Performance Optimization 101
 
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるIt is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
 
The Future Is The Cloud
The Future Is The CloudThe Future Is The Cloud
The Future Is The Cloud
 
Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
 
Always on! ... or not?
Always on! ... or not?Always on! ... or not?
Always on! ... or not?
 
Meetup Performance
Meetup PerformanceMeetup Performance
Meetup Performance
 
Meetup Performance
Meetup PerformanceMeetup Performance
Meetup Performance
 
Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2
 
Where does Laravel fit in the Jamstack concept?
Where does Laravel fit in the Jamstack concept?Where does Laravel fit in the Jamstack concept?
Where does Laravel fit in the Jamstack concept?
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the Web
 
阅读类Web应用前端技术探索
阅读类Web应用前端技术探索阅读类Web应用前端技术探索
阅读类Web应用前端技术探索
 
阅读类 Web 应用前端技术探索
阅读类 Web 应用前端技术探索阅读类 Web 应用前端技术探索
阅读类 Web 应用前端技术探索
 

Mehr von Stefan Adolf

Blockchains - Technical foundations
Blockchains - Technical foundationsBlockchains - Technical foundations
Blockchains - Technical foundationsStefan Adolf
 
HOW TO SURVIVE A 2DAY HACKATHON?
HOW TO SURVIVE A 2DAY HACKATHON?HOW TO SURVIVE A 2DAY HACKATHON?
HOW TO SURVIVE A 2DAY HACKATHON?Stefan Adolf
 
Digitale Selbstbestimmung mit Hilfe dezentraler Technologien
Digitale Selbstbestimmung mit Hilfe dezentraler TechnologienDigitale Selbstbestimmung mit Hilfe dezentraler Technologien
Digitale Selbstbestimmung mit Hilfe dezentraler TechnologienStefan Adolf
 
Digitale Selbstbestimmung | Anwendungsfälle der Dezentralität
Digitale Selbstbestimmung | Anwendungsfälle der DezentralitätDigitale Selbstbestimmung | Anwendungsfälle der Dezentralität
Digitale Selbstbestimmung | Anwendungsfälle der DezentralitätStefan Adolf
 
Decentralized technology: a (short) survey
Decentralized technology: a (short) surveyDecentralized technology: a (short) survey
Decentralized technology: a (short) surveyStefan Adolf
 
Productive web applications that run only on the frontend
Productive web applications that run only on the frontendProductive web applications that run only on the frontend
Productive web applications that run only on the frontendStefan Adolf
 
DePA - die dezentrale Patientenakte (29.1. FU Berlin)
DePA - die dezentrale Patientenakte (29.1. FU Berlin)DePA - die dezentrale Patientenakte (29.1. FU Berlin)
DePA - die dezentrale Patientenakte (29.1. FU Berlin)Stefan Adolf
 
DePA - die dezentrale Patientenakte
DePA - die dezentrale PatientenakteDePA - die dezentrale Patientenakte
DePA - die dezentrale PatientenakteStefan Adolf
 
Was ist eine Datenbank - und was hat Blockchain damit zu tun?
Was ist eine Datenbank - und was hat Blockchain damit zu tun?Was ist eine Datenbank - und was hat Blockchain damit zu tun?
Was ist eine Datenbank - und was hat Blockchain damit zu tun?Stefan Adolf
 
Never Code Alone: Von Symfony Forms zu einer SPA auf APIs
Never Code Alone: Von Symfony Forms zu einer SPA auf APIsNever Code Alone: Von Symfony Forms zu einer SPA auf APIs
Never Code Alone: Von Symfony Forms zu einer SPA auf APIsStefan Adolf
 
Decentralize all the things
Decentralize all the thingsDecentralize all the things
Decentralize all the thingsStefan Adolf
 
Indexing Decentralized Data with Ethereum, IPFS & The Graph
Indexing Decentralized Data with Ethereum, IPFS & The GraphIndexing Decentralized Data with Ethereum, IPFS & The Graph
Indexing Decentralized Data with Ethereum, IPFS & The GraphStefan Adolf
 
A micro service story
 A micro service story A micro service story
A micro service storyStefan Adolf
 
Api Platform: the ultimate API Platform
Api Platform: the ultimate API PlatformApi Platform: the ultimate API Platform
Api Platform: the ultimate API PlatformStefan Adolf
 
Testing API platform with Behat BDD tests
Testing API platform with Behat BDD testsTesting API platform with Behat BDD tests
Testing API platform with Behat BDD testsStefan Adolf
 
Hack it like its hot!
Hack it like its hot!Hack it like its hot!
Hack it like its hot!Stefan Adolf
 
api-platform: the ultimate API platform
api-platform: the ultimate API platformapi-platform: the ultimate API platform
api-platform: the ultimate API platformStefan Adolf
 
Webpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of usWebpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of usStefan Adolf
 
(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of usStefan Adolf
 
Using over Owning: Enable renting business models using the tangle and afford...
Using over Owning: Enable renting business models using the tangle and afford...Using over Owning: Enable renting business models using the tangle and afford...
Using over Owning: Enable renting business models using the tangle and afford...Stefan Adolf
 

Mehr von Stefan Adolf (20)

Blockchains - Technical foundations
Blockchains - Technical foundationsBlockchains - Technical foundations
Blockchains - Technical foundations
 
HOW TO SURVIVE A 2DAY HACKATHON?
HOW TO SURVIVE A 2DAY HACKATHON?HOW TO SURVIVE A 2DAY HACKATHON?
HOW TO SURVIVE A 2DAY HACKATHON?
 
Digitale Selbstbestimmung mit Hilfe dezentraler Technologien
Digitale Selbstbestimmung mit Hilfe dezentraler TechnologienDigitale Selbstbestimmung mit Hilfe dezentraler Technologien
Digitale Selbstbestimmung mit Hilfe dezentraler Technologien
 
Digitale Selbstbestimmung | Anwendungsfälle der Dezentralität
Digitale Selbstbestimmung | Anwendungsfälle der DezentralitätDigitale Selbstbestimmung | Anwendungsfälle der Dezentralität
Digitale Selbstbestimmung | Anwendungsfälle der Dezentralität
 
Decentralized technology: a (short) survey
Decentralized technology: a (short) surveyDecentralized technology: a (short) survey
Decentralized technology: a (short) survey
 
Productive web applications that run only on the frontend
Productive web applications that run only on the frontendProductive web applications that run only on the frontend
Productive web applications that run only on the frontend
 
DePA - die dezentrale Patientenakte (29.1. FU Berlin)
DePA - die dezentrale Patientenakte (29.1. FU Berlin)DePA - die dezentrale Patientenakte (29.1. FU Berlin)
DePA - die dezentrale Patientenakte (29.1. FU Berlin)
 
DePA - die dezentrale Patientenakte
DePA - die dezentrale PatientenakteDePA - die dezentrale Patientenakte
DePA - die dezentrale Patientenakte
 
Was ist eine Datenbank - und was hat Blockchain damit zu tun?
Was ist eine Datenbank - und was hat Blockchain damit zu tun?Was ist eine Datenbank - und was hat Blockchain damit zu tun?
Was ist eine Datenbank - und was hat Blockchain damit zu tun?
 
Never Code Alone: Von Symfony Forms zu einer SPA auf APIs
Never Code Alone: Von Symfony Forms zu einer SPA auf APIsNever Code Alone: Von Symfony Forms zu einer SPA auf APIs
Never Code Alone: Von Symfony Forms zu einer SPA auf APIs
 
Decentralize all the things
Decentralize all the thingsDecentralize all the things
Decentralize all the things
 
Indexing Decentralized Data with Ethereum, IPFS & The Graph
Indexing Decentralized Data with Ethereum, IPFS & The GraphIndexing Decentralized Data with Ethereum, IPFS & The Graph
Indexing Decentralized Data with Ethereum, IPFS & The Graph
 
A micro service story
 A micro service story A micro service story
A micro service story
 
Api Platform: the ultimate API Platform
Api Platform: the ultimate API PlatformApi Platform: the ultimate API Platform
Api Platform: the ultimate API Platform
 
Testing API platform with Behat BDD tests
Testing API platform with Behat BDD testsTesting API platform with Behat BDD tests
Testing API platform with Behat BDD tests
 
Hack it like its hot!
Hack it like its hot!Hack it like its hot!
Hack it like its hot!
 
api-platform: the ultimate API platform
api-platform: the ultimate API platformapi-platform: the ultimate API platform
api-platform: the ultimate API platform
 
Webpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of usWebpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of us
 
(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us
 
Using over Owning: Enable renting business models using the tangle and afford...
Using over Owning: Enable renting business models using the tangle and afford...Using over Owning: Enable renting business models using the tangle and afford...
Using over Owning: Enable renting business models using the tangle and afford...
 

Kürzlich hochgeladen

SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...kalichargn70th171
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdfSteve Caron
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfkalichargn70th171
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxAS Design & AST.
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxSasikiranMarri
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxRTS corp
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 

Kürzlich hochgeladen (20)

SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptx
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptx
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 

Gatsby (Code.Talks) 2019

  • 1. Stefan Adolf Pump up the JAM with Gatsby what‘s this field good for? Please sendtemplates in openformats next time
  • 2. pump up the JAM with Gatsby Generates super fast static PWAs Stefan Adolf, Turbine Kreuzberg
  • 3. Hello, I am Stefan Adolf Developer Ambassador Foostack developer Turbine Kreuzberg @stadolf #reactjs #mongodb #ethereum #codingberlin # Apps #symfony #turbinejetzt #microservicesĐApps #symfony #turbinejetzt #microservices
  • 4. A brief history of “CMS” CMS Systems Run software on your own infrastructure Website build kits Let a dentist create her own website without any knowledge Flat file CMS Render and cache content server side The do it yourself desaster “Could you please add this commerce component and change text to RTL?” Let a 3rd party shoot in your foot “Yet another outdated server template language to learn” Content smells past due “Damn, someone broke into my Apache because I forgot to upgrade my Linux server”
  • 5. Meet the JAM stack Javascript APIs Markup
  • 6. Javascript APIs Markup JAM in a nutshell  SPAs / PWAs  Rich frontend applications (J/M)  fetch, post & interpolate content when it’s needed  All user interaction logic happens in frontend / JS  Oh hello, I found a public API here.. .
  • 7. Javascript APIs Markup Static site generators  Prebuild everything as static markup  Deploy on a web server: painless & brainless  Deploy on CDNs & edges  API never needed at render time (only at build)
  • 8. How “static site generators” work Static page 1 Static page 2 Static page N Optimized assets ./_site Layout/pipeline
  • 9. middleman ❍ creates layouts using erb ❍ provides content by json ❍ renders assets using gulp ❍ runs bundle exec middleman build on deployment ❍ upload results from ./build
  • 10. jekyll ❍ creates layouts using liquid ❍ provides content by markdown ❍ renders assets using ruby-sass ❍ runs jekyll b on deployment ❍ upload results from ./_site
  • 11. hugo ❍ creates layouts using go ❍ provides content by yaml ❍ renders assets using pipes ❍ runs hugo on deployment ❍ upload results from ./public
  • 12. “Gatsby.js is a static Progressive Web App generator.” “Don't build a website with last decade's tech.” “Liberate your sites from legacy CMSs and fly into the future.”
  • 13. gatsby ❍ creates layouts using React ❍ provides content by GraphQL ❍ renders “assets” using webpack ❍ runs gatsby build on deployment ❍ uploads results from ./public ❍ generates (re-)active PWA!
  • 14.
  • 15. How Gatsby works createNode createPageStaticpagetransformers Static page 1 Static page 2 Static page N Content for 1 Content for 2 Optimized assets ./public
  • 16. Most features are just plugged in ❍CMS / CMS API adapters ❐ Contentful, Wordpress, Craft, Drupal, Dropbox Paper, Directus, ButterCMS, Ghost, Morty, cockpit, sulu, Transifex, Silverstripe,... ❍Filesystem based (“flat”) content ❐ Markdown, JSON, Yaml, CSV, toml,... ❍Database / API support ❐ Mongo, GSheets, Mysql, Dynamo,... ❐ Trello, Strapi, Instagram, Shopify,... ❍Transformer plugins ❐ Image processing (!) ❐ Markdown / MD / MDX
  • 17. Pages, Layout & Routing ❍ components in src/pages render as page ❐ filename == URL ❐ Gatsby Link integrates with @reach/router ❍ React Helmet for metadata ❍ Supports allTM styling variants ❐ Sass compile steps (Bootstrap, Bulma) ❐ Component CSS ❐ Styled components (Grommet) & JSS ❍ createPageApi creates pages out of code / nodes
  • 18. GraphQL ❍ Gatsby automatically infers GraphQL a schema ❐ all content sources become queryable data nodes ❍ Allows simple filtering of page data ❐ allTextFiles({filter: { content: { regex: “code”} } }) ❍ StaticQuery hook for inline (“static”) page queries
  • 20.
  • 22. Create pages from nodes gatsby-node.js createPage API
  • 24. Frontmatter, JSON & MDX ❍Frontmatter: (meta)data in your MD files ❐ Becomes part of GraphQL schema queryable!→ queryable! ❍Use plain JSON files to store tabular data ❍MDX: embed React JSX components in MD, e.g for ❐ Slideshows ❐ Signups / interactive forms ❐ Dynamic advertisments ❐ Tweets & Youtube Videos, all inlined in content
  • 28. Unholy world of sh(i|or)tcodes
  • 29. Gatsby Image / Sharp pages/planets.js
  • 30. Speed (frontend) ❍“performance isn’t optional, it’s built in” ❍inlines critical CSS ❍code/data splitting per route ❍Prefetch page data (JSON) on link hovers ❍offline support: service workers cache content locally
  • 31.
  • 32. Speed (backend) ❍All API queries are serialized in a Redux cache ❍Only impacts of changed data are rerendered ❍20.000 product pages = 180s (cold start) ~ 1000 pages/s = 20s for complete page build ❐ =3.5 min overall build ❐ =600M of statically generated output ❍Rebuilds = ~30s
  • 33. Wrapup ❍ Not yet another “static site generator” ❐ content agnostic, GQL driven, React PWA SSR engine ❐ Forget all your server side performance issues ❍ connects to any CMS (even Wordpress) or DB ❍ Gatsby Image ❍ incredibly simple to deploy ❐ Just upload your files. ❐ Run npm install && gatsby build on your CD
  • 34. Conclusion Start using Gatsby today. No excuses. it’s really that great.
  • 35. Thank you o/ Stefan Adolf Turbine Kreuzberg @stadolf @elmariachi111 #reactjs #mongodb #ethereum #codingberlin #elastic #symfony2 #turbinejetzt #microservices