SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
ONE PAGE
ONE CODEBASE
How to Write a Crawlable
Single Page Web App
-OR-
Thursday, August 1, 13
@technicolorenvy
Thursday, August 1, 13
noun
1. any application that uses
a web browser as a client.{ }
web ap·pli·ca·tion
Thursday, August 1, 13
“Web 2.0 app”
Routing
View Rendering
Models,
Collections
Persistence
l18n
Currency
formatting, etc.
localStorage
cache
Handling user
events
Logging Static Assets
Client
Server
inspired by http://nerds.airbnb.com/slides-and-video-from-spike-brehms-tech-talk/
Thursday, August 1, 13
Good SEO, Crawlable
Initial load
App logic is DRY
Native-app-like
Thursday, August 1, 13
SPA ALL THE THINGS!
Thursday, August 1, 13
Client-side
MV*
Routing
View Rendering
Models,
Collections
Persistence
l18n
Currency
formatting, etc.
localStorage
cache
Handling user
events
Logging Static Assets
API
Client
Server
THE SINGLE
PAGE APP
http://nerds.airbnb.com/slides-and-video-from-spike-brehms-tech-talk/
Thursday, August 1, 13
Thursday, August 1, 13
WTF?
Thursday, August 1, 13
Good SEO, Crawlable
Initial load
App logic is DRY
Native-app-like
Thursday, August 1, 13
SH%T... HOW DO I MAKE THIS
THING CRAWLABLE?
Thursday, August 1, 13
YOU CAN USE THE DOM...
Thursday, August 1, 13
THESE ARE HACKS
BUT, LETS BE HONEST
Thursday, August 1, 13
OR
Thursday, August 1, 13
Client-side
MV*
+ server
support
Routing
View Rendering
Models,
Collections
Persistence
l18n
Currency
formatting, etc.
localStorage
cache
Handling user
events
API
Client
Server
Routing
View Rendering
Models,
Collections
Persistence
l18n
Currency
formatting, etc.
Logging Static Assets
inspired by http://nerds.airbnb.com/slides-and-video-from-spike-brehms-tech-talk/
Thursday, August 1, 13
Good SEO, Crawlable
Initial load
App logic is DRY
Native-app-like
Thursday, August 1, 13
“But I still
haven’t found
what I’m looking for”
Paul ‘Bono’ Hewson
Thursday, August 1, 13
Client +
server
MV*
Routing
View Rendering
Models,
Collections
Persistence
l18n
Currency
formatting, etc.
localStorage
cache
Handling user
events
Logging Static Assets
API
Client
Server
http://nerds.airbnb.com/slides-and-video-from-spike-brehms-tech-talk/
Thursday, August 1, 13
Good SEO, Crawlable
Initial load
App logic is DRY
Native-app-like
Thursday, August 1, 13
SWEET...
OPTIONS,
WHAT ARE THEY?
Thursday, August 1, 13
DERBY- very alpha, has zero IE support <10, owns data layer, but on
the upside has really rad OT logic built in.
Thursday, August 1, 13
DERBY- very alpha, has zero IE support <10, owns data layer, but on
the upside has really rad OT logic built in.
METEOR- renders server-side w/ phantom.js but only for select
userAgents, owns data layer, but hot code pushes are pretty sweet .
Thursday, August 1, 13
DERBY- very alpha, has zero IE support <10, owns data layer, but on
the upside has really rad OT logic built in.
METEOR- renders server-side w/ phantom.js but only for select
userAgents, owns data layer, but hot code pushes are pretty sweet .
RENDR- uses Backbone + Express, can use any API(s) you choose,
however there are no deep api docs yet.
Thursday, August 1, 13
DERBY- very alpha, has zero IE support <10, owns data layer, but on
the upside has really rad OT logic built in.
METEOR- renders server-side w/ phantom.js but only for select
userAgents, owns data layer, but hot code pushes are pretty sweet .
RENDR- uses Backbone + Express, can use any API(s) you choose,
however there are no deep api docs yet.
Thursday, August 1, 13
+
Thursday, August 1, 13
“Rendr is intended to be a building block along the way to this envisionsed future of web apps
that can be run on either side of the wire according to the needs of your application.”
Thursday, August 1, 13
•A collection of classes - BaseView,
BaseModel, BaseCollection, BaseApp,
ClientRouter, ServerRouter, so on...
•Express Middleware
What comes with Rendr?
Thursday, August 1, 13
•An asset pipeline
•many features that would ship with a
Framework, not a library
What’s Rendr missing?
Thursday, August 1, 13
rendr-cli
A (mostly) shameless plug
Thursday, August 1, 13
<CODE LOOKING>
Thursday, August 1, 13
•Break down into smaller modules
•Lazy load views & templates, etc
•Share routing logic between client & server
•Remove BB dependency?
Direction
Thursday, August 1, 13
• rendr https://github.com/airbnb/rendr
• app template https://github.com/airbnb/rendr-app-
template
• rendr-cli https://github.com/technicolorenvy/rendr-cli
• chart stealing from http://nerds.airbnb.com/slides-and-
video-from-spike-brehms-tech-talk/
• holy grail http://nerds.airbnb.com/weve-launched-our-
first-nodejs-app-to-product/
oh, the places you’ll go
Thursday, August 1, 13
THANKS!
Thursday, August 1, 13

Contenu connexe

Similaire à One Page, One App -or- How to Write a Crawlable Single Page Web App

What is Google App Engine
What is Google App EngineWhat is Google App Engine
What is Google App Engine
Chris Schalk
 
Improving Your Heroku App Performance with Asset CDN and Unicorn
Improving Your Heroku App Performance with Asset CDN and UnicornImproving Your Heroku App Performance with Asset CDN and Unicorn
Improving Your Heroku App Performance with Asset CDN and Unicorn
Simon Bagreev
 
Meteor - Codemotion Rome 2015
Meteor - Codemotion Rome 2015Meteor - Codemotion Rome 2015
Meteor - Codemotion Rome 2015
Codemotion
 

Similaire à One Page, One App -or- How to Write a Crawlable Single Page Web App (20)

Linked data based semantic annotation using Drupal and Apache Stanbol
Linked data based semantic annotation using Drupal and Apache StanbolLinked data based semantic annotation using Drupal and Apache Stanbol
Linked data based semantic annotation using Drupal and Apache Stanbol
 
Introduction to NoSQL with Couchbase
Introduction to NoSQL with CouchbaseIntroduction to NoSQL with Couchbase
Introduction to NoSQL with Couchbase
 
DiUS Computing Lca Rails Final
DiUS  Computing Lca Rails FinalDiUS  Computing Lca Rails Final
DiUS Computing Lca Rails Final
 
Rapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoopRapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoop
 
What is Google App Engine
What is Google App EngineWhat is Google App Engine
What is Google App Engine
 
Offline of web applications
Offline of web applicationsOffline of web applications
Offline of web applications
 
Offline for web - Frontend Dev Conf Minsk 2014
Offline for web - Frontend Dev Conf Minsk 2014Offline for web - Frontend Dev Conf Minsk 2014
Offline for web - Frontend Dev Conf Minsk 2014
 
Hotcode 2013: Javascript in a database (Part 2)
Hotcode 2013: Javascript in a database (Part 2)Hotcode 2013: Javascript in a database (Part 2)
Hotcode 2013: Javascript in a database (Part 2)
 
Building a Startup Stack with AngularJS
Building a Startup Stack with AngularJSBuilding a Startup Stack with AngularJS
Building a Startup Stack with AngularJS
 
Improving Your Heroku App Performance with Asset CDN and Unicorn
Improving Your Heroku App Performance with Asset CDN and UnicornImproving Your Heroku App Performance with Asset CDN and Unicorn
Improving Your Heroku App Performance with Asset CDN and Unicorn
 
Wix Application Framework
Wix Application FrameworkWix Application Framework
Wix Application Framework
 
Developing a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2IDeveloping a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2I
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Meteor - Codemotion Rome 2015
Meteor - Codemotion Rome 2015Meteor - Codemotion Rome 2015
Meteor - Codemotion Rome 2015
 
Meteor + Polymer
Meteor + PolymerMeteor + Polymer
Meteor + Polymer
 
Atomic Design with Next.js
Atomic Design with Next.jsAtomic Design with Next.js
Atomic Design with Next.js
 
Things you must know on ruby on rails single page application
Things you must know on ruby on rails single page applicationThings you must know on ruby on rails single page application
Things you must know on ruby on rails single page application
 
Use drupal 8 as a framework the romance recalibration
Use drupal 8 as a framework   the romance recalibrationUse drupal 8 as a framework   the romance recalibration
Use drupal 8 as a framework the romance recalibration
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic Framework
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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...
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

One Page, One App -or- How to Write a Crawlable Single Page Web App