SlideShare a Scribd company logo
1 of 140
Old Gods & New: A
Vision of Backend &
Frontend
May 2015
By Gil Tayar
Chapter I: The Land of the Web
Paul
Two Tribes
The Backend Tribe
The Frontend Tribe
The Backend Gods
Thread Pools
Message Queues
Scala
And The Frontend Tribe?
Thread Pools
Message Queues
Scala
JavaScript
Angular
DOM
For they were old gods
Serving the Frontend Code
HTML
CSS
JavaScript
Please, pray to the backend gods
Thread Pools
Message Queues
Scala
HTML
CSS
JavaScript
LET IT BE SO
FTP
HTML, CSS, JavaScript ⇒ FTP
Not Happy
http://mytribe.com/about-us.html
http://mytribe.com/about-us
Please, pray to the backend gods
Thread Pools
Message Queues
Scala
And the backend tribe prayed
LET IT BE SO
URL Rewriting
Secret Sacred Server
Configuration Files
And all was well
Chapter II: Serving ES6 Modules
Smitten with ES6 Modules
An ES6 Module
// aModule.js
export function greet(name) {
return 'hello ' + name;
}
Importing ES6 Module
import {aFunction} from './aModule';
document.onready = function() {
document.getElementById('greeting').
innerHTML =
aFunction('anonymous');
}
Who transpiles the ES6 to
JavaScript?
babel
traceur
esnext
A Deep Hierarchy of ES6 Modules
<script src= ></script>
The Sun Will Go Dark
Request
main.js
Response
main.js
Request
sub-a.js
Response
sub-a.js
Request
sub-a-a.js
Response
sub-a-a.js
browserify
webpack
jspm
Bundling ES6 Modules
bundle.js
A month later...
The Wondrous F5
(⌘+R for all you Mac-ies)
Bundling Kills Caching
bundle-for-page-1.js
Over-Bundling
bundle-for-page-2.js
bundle-for-page-1.js
Chapter III: The Bold Architecture
Backend Understanding JavaScript
bundle.js
Server
bundles killing caching?
over-bundling?
Solved?
HTTP/2
HTTP/1
Request
main.js
Response
main.js
Request
sub-a.js
Response
sub-a.js
Request
sub-b.js
Response
sub-b.js
To HTTP/2 Multi-Channel
Request
main.js
Response
main.js
Request
sub-a.js
Request
sub-b.js
Response
sub-a.js
Response
sub-b.js
Request
sub-b-a.js
Response
sub-a-b.js
Request
sub-a-b.js
Response
sub-b-a.js
HTTP/2 Push Mode
Request
main.js
Response
sub-a.js
Response
sub-a-b.js
Response
sub-b.js
Response
sub-b-a.js
HTTP/2 Push Mode with Cache
Request
main.js
Response
sub-a.js
Response
sub-a-b.js
Response
sub-b.js
Response
sub-b-a.js
“Please, plead to the gods about
JavaScript and HTTP/2”
Thread Pools
Message Queues
Scala
JavaScript
Angular
DOM
Chapter IV: CSS
HTML
CSS
JavaScript
Hm...
Do unto CSS, what you would do
unto JavaScript?
Gods That Understand JS Give Us
● Auto-transpiling of ES6
● Fast serving of JS modules
● No cache-killing JS bundles
● All using the wondrous F5 key
CSS
LESS
SASS
Compass
Better and Smaller CSS
Yes, CSS has modules
@import ‘sub.less';
...
Gods That Understand CSS Give Us
● Auto-transpiling of LESS
● Fast serving of CSS modules
● No cache-killing CSS bundles
● All using the wondrous F5 key
“Please, plead to the gods about
CSS and HTTP/2”
Thread Pools
Message Queues
Scala
JavaScript
Angular
DOM
Chapter V: HTML and Caching
● Browser always checks if there is a new
version
o Last-Modified/Etag
● Browser never checks
o Expires: ∞
Browser Caching
Caching-Supportive HTML/JS
<script src="main-1.4.js">
Caching-Supportive HTML/JS
<script src="main.js">
Caching-Supportive HTML/JS
<script src="main-2014-06-
08.js">
“Please, plead to the gods about
HTML and infinity caching”
Thread Pools
Message Queues
Scala
Pissed Off!
Chapter VI: Rendering HTML
Single Page Applications
Single Page Applications
Server
page.
html
Service
xN times...
Server-side Rendering of HTML
SPA - New Gods Style
Server Service
render
code
xN times...
page.
html
SPA - New Gods Style
Server Service
render
code
xN times...
page.
html
The backend gods could execute
JavaScript?
Sharing Frontend and Backend
Code
Thread Pools
Message Queues
Scala
“Please, plead to the gods about
CSS and HTTP/2”
JavaScript
Angular
DOM
Message Queues
JavaScript
Hey, Great Idea
LET IT BE SO
Server
JS
● transpile ES6
● minify JS
● serve es6 modules
intelligently
● cache es6 modules
● ???
CSS
● transpile LESS
● minify CSS
● serve CSS modules
intelligently
● cache CSS
● ???
HTML
● Rewrite links for infinity
expiring
● Render HTML server-
side
● ???
The Frontend Tribe
Thread Pools
Message Queues
Scala
JavaScript
Angular
DOM
Seriously, though...
Frontend Platform
● Serving JS modules
● Serving CSS modules
● Transpiling CSS & JS
● Infinity caching of JS & CSS
● Server-side rendering of HTML
● And who knows what else?
Thank You
@giltayar

More Related Content

What's hot

Building Real World Application with Azure
Building Real World Application with AzureBuilding Real World Application with Azure
Building Real World Application with Azuredivyapisces
 
Aws sys ops administrator
Aws sys ops administratorAws sys ops administrator
Aws sys ops administratorLearntek1
 
Starting from Scratch with the MEAN Stack
Starting from Scratch with the MEAN StackStarting from Scratch with the MEAN Stack
Starting from Scratch with the MEAN StackMongoDB
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN StackRob Davarnia
 
Client Vs. Server Rendering
Client Vs. Server RenderingClient Vs. Server Rendering
Client Vs. Server RenderingDavid Amend
 
Flask jwt authentication tutorial
Flask jwt authentication tutorialFlask jwt authentication tutorial
Flask jwt authentication tutorialKaty Slemon
 
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"Fwdays
 
Java 8: Nashorn & avatar.js di Enrico Risa al JUG Roma
Java 8: Nashorn & avatar.js di Enrico Risa al JUG RomaJava 8: Nashorn & avatar.js di Enrico Risa al JUG Roma
Java 8: Nashorn & avatar.js di Enrico Risa al JUG RomaVitalij Zadneprovskij
 
Level Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformanceLevel Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformancePantheon
 
Searching for the framework of my dreams in node.js ecosystem by Mykyta Semen...
Searching for the framework of my dreams in node.js ecosystem by Mykyta Semen...Searching for the framework of my dreams in node.js ecosystem by Mykyta Semen...
Searching for the framework of my dreams in node.js ecosystem by Mykyta Semen...Binary Studio
 
Rapid Application Development with MEAN Stack
Rapid Application Development with MEAN StackRapid Application Development with MEAN Stack
Rapid Application Development with MEAN StackAvinash Kaza
 
Mean Stack - An Overview
Mean Stack - An OverviewMean Stack - An Overview
Mean Stack - An OverviewNaveen Pete
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentIrfan Maulana
 
Javascript Myths and its Evolution
Javascript Myths and its  EvolutionJavascript Myths and its  Evolution
Javascript Myths and its EvolutionDeepu S Nath
 
Type-safe front-end development with Scala
Type-safe front-end development with ScalaType-safe front-end development with Scala
Type-safe front-end development with Scalatakezoe
 
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of JavascriptIrfan Maulana
 

What's hot (20)

Building Real World Application with Azure
Building Real World Application with AzureBuilding Real World Application with Azure
Building Real World Application with Azure
 
Aws sys ops administrator
Aws sys ops administratorAws sys ops administrator
Aws sys ops administrator
 
Starting from Scratch with the MEAN Stack
Starting from Scratch with the MEAN StackStarting from Scratch with the MEAN Stack
Starting from Scratch with the MEAN Stack
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
 
Client Vs. Server Rendering
Client Vs. Server RenderingClient Vs. Server Rendering
Client Vs. Server Rendering
 
Flask jwt authentication tutorial
Flask jwt authentication tutorialFlask jwt authentication tutorial
Flask jwt authentication tutorial
 
Mern stack developement
Mern stack developementMern stack developement
Mern stack developement
 
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"
 
Java 8: Nashorn & avatar.js di Enrico Risa al JUG Roma
Java 8: Nashorn & avatar.js di Enrico Risa al JUG RomaJava 8: Nashorn & avatar.js di Enrico Risa al JUG Roma
Java 8: Nashorn & avatar.js di Enrico Risa al JUG Roma
 
Level Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress PerformanceLevel Up: 5 Expert Tips for Optimizing WordPress Performance
Level Up: 5 Expert Tips for Optimizing WordPress Performance
 
Searching for the framework of my dreams in node.js ecosystem by Mykyta Semen...
Searching for the framework of my dreams in node.js ecosystem by Mykyta Semen...Searching for the framework of my dreams in node.js ecosystem by Mykyta Semen...
Searching for the framework of my dreams in node.js ecosystem by Mykyta Semen...
 
Rapid Application Development with MEAN Stack
Rapid Application Development with MEAN StackRapid Application Development with MEAN Stack
Rapid Application Development with MEAN Stack
 
Mean Stack - An Overview
Mean Stack - An OverviewMean Stack - An Overview
Mean Stack - An Overview
 
Metarefresh
MetarefreshMetarefresh
Metarefresh
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web Development
 
Javascript Myths and its Evolution
Javascript Myths and its  EvolutionJavascript Myths and its  Evolution
Javascript Myths and its Evolution
 
Type-safe front-end development with Scala
Type-safe front-end development with ScalaType-safe front-end development with Scala
Type-safe front-end development with Scala
 
Introduction to CQ5
Introduction to CQ5Introduction to CQ5
Introduction to CQ5
 
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
 
Keystone.js 101
Keystone.js 101Keystone.js 101
Keystone.js 101
 

Similar to Old Gods & New: a vision of Backend & Frontend

HTTP Plugin for MySQL!
HTTP Plugin for MySQL!HTTP Plugin for MySQL!
HTTP Plugin for MySQL!Ulf Wendel
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Codemotion
 
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQLHTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQLUlf Wendel
 
The Future is Now: Leveraging the Cloud with Ruby
The Future is Now: Leveraging the Cloud with RubyThe Future is Now: Leveraging the Cloud with Ruby
The Future is Now: Leveraging the Cloud with RubyRobert Dempsey
 
Martin Splitt "A short history of the web"
Martin Splitt "A short history of the web"Martin Splitt "A short history of the web"
Martin Splitt "A short history of the web"Fwdays
 
Modern UI Development With Node.js
Modern UI Development With Node.jsModern UI Development With Node.js
Modern UI Development With Node.jsRyan Anklam
 
Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"Fwdays
 
Developing node-mdb: a Node.js - based clone of SimpleDB
Developing node-mdb: a Node.js - based clone of SimpleDBDeveloping node-mdb: a Node.js - based clone of SimpleDB
Developing node-mdb: a Node.js - based clone of SimpleDBRob Tweed
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performancerudib
 
Warsaw Frontend Meetup #1 - Webpack
Warsaw Frontend Meetup #1 - WebpackWarsaw Frontend Meetup #1 - Webpack
Warsaw Frontend Meetup #1 - WebpackRadosław Rosłaniec
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster WebsiteRayed Alrashed
 
When dynamic becomes static - the next step in web caching techniques
When dynamic becomes static - the next step in web caching techniquesWhen dynamic becomes static - the next step in web caching techniques
When dynamic becomes static - the next step in web caching techniquesWim Godden
 
Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016takezoe
 
Locker Service Ready Lightning Components With Webpack
Locker Service Ready Lightning Components With WebpackLocker Service Ready Lightning Components With Webpack
Locker Service Ready Lightning Components With WebpackSalesforce Engineering
 
Improving web site performance and scalability while saving
Improving web site performance and scalability while savingImproving web site performance and scalability while saving
Improving web site performance and scalability while savingmdc11
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesUdita Plaha
 
Intro JavaScript
Intro JavaScriptIntro JavaScript
Intro JavaScriptkoppenolski
 
Generating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status CodesGenerating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status CodesDeeptiJava
 

Similar to Old Gods & New: a vision of Backend & Frontend (20)

HTTP Plugin for MySQL!
HTTP Plugin for MySQL!HTTP Plugin for MySQL!
HTTP Plugin for MySQL!
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
 
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQLHTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
 
The Future is Now: Leveraging the Cloud with Ruby
The Future is Now: Leveraging the Cloud with RubyThe Future is Now: Leveraging the Cloud with Ruby
The Future is Now: Leveraging the Cloud with Ruby
 
Please dont touch-3.6-jsday
Please dont touch-3.6-jsdayPlease dont touch-3.6-jsday
Please dont touch-3.6-jsday
 
Martin Splitt "A short history of the web"
Martin Splitt "A short history of the web"Martin Splitt "A short history of the web"
Martin Splitt "A short history of the web"
 
Modern UI Development With Node.js
Modern UI Development With Node.jsModern UI Development With Node.js
Modern UI Development With Node.js
 
PPT
PPTPPT
PPT
 
Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"
 
Developing node-mdb: a Node.js - based clone of SimpleDB
Developing node-mdb: a Node.js - based clone of SimpleDBDeveloping node-mdb: a Node.js - based clone of SimpleDB
Developing node-mdb: a Node.js - based clone of SimpleDB
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
 
Warsaw Frontend Meetup #1 - Webpack
Warsaw Frontend Meetup #1 - WebpackWarsaw Frontend Meetup #1 - Webpack
Warsaw Frontend Meetup #1 - Webpack
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster Website
 
When dynamic becomes static - the next step in web caching techniques
When dynamic becomes static - the next step in web caching techniquesWhen dynamic becomes static - the next step in web caching techniques
When dynamic becomes static - the next step in web caching techniques
 
Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016
 
Locker Service Ready Lightning Components With Webpack
Locker Service Ready Lightning Components With WebpackLocker Service Ready Lightning Components With Webpack
Locker Service Ready Lightning Components With Webpack
 
Improving web site performance and scalability while saving
Improving web site performance and scalability while savingImproving web site performance and scalability while saving
Improving web site performance and scalability while saving
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails Slides
 
Intro JavaScript
Intro JavaScriptIntro JavaScript
Intro JavaScript
 
Generating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status CodesGenerating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status Codes
 

Recently uploaded

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Recently uploaded (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Old Gods & New: a vision of Backend & Frontend

Editor's Notes

  1. Hi, My name is Gil Tayar. I am a software architect at Wix, which at Wix means that I get to code lots of interesting stuff. Wix is really a great company, with great engineering standards, and we’ve built a drag and drop editor for web sites (!), 3 times (!), and the third time using cutting edge react (!). So it really is a great place for me to be. But you didn’t come here to listen to me talk about Wix. You came here to listen to my new vision. Well, I have to disappoint you. I have no vision. None whatsoever. Sergey came to me a while back, and asked me if I have something meaningful to say in this conference of his. Well, I had. So I gave him the title, and I gave him the abstract, and the guys liked it, and thus this talk was born. And from that time, till today - nothing. No inspiration, no words, no slides, nothing. I sat there, for the whole of June, in front of my screen. And the only slide I had was the slide with the name of the talk. Otherwise - nada. I had what I heard was called “Writer’s block”. Nothing came to me. Every night, I would lay to sleep, hoping that tomorrow, tomorrow inspiration will strike! Sergey, in the final week, started pleading to give me the presentation. I told him it was “a secret”, but in reality I was ashamed to say that I had nothing. Yesterday, I gave up. I understood that I would have nothing. And so I did what any atheist in my position would do - I prayed. I prayed to Ada Lovelace, and to Grace Hopper. I prayed to Alan Turing, and Alonzo Church. I prayed to Kerningham, and to Ritchie. I even prayed to Bill Gates, and for balance, to Linus. But still nothing. Then in the evening, a knock on the door (you knew this was coming, right?). I opened the door, and there was this bent man, streaked with dust from the dessert, with this Ghalabiya. He looked me in the eye, and said, “Young man, I heard you was stuck”. I didn’t know what to say, so I nodded He said, “well, your prayers have been answered,” and raised a Flash drive to me (almost poking me in the eye) repeatedly. “Take this,” he continues. “What is it,” I said? “Put it in your computer, and show it tomorrow”. And with those words, he started fading. “What’s your name,” I cried out! “Paul,” he said, “and don’t dare to look at it before the talk, or else it will softly and silently vanish away”. And he was gone. So, yes, that is all I have. This presentation, from a crazy old man from the desert. I have no idea what’s in it. And Sergey is going to kill me after this talk.
  2. And it has come to pass,...
  3. ...26 years after the Great Prophet Tim Lee invented the Holy Tantric Markup Language...
  4. ...and 7 years after Douglas Crockford decreed the use of the equal equal sign to be a “sin” (“three equals shalt be the number”, said he)...
  5. ...that a certain software developer by the name of Paul had a vision. Paul lived in a small village, in the land of the “Web”, and was a “Software Architect” there. While those around him called him an “architect”, he just liked to till the software soil, getting his hands dirty with code, and bugs, and stuff. But he was restless, for he knew not what a “Software Architect” was.
  6. And in this land of the “Web”, there were two tribes.
  7. The Backend Tribe, who were an old and powerful tribe. And...
  8. ...the Frontend Tribe, who were a young tribe, and full of energy and passion.
  9. And the backend tribe prayed to the backend gods. And the backend tribe was happy. For the Backend Gods rewarded their prayers with...
  10. ... “Thread Pools”, and...
  11. ...“Message Queues”, and...
  12. “Scala”
  13. But the Frontend tribe was not happy. For they had no gods. And they could not pray to the Backend Gods. For the backend gods could only understand words like....
  14. ... “Thread Pools”, and...
  15. ...“Message Queues”, and...
  16. “Scala”... ...but they did not understand words like...
  17. ...JavaScript, and...
  18. ...Angular…, and...
  19. ...DOM...
  20. For they were old gods, and they did not understand this new language of the Frontend tribe.
  21. And so it came to pass that the frontend tribe had to publish their web application. To do this, they had to serve....
  22. HTML, and...
  23. ...CSS, and...
  24. ...JavaScript And they came to the backend tribe, and they pleaded unto them...
  25. ...“please, pray to the backend gods to serve our code, for you understand words like…”
  26. …”Thread Pools”, and “Message Queues”, and “Scala”. And ask the gods to serve our...
  27. ...”HTML”, and “CSS”, and “JavaScript”... For we have coded the files, and want the world to see them, but we have no gods to serve them for us. We need the backend gods to serve it for us. And the backend tribe prayed...
  28. ....and the backend gods answered - “let it be so”. And in their goodwill, they gave the frontend people a gift, a most wondrous gift...
  29. ...FTP.
  30. For the frontend tribe would put their “HTML”, and “CSS”, and “JavaScript” in the FTP, and lo and behold it would be seen by everybody in the world! And the frontend tribe were happy. And all was well.
  31. And so it came to pass, after a few months, that the frontend tribe was not happy.
  32. They did not like their urls ending in “.html”.
  33. They wanted them to end with nothing. And they came to the backend tribe, and they pleaded unto them...
  34. ...“please, pray to the backend gods, for you understand words like…”
  35. …”Thread Pools”, and “Message Queues”, and “Scala”... and ask the gods to serve our HTML without the extension.
  36. And the backend tribe prayed...
  37. ...and the backend gods answered - “let it be so”. And in their goodwill, they gave the frontend people a gift, a most wondrous gift...
  38. ...URL Rewriting. For with this gift, the frontend developers could do a whole lotta stuff besides enabling URLs without extensions. But they could not use the tool directly. For to use the tool, one would have to pray to the backend gods to make changes in the...
  39. ...secret sacred server configuration files. And so each time the frontend people need changes in URL rewriting, they would go to the backend tribe, and they would pray to the backend gods to change the “secret sacred server configuration files”. And the backend gods would change it...
  40. ...and all was well in the land of the web.
  41. And in those days, Paul was sitting in his garden, and contemplating ES6 Modules
  42. For those were exciting times, and everybody was smitten with ES6 Modules. For they were the future of JavaScript modules. And Paul was also smitten. And he read all he could about ES6 Modules, and he could find nothing wrong with them.
  43. For he was smitten. But not everybody knew about ES6 modules. And so Paul left his land of code, and bugs, and stuff...
  44. ...and went unto the frontend tribes’ villages, and preached about ES6 Modules… And this is what he said:
  45. “Behold an ES6 Module. For it is a simple thing. It is a JavaScript file, with functions and variables, and whatnot. ...And some of those functions and variables are exported. For they can be seen everywhere, by anybody who imports it.” And he bespake even more:
  46. ...and whosoever wants to import this module, shall just write ...“import” ...and what they want to import ...and the name of the file. And verily it was a wonder to behold, for up to now the frontend people had to contend with ugly things like “AMD”, and “RequireJS”. ...and so Paul went unto the frontend tribe people, and showed them this wonder, but they were not convinced. For they said…
  47. …”forsooth, do the browsers understood this ES6? No, they do not. And who shall explain it to them?” And Paul said unto them, “be patient, for the browsers will understand this new language eventually, for the standards committee has spoken, and ES6 is fixed in stone”. And Paul also said, “and in the meanwhile, I give you tools like…”
  48. ... ‘babel’, and...
  49. ...‘traceur’, and...
  50. ...‘esnext’ to transpile this for you. Verily you give unto them an es6 file, and they do magically change its shape to JavaScript. But the frontend people were still not convinced. For they said...
  51. “What if we have a module, which we <script src>, and that module imports some more modules, which import more modules, and so on, very deeply? For the browser will go ahead and fetch each one in turn, and forsooth, the browser is very slow in this regard...”
  52. “...For although HTTP is a Holy Protocol, brought to us by the Great Prophet Lee, but it is old, and it can fetch only one file at a time. And so the browser will ...bring our main.js, parse it, and then decide it will need to bring in the sub-module ...sub-a.js, and it will parse it, and it will find that it needs to bring in a sub-sub-module ...sub-a-a.js. And it will do so, for each and every one of our sub modules. But the sun will go dark and the stars will turn to dust while we wait.” And Paul said, “Fear not, for I give unto you the tools...
  53. ...“browserify”, and...
  54. …”webpack”, and...
  55. ...jspm. for those tools do a magical thing, for even though they are tools, they understand JavaScript. And they go unto your JavaScript modules...
  56. ...and they crawl them, and they understand the imports and the relationships, and they bundle the code into a mega javascript file, and that is the only file you need to include in the HTML” And the frontend tribe went away, happy, and used ES6 Modules.
  57. And they were smitten too.
  58. But after a month, the frontend people returned to Paul in his cave, and said: “Oh, Paul, for you have given us a great tool, and we use es6 modules, and babel, and browserify. But still we are not happy.” And Paul asked - “what are you not happy about?” And they said, “up to now, we have been making fun of the backend people, for they use ‘Scala’, and they have a “build” step which is long, and arduous, and painful”, whereas we need only use...
  59. ... the wondrous F5 to rerun our changed code. We need just refresh the browser to see our code change. And now, alas, we too have a build step, and while it is not long, and arduous, and painful, it still makes our F5 key less… wondrous”. And Paul was silent, and he felt unto the frontend people, for he liked making fun of the backend people too. And the people continued, “Also, each time we change one small file, we have to rebuild the bundle, and this messes up…”
  60. ...caching. We change only a line or two, but our users browsers download the mega bundle again, and it is voluminous, and holds many megabytes, and is slow to download. Our users say they feel that when the page finishes loading, it is as if the sun has already gotten dark, and the stars have turned to dust. Moreover...
  61. ...each HTML page has to import different JS files, ...but those JS files may import files that were imported in another page, so they are bundled in two mega bundles. So now we have to optimize the bundling manually, using various heuristics. Verily, this is a rat’s nest. And even though rats are tasty, we still do not want them in our code!” And Paul was silent, and Paul understood the needs of the frontend developers, for even though he loved tilling the soil of code, bugs, and stuff, he was also a “Software Architect”. And so he went back to his cave and contemplated the problem. And lo, it was a hard problem, with no solution in sight. And he was smitten by frustration. And smitten as he was, he went to sleep.
  62. And Paul dreamt, and when he dreamt, he dreamt of an architecture (for he was an architect). An architecture never before heard of. In this architecture the gods serving the bundles would be smart...
  63. When they serve a JS file, they will not do it blindly. Instead they will ...parse the JavaScript, and understand the JavaScript and submodules, ...and create a bundle, ....and return that to the browser. And because this happens in the server, the wondrous F5 key will work. No more build steps! Our frontend tribe can continue laughing at the backend tribe with their “Scala”.
  64. But what about the other two problems? Have we solved them? No. Bundling is a niche hack, but it kills downloading, both because the same code is downloaded again and again, and because it kills caching. And so he went back to his cave and contemplated the problem. And lo, it was still a hard problem, with no solution in sight. And he was smitten by frustration. And smitten as he was...
  65. ...he went to sleep. And Paul dreamt, and when he dreamt, he dreamt of a new thing...
  66. ...HTTP/2 And he awoke, and he had no idea what the dream meant. But he was a learned man, so he delved deep into the spec.
  67. He already knew the inefficiencies of HTTP/1 when it comes to many files - too many connections, too many requests in serial
  68. He learned that HTTP/2 allows us to send requests and receive responses, on the same connection, and in parallel. ...So the browser requests the main JS file (main.js here). ...And reads it, and figures out what the submodules are (sub-a.js and sub-b.js). ...And because HTTP/2 is multiplexing, it can bring all of the submodules in parallel. ...So once it gets them, it can parse them and understand what the next set of files is (sub-a-b, sub-b-a). ...And bring them. Hmm… That’s better! If I don’t bundle, then at least the browser can ask for things in parallel… But the browser still waits for that first file, and only requests the first layer of JS files. And there are multiple layers, of files, and while all the files in a layer can be brought in parallel, each layer is brought serially. And then he learned about HTTP/2 Push Mode! And he was smitten with its beauty.
  69. In HTTP/2 Push Mode, a server can push files to the browser, without the browser even asking for them! ...So when the browser requests main.js ...the server can read the JS, learn the hierarchy ...and can push the whole bundle, one by one, unbundled, even if the browser asks only for main.js. The server, because it can understand JavaScript, anticipates the browser! “This solves the over-bundling,” he thought, “because I don’t need to bundle. I just need to push all the resources forward when I get a JS file request - the JS file, and all its dependencies. But what about caching? What if the browser already has these files?”
  70. And he learned some more, and he delved deeper into the spec, and he learned that Push Mode is compatible with Caching! And so the browser can “kill” responses in flight, and say “It’s OK, don’t send it, I don’t need it!” Perfect! All our problems are solved with HTTP/2: when we receive a JS file, we push all the dependent files, and if they’re already cached, then we don’t. No more bundling!
  71. And it was thus, in an excited mood, that Paul rushed to the backend tribe, and implored them to talk to the backend gods about ES6 Modules, and parsing, and caching. But the backend tribe did not understand these words. For they knew only words like...
  72. …”Thread Pools”, and “Message Queues”, and “Scala”... “Please,” he tried again, “I beseech upon all that is holy. It is important to my tribe”. This time, the backend gods answered...
  73. ...“Oh, piss off! We gave you URL rewriting! What is this JavaScript you are talking about. What is this nonsense?” Depressed, and forlorn, Paul went back to the Frontend tribe, and told them about his tribulations with the backend gods...
  74. ...And there was much weeping, and much wailing, and much gnashing of the teeth. And Paul returned to his cave, and asked himself...
  75. ...“What if!? What if there were new gods? Gods who would understand words like…”
  76. ...JavaScript, and Angular, and DOM”. Then, if the gods understand this, then they can serve our JavaScript modules with HTTP/2 Push with Caching”
  77. And with this thought, he went to sleep.
  78. And in his sleep, he dreamt of...
  79. ...HTML, and...
  80. ...CSS… and
  81. JavaScript. And betwixt one dream and another, he thought...
  82. Hm...
  83. Can we do unto CSS, what we did unto JavaScript? (For ‘tis the Golden Rule)
  84. For as we already knowest, if we had gods that understood JavaScript, they could give us... Auto-transpiling of ES6 Fast serving of JS modules No cache-killing JS bundles All using the wondrous F5 key Could it be that if those gods understood...
  85. ...CSS, we could get similar rewards? And with that thought, he woke up. But he was not a CSS expert, for CSS was an arcane science, with much to be learned. But he was a learned man, and he had heard that there was...
  86. ...a great prophetess of CSS, the prophetess Lea. And she was a great prophetess, for she knew all the ...secrets of CSS. And he read, and he learned, until finally one day, he cried...
  87. Eureka! He cried. “For we can do unto CSS, what we can do unto JavaScript - we can transpile it. We can use...
  88. ...LESS, and...
  89. ...SASS…, and...
  90. ...Compass...
  91. So that our CSS will be better. And we can minify it. And we can use @import without shame.
  92. And CSS has modules, so we can do unto CSS what we did unto JavaScript.
  93. So if the gods understood CSS, and could serve the CSS unblindly, while understanding its syntax, they could give us... Auto-transpiling of LESS Fast serving of CSS modules No cache-killing CSS bundles All using the wondrous F5 key
  94. And it was thus, in an excited mood, that Paul rushed to the backend tribe, and implored them to talk to the backend gods about CSS Modules, and HTTP/2, and LESS. But the backend tribe did not understand these words. For they knew only words like...
  95. …”Thread Pools”, and “Message Queues”, and “Scala”... “Please,” he tried again, “I beseech upon all that is holy. It is important to my tribe”. And again, the backend gods answered...
  96. ...“Oh, piss off! We gave you URL rewriting! What is this CSS you are talking about. What is this nonsense?” Depressed, and forlorn, Paul went back to the Frontend tribe, and told them about his tribulations with the backend gods...
  97. ...And there was much weeping, and much wailing, and much gnashing of the teeth. And Paul returned to his cave, and asked himself… Maybe, maybe the gods are right, and these additions do not have enough value? We need more value! We need more value from the idea that the gods could understand words like...
  98. ...JavaScript, and Angular, and DOM”.
  99. And Paul thought of HTML and Caching. For he knew, that for the frontend developers, caching is all important. And that there are two kinds of browser caching:
  100. ...One in which the browser… checks if the item in the cache is still fresh ...using Last-Modified or Etag headers. ...And the other where the browser always assumes that the cache is OK ...using the Expires header And he knew that the frontend tribe likes the second one (the infinity caching version), because it is much much faster.
  101. And because the frontend tribe thought caching was all important, and because infinity caching is the best, they did crazy things like for each release, rename the files, and modify the <script src> to reflect this name change. And because every change means renaming the file, they could use infinity caching on the file. But it was manual, and error prone, and hackish as hell. But what if!? What if the gods that did these things automatically. For if the gods understood HTML, they could attach the modification time of the file to the URL and serve it from there. So it would change this...
  102. to this...
  103. ...While still serving main.js. And it would do this to all javascript modules, and verily also do it unto the CSS. And so yet another speed increase in serving the pages. Is this enough value for the backend gods?
  104. And it was thus, in an excited mood, that Paul rushed to the backend tribe, and implored them to talk to the backend gods about HTML and infinity caching. But the backend tribe did not understand these words. For they knew only words like...
  105. …”Thread Pools”, and “Message Queues”, and “Scala”... “Please,” he tried again, “I beseech upon all that is holy. It is important to my tribe”. Anf again, the backend gods answered...
  106. ...“Oh, piss off! We gave you URL rewriting! What is this CSS you are talking about. What is this nonsense?” Depressed, and forlorn, Paul went back to the Frontend tribe, and told them about his tribulations with the backend gods... And this time there was not a lot of wailing, and weeping, for the frontend tribe themselves...
  107. ...were a bit pissed off! And Paul? Paul believed….
  108. ...he was on a mission from gods! A mission to understand who these new gods might be. And so Paul continued thinking. And he thought more about this HTML.
  109. He thought about how HTML was served in these days of...
  110. ...Single Page Applications. How do Single Page Applications look like?
  111. First, the browser… ...requests the HTML from the server… ...which reads it from the file system.. ...and returns it to the browser. This HTML is “bare”, without any data shown. So in it, there are… ...ajax calls to the various “services” in the backend... ...which return a JSON which causes the HTML to be filled with data. And so the page is viewed only after another round trip to the servers. ...Also, this call to the service can be done multiple times, to refresh the data, or bring more, or update it.
  112. But what if? What if we could render the HTML from the server? Then we could call the service from the server that’s doing the rendering, and remove the need for that additional round trip. It would look like this
  113. First, the browser… ...requests the HTML from the server… ...which reads it from the file system. But before returning it to the browser, gives it to ...some code, which… ..calls the service in the backend… ...which return a JSON which causes the HTML to be filled with data, ...and returned to the user And so the page is viewed only after another round trip to the servers…. ...And the browser can can continue calling the service, to refresh the data, or bring more, or update it.
  114. But we all know that to write the rendering code on the server, you must understand the language of “Scala”. And the frontend people do not understand these words. ...Moreover, the same code needs to be written also in JavaScript, so it can be run in the browser and communicate with the services while the page is being shown to the user. But what if? What if...
  115. ...The gods could not only understand JavaScript, but also execute it? Then we could use this to write the server code in JavaScript. And we would not need to understand “Scala”, and we could…
  116. ...use the same code for the front-end and the backend. For it could be a wondrous thing, to share code between the frontend and the backend. Would all code be then written in JavaScript? Oh no, only frontend code, that just happens to need to run in the backend. For the backend tribe is old and powerful, and does wondrous things in the backend, using stuff like...
  117. ...Thread Pools, and Message Queues, and Scala.
  118. But he knew, that if he would go to the backend tribe with these ideas, they would ignore him. They would say...
  119. ...“Oh, piss off! We gave you URL rewriting! What is this Server-side rendering you are talking about. What is this nonsense?”
  120. But what if!? What if there were new gods? Gods who would understand words like…
  121. ...JavaScript, and Angular, and DOM”. Then we could pray to them and would be answered with things like “Server-side rendering of HTML”. And so Paul finally understood, and was smitten by a vision. He now understood that the old gods were not enough anymore, and decided that maybe it was time to leave the old gods be, and to go and search for other, newer gods.
  122. And so he roamed the earth.
  123. And he came upon the land of Node. And in the land of Node he talked to the people…
  124. ...and they were a friendly people, and they understood words like...
  125. ... “Message Queues” but they also understood...
  126. “JavaScript”. And Paul talked unto their gods, and explained his conundrum, and their Gods said...
  127. …”Hey, Great Idea!”
  128. “LET IT BE SO!” “You can now pray to us, for we speak in the holy language of ‘JavaScript’, as was laid down by the prophet Brendan Eich. And what you pray for, we will do.” (oh, and just remember to never use the equal sign even once. For ‘tis a Sin, as the holy Crockford has decreed. Remember “three shalt be the number”)
  129. And happily, Paul went back to his cave, and prayed to the New Gods to allow them to: ...serve JS intelligently by transpiling the ES6, minifying the result, serving ES6 Modules using HTTP/2 Push mode with caching, and who knows what else And allow them to ...serve CSS intelligently by transpiling LESS, minifying the result, serving CSS modules using HTTP/2 Push mode with caching, and who know what else And allow them to …serve HTML intelligently by rewriting resources for infinity expiring, render HTML using server-side JS code, and could cache resources using HTTP/2 Push mode with caching, and who know what else for the new gods understood HTML, and CSS, and JavaScript, and could do all these things. And so it was. And the frontend app was now easier to understand, easier to develop, and faster to load. And the Frontend tribe...
  130. ...Oh, the Frontend Tribe, who were a young tribe, but full of energy and passion. And they were happy at last. For now, they need not pray to the old gods, who only understood things like...
  131. ... “Thread Pools”, and...
  132. ...“Message Queues”, and...
  133. “Scala”, They could now pray to the new gods, who understood things like...
  134. ...JavaScript, and...
  135. ...Angular…, and...
  136. ...DOM
  137. Seriously, though. Can we build a server, that would help us in our needs? I think we can. I think all the bricks are in place to do so. Yes, there are initiatives like “Meteor”, but these, IMHO, do not go far enough. They think of themselves only as an MVC framework.
  138. Maybe we should do more - envision a backend platform, that does frontend stuff. Stuff like the above. And who knows what else we could do, if we had the servers? If we had servers that were dedicated to the things important to the frontend. And with these words, I want to end with....
  139. ...Thank you.