SlideShare une entreprise Scribd logo
1  sur  14
Télécharger pour lire hors ligne
Pick-a-Plex 
The Pinnacle Cinema 
Experience 
Chris Callahan & Randall Reed, Jr. 
Flatiron School Presents 
August 19th, 2014
The Problem 
● Too many 
theaters! 
● Too many 
showtimes! 
● Too much time to 
choose!
APIs 
“JSON is the lingua franca of the Internet”
Integrating the YouTube API 
$( '.movie-title' ).on( 'click', function() { 
var title = $( this ).text().split( ' ' ).join( '+' ); 
var that = $( this ); 
if ( !$( this ).has( 'a' ).length ) { 
$.get( 'https://www.googleapis.com/youtube/v3/search?part=snippet' + 
'&order=rating&q=' + title + '+Official+Trailer&type=video' + 
'&videoDefinition=high&videoEmbeddable=true' + 
'&key=<%= ENV["YOUTUBE_API_KEY"] %>', function( data ) { 
var slug = data.items[0].id.videoId; 
that.append( '<br><a class="iframe" target="_blank"' + 
'href="//www.youtube.com/embed/' + slug + 
'">Want to see the trailer?</a>' ); 
}); 
}});
Performance Enhancements 
● Raw SQL query to retrieve all data
sql = <<-SQL 
SELECT theaters.name, theaters.id, theaters.rating, movies.title, movies.tomatometer, 
movies.description, showtimes.time, showtimes.fandango_url, showtimes.three_d 
FROM theaters 
JOIN 
( 
SELECT showtimes.theater_id, movies.tomatometer 
FROM showtimes 
JOIN movies ON movies.id = showtimes.movie_id 
WHERE showtimes.theater_id = "#{self.id}" AND showtimes.time > "#{current_time}" 
GROUP BY showtimes.theater_id, movies.tomatometer 
ORDER BY movies.tomatometer DESC 
LIMIT 1 OFFSET 2 
) third_tomatometer 
ON theaters.id = third_tomatometer.theater_id 
JOIN showtimes ON showtimes.theater_id = theaters.id 
JOIN movies ON movies.tomatometer >= third_tomatometer.tomatometer 
AND movies.id = showtimes.movie_id 
WHERE showtimes.time > "#{current_time}" 
ORDER BY movies.tomatometer DESC, movies.title, showtimes.time 
SQL 
ActiveRecord::Base.connection.execute(sql)
Performance Enhancements 
● Raw SQL query to retrieve all data 
● Rake tasks to delete old showtimes and call 
Rotten Tomatoes API
Performance Enhancements 
● Raw SQL query to retrieve all data 
● Rake tasks to delete old showtimes and call 
Rotten Tomatoes API 
● Check zip code before loading showtimes
Zip Code Search 
class RequestsController < ApplicationController 
def create 
# ... 
matching_requests = Request.where("zip_code = ? AND created_at > ?", 
@request.zip_code, today) 
if matching_requests.empty? 
@request.save 
@request.make_theaters 
else 
@request = matching_requests.first 
end 
# ... 
end 
end
DEMO
Going Forward 
● More robust theater rating data 
● API caching 
● Additional movie info
Thank You 
@randallocalypse @_c_cal

Contenu connexe

Tendances

Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress PluginColin Loretz
 
Workshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfastWorkshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfastMichelangelo van Dam
 
JDO 2019: Serverless Hype Driven Development - Grzegorz Piotrowski
JDO 2019: Serverless Hype Driven Development - Grzegorz Piotrowski JDO 2019: Serverless Hype Driven Development - Grzegorz Piotrowski
JDO 2019: Serverless Hype Driven Development - Grzegorz Piotrowski PROIDEA
 
With a Mighty Hammer
With a Mighty HammerWith a Mighty Hammer
With a Mighty HammerBen Scofield
 
Ansible, Simplicity, and the Zen of Python
Ansible, Simplicity, and the Zen of PythonAnsible, Simplicity, and the Zen of Python
Ansible, Simplicity, and the Zen of Pythontoddmowen
 
Joomla! Day UK 2009 .htaccess
Joomla! Day UK 2009 .htaccessJoomla! Day UK 2009 .htaccess
Joomla! Day UK 2009 .htaccessAndy Wallace
 
Serverless Ballerina
Serverless BallerinaServerless Ballerina
Serverless BallerinaBallerina
 
Deploying a Location-Aware Ember Application
Deploying a Location-Aware Ember ApplicationDeploying a Location-Aware Ember Application
Deploying a Location-Aware Ember ApplicationBen Limmer
 

Tendances (11)

Elixir at Evercam (By Milos Mosic)
Elixir at Evercam (By Milos Mosic)Elixir at Evercam (By Milos Mosic)
Elixir at Evercam (By Milos Mosic)
 
Lies, Damn Lies, and Benchmarks
Lies, Damn Lies, and BenchmarksLies, Damn Lies, and Benchmarks
Lies, Damn Lies, and Benchmarks
 
Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress Plugin
 
Workshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfastWorkshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfast
 
Fabric for fun_and_profit
Fabric for fun_and_profitFabric for fun_and_profit
Fabric for fun_and_profit
 
JDO 2019: Serverless Hype Driven Development - Grzegorz Piotrowski
JDO 2019: Serverless Hype Driven Development - Grzegorz Piotrowski JDO 2019: Serverless Hype Driven Development - Grzegorz Piotrowski
JDO 2019: Serverless Hype Driven Development - Grzegorz Piotrowski
 
With a Mighty Hammer
With a Mighty HammerWith a Mighty Hammer
With a Mighty Hammer
 
Ansible, Simplicity, and the Zen of Python
Ansible, Simplicity, and the Zen of PythonAnsible, Simplicity, and the Zen of Python
Ansible, Simplicity, and the Zen of Python
 
Joomla! Day UK 2009 .htaccess
Joomla! Day UK 2009 .htaccessJoomla! Day UK 2009 .htaccess
Joomla! Day UK 2009 .htaccess
 
Serverless Ballerina
Serverless BallerinaServerless Ballerina
Serverless Ballerina
 
Deploying a Location-Aware Ember Application
Deploying a Location-Aware Ember ApplicationDeploying a Location-Aware Ember Application
Deploying a Location-Aware Ember Application
 

En vedette

RSA Fellowship Council Twitterstream 12-12-12
RSA Fellowship Council Twitterstream 12-12-12RSA Fellowship Council Twitterstream 12-12-12
RSA Fellowship Council Twitterstream 12-12-12Roxanne Persaud
 
Brand Management For A Social Age
Brand Management For A Social AgeBrand Management For A Social Age
Brand Management For A Social AgeJemima Gibbons
 
Into to Node.js: Building Fast, Scaleable Network Applications
Into to Node.js: Building Fast, Scaleable Network ApplicationsInto to Node.js: Building Fast, Scaleable Network Applications
Into to Node.js: Building Fast, Scaleable Network ApplicationsFlatiron School
 
What's a Core Image? An Image-Processing Framework on iOS and OS X
What's a Core Image? An Image-Processing Framework on iOS and OS XWhat's a Core Image? An Image-Processing Framework on iOS and OS X
What's a Core Image? An Image-Processing Framework on iOS and OS XFlatiron School
 
Let’s play sesame street! - Embrace the power of asking questions.
Let’s play sesame street! - Embrace the power of asking questions.Let’s play sesame street! - Embrace the power of asking questions.
Let’s play sesame street! - Embrace the power of asking questions.☕ 🥧 🚲 Martin Gude
 
Formation marketing Québec - Analyse d'audience
Formation marketing Québec - Analyse d'audienceFormation marketing Québec - Analyse d'audience
Formation marketing Québec - Analyse d'audienceKap Tactiques Numériques
 
Play Music...With Your Head: A Theremin App For Everyone
Play Music...With Your Head: A Theremin App For EveryonePlay Music...With Your Head: A Theremin App For Everyone
Play Music...With Your Head: A Theremin App For EveryoneFlatiron School
 
EuroITV: Predicting future User Behaviour in interactive live TV
EuroITV: Predicting future User Behaviour in interactive live TVEuroITV: Predicting future User Behaviour in interactive live TV
EuroITV: Predicting future User Behaviour in interactive live TV☕ 🥧 🚲 Martin Gude
 
Your social persona
Your social personaYour social persona
Your social personaMatt Collins
 
Paint a Picture – Who does your customer become when they use your product?
Paint a Picture – Who does your customer become when they use your product?Paint a Picture – Who does your customer become when they use your product?
Paint a Picture – Who does your customer become when they use your product?☕ 🥧 🚲 Martin Gude
 
Adplotter and Craigslist
Adplotter and CraigslistAdplotter and Craigslist
Adplotter and CraigslistSky Benson
 
Design-muutosjohtaminen käytännössä
Design-muutosjohtaminen käytännössäDesign-muutosjohtaminen käytännössä
Design-muutosjohtaminen käytännössäJuho Paasonen
 
Starting With Strengths: The Stories We Build #edfling
Starting With Strengths: The Stories We Build #edflingStarting With Strengths: The Stories We Build #edfling
Starting With Strengths: The Stories We Build #edflingChris Wejr
 
Moving Beyond the Newsletter: Communicating Through Social Media
Moving Beyond the Newsletter: Communicating Through Social MediaMoving Beyond the Newsletter: Communicating Through Social Media
Moving Beyond the Newsletter: Communicating Through Social MediaChris Wejr
 
Power of Outdoor Play - We Built a Hill
Power of Outdoor Play - We Built a HillPower of Outdoor Play - We Built a Hill
Power of Outdoor Play - We Built a HillChris Wejr
 
Pigeons, Packs & Paid: Google Local 2015
Pigeons, Packs & Paid: Google Local 2015Pigeons, Packs & Paid: Google Local 2015
Pigeons, Packs & Paid: Google Local 2015Peter "Dr. Pete" Meyers
 
Start With Strengths - Canadian Association of Principals 2015
Start With Strengths - Canadian Association of Principals 2015Start With Strengths - Canadian Association of Principals 2015
Start With Strengths - Canadian Association of Principals 2015Chris Wejr
 

En vedette (20)

RSA Fellowship Council Twitterstream 12-12-12
RSA Fellowship Council Twitterstream 12-12-12RSA Fellowship Council Twitterstream 12-12-12
RSA Fellowship Council Twitterstream 12-12-12
 
Database Opt
Database Opt Database Opt
Database Opt
 
Brand Management For A Social Age
Brand Management For A Social AgeBrand Management For A Social Age
Brand Management For A Social Age
 
Into to Node.js: Building Fast, Scaleable Network Applications
Into to Node.js: Building Fast, Scaleable Network ApplicationsInto to Node.js: Building Fast, Scaleable Network Applications
Into to Node.js: Building Fast, Scaleable Network Applications
 
What's a Core Image? An Image-Processing Framework on iOS and OS X
What's a Core Image? An Image-Processing Framework on iOS and OS XWhat's a Core Image? An Image-Processing Framework on iOS and OS X
What's a Core Image? An Image-Processing Framework on iOS and OS X
 
Let’s play sesame street! - Embrace the power of asking questions.
Let’s play sesame street! - Embrace the power of asking questions.Let’s play sesame street! - Embrace the power of asking questions.
Let’s play sesame street! - Embrace the power of asking questions.
 
Formation marketing Québec - Analyse d'audience
Formation marketing Québec - Analyse d'audienceFormation marketing Québec - Analyse d'audience
Formation marketing Québec - Analyse d'audience
 
FOMO No Mo'
FOMO No Mo' FOMO No Mo'
FOMO No Mo'
 
Play Music...With Your Head: A Theremin App For Everyone
Play Music...With Your Head: A Theremin App For EveryonePlay Music...With Your Head: A Theremin App For Everyone
Play Music...With Your Head: A Theremin App For Everyone
 
Citi Bike Finder
Citi Bike FinderCiti Bike Finder
Citi Bike Finder
 
EuroITV: Predicting future User Behaviour in interactive live TV
EuroITV: Predicting future User Behaviour in interactive live TVEuroITV: Predicting future User Behaviour in interactive live TV
EuroITV: Predicting future User Behaviour in interactive live TV
 
Your social persona
Your social personaYour social persona
Your social persona
 
Paint a Picture – Who does your customer become when they use your product?
Paint a Picture – Who does your customer become when they use your product?Paint a Picture – Who does your customer become when they use your product?
Paint a Picture – Who does your customer become when they use your product?
 
Adplotter and Craigslist
Adplotter and CraigslistAdplotter and Craigslist
Adplotter and Craigslist
 
Design-muutosjohtaminen käytännössä
Design-muutosjohtaminen käytännössäDesign-muutosjohtaminen käytännössä
Design-muutosjohtaminen käytännössä
 
Starting With Strengths: The Stories We Build #edfling
Starting With Strengths: The Stories We Build #edflingStarting With Strengths: The Stories We Build #edfling
Starting With Strengths: The Stories We Build #edfling
 
Moving Beyond the Newsletter: Communicating Through Social Media
Moving Beyond the Newsletter: Communicating Through Social MediaMoving Beyond the Newsletter: Communicating Through Social Media
Moving Beyond the Newsletter: Communicating Through Social Media
 
Power of Outdoor Play - We Built a Hill
Power of Outdoor Play - We Built a HillPower of Outdoor Play - We Built a Hill
Power of Outdoor Play - We Built a Hill
 
Pigeons, Packs & Paid: Google Local 2015
Pigeons, Packs & Paid: Google Local 2015Pigeons, Packs & Paid: Google Local 2015
Pigeons, Packs & Paid: Google Local 2015
 
Start With Strengths - Canadian Association of Principals 2015
Start With Strengths - Canadian Association of Principals 2015Start With Strengths - Canadian Association of Principals 2015
Start With Strengths - Canadian Association of Principals 2015
 

Similaire à Pick-a-Plex App: The Pinnacle of Cinema Experiences

Cross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineCross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineAndy McKay
 
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...Doris Chen
 
Let's play a game with blackfire player
Let's play a game with blackfire playerLet's play a game with blackfire player
Let's play a game with blackfire playerMarcin Czarnecki
 
SQL 쿼리를 AWS DynamoDB에서 (CLI)로 사용해 볼까요?
SQL 쿼리를 AWS DynamoDB에서 (CLI)로 사용해 볼까요?SQL 쿼리를 AWS DynamoDB에서 (CLI)로 사용해 볼까요?
SQL 쿼리를 AWS DynamoDB에서 (CLI)로 사용해 볼까요?PyungHo Yoon
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldChristian Melchior
 
Beyond Page Level Metrics
Beyond Page Level MetricsBeyond Page Level Metrics
Beyond Page Level MetricsPhilip Tellis
 
Automation in angular js
Automation in angular jsAutomation in angular js
Automation in angular jsMarcin Wosinek
 
November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2Kacper Gunia
 
Service Workers for Performance
Service Workers for PerformanceService Workers for Performance
Service Workers for PerformancePatrick Meenan
 
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...BradNeuberg
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup PerformanceJustin Cataldo
 
Async. and Realtime Geo Applications with Node.js
Async. and Realtime Geo Applications with Node.jsAsync. and Realtime Geo Applications with Node.js
Async. and Realtime Geo Applications with Node.jsShoaib Burq
 
Make BDD great again
Make BDD great againMake BDD great again
Make BDD great againYana Gusti
 
FP - Découverte de Play Framework Scala
FP - Découverte de Play Framework ScalaFP - Découverte de Play Framework Scala
FP - Découverte de Play Framework ScalaKévin Margueritte
 
How to Leverage APIs for SEO #TTTLive2019
How to Leverage APIs for SEO #TTTLive2019How to Leverage APIs for SEO #TTTLive2019
How to Leverage APIs for SEO #TTTLive2019Paul Shapiro
 
Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Michelangelo van Dam
 
Curso de Node.js e MongoDB - 16
Curso de Node.js e MongoDB - 16Curso de Node.js e MongoDB - 16
Curso de Node.js e MongoDB - 16Luiz Duarte
 

Similaire à Pick-a-Plex App: The Pinnacle of Cinema Experiences (20)

Cross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineCross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App Engine
 
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...
 
huhu
huhuhuhu
huhu
 
Let's play a game with blackfire player
Let's play a game with blackfire playerLet's play a game with blackfire player
Let's play a game with blackfire player
 
SQL 쿼리를 AWS DynamoDB에서 (CLI)로 사용해 볼까요?
SQL 쿼리를 AWS DynamoDB에서 (CLI)로 사용해 볼까요?SQL 쿼리를 AWS DynamoDB에서 (CLI)로 사용해 볼까요?
SQL 쿼리를 AWS DynamoDB에서 (CLI)로 사용해 볼까요?
 
ApacheCon 2005
ApacheCon 2005ApacheCon 2005
ApacheCon 2005
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected World
 
Postman On Steroids
Postman On SteroidsPostman On Steroids
Postman On Steroids
 
Beyond Page Level Metrics
Beyond Page Level MetricsBeyond Page Level Metrics
Beyond Page Level Metrics
 
Automation in angular js
Automation in angular jsAutomation in angular js
Automation in angular js
 
November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2
 
Service Workers for Performance
Service Workers for PerformanceService Workers for Performance
Service Workers for Performance
 
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup Performance
 
Async. and Realtime Geo Applications with Node.js
Async. and Realtime Geo Applications with Node.jsAsync. and Realtime Geo Applications with Node.js
Async. and Realtime Geo Applications with Node.js
 
Make BDD great again
Make BDD great againMake BDD great again
Make BDD great again
 
FP - Découverte de Play Framework Scala
FP - Découverte de Play Framework ScalaFP - Découverte de Play Framework Scala
FP - Découverte de Play Framework Scala
 
How to Leverage APIs for SEO #TTTLive2019
How to Leverage APIs for SEO #TTTLive2019How to Leverage APIs for SEO #TTTLive2019
How to Leverage APIs for SEO #TTTLive2019
 
Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012
 
Curso de Node.js e MongoDB - 16
Curso de Node.js e MongoDB - 16Curso de Node.js e MongoDB - 16
Curso de Node.js e MongoDB - 16
 

Plus de Flatiron School

How to Leverage Your Network to Land Your First Job as a Developer
How to Leverage Your Network to Land Your First Job as a DeveloperHow to Leverage Your Network to Land Your First Job as a Developer
How to Leverage Your Network to Land Your First Job as a DeveloperFlatiron School
 
Pay and Get Paid: How To Integrate Stripe Into Your App
Pay and Get Paid: How To Integrate Stripe Into Your AppPay and Get Paid: How To Integrate Stripe Into Your App
Pay and Get Paid: How To Integrate Stripe Into Your AppFlatiron School
 
Four Days Out: Quick Itineraries For Last-Minute Dates
Four Days Out: Quick Itineraries For Last-Minute DatesFour Days Out: Quick Itineraries For Last-Minute Dates
Four Days Out: Quick Itineraries For Last-Minute DatesFlatiron School
 
Intro to D3: Data-Driven Documents
Intro to D3: Data-Driven DocumentsIntro to D3: Data-Driven Documents
Intro to D3: Data-Driven DocumentsFlatiron School
 

Plus de Flatiron School (7)

How to Leverage Your Network to Land Your First Job as a Developer
How to Leverage Your Network to Land Your First Job as a DeveloperHow to Leverage Your Network to Land Your First Job as a Developer
How to Leverage Your Network to Land Your First Job as a Developer
 
Pay and Get Paid: How To Integrate Stripe Into Your App
Pay and Get Paid: How To Integrate Stripe Into Your AppPay and Get Paid: How To Integrate Stripe Into Your App
Pay and Get Paid: How To Integrate Stripe Into Your App
 
Four Days Out: Quick Itineraries For Last-Minute Dates
Four Days Out: Quick Itineraries For Last-Minute DatesFour Days Out: Quick Itineraries For Last-Minute Dates
Four Days Out: Quick Itineraries For Last-Minute Dates
 
Intro to D3: Data-Driven Documents
Intro to D3: Data-Driven DocumentsIntro to D3: Data-Driven Documents
Intro to D3: Data-Driven Documents
 
JSON overview and demo
JSON overview and demoJSON overview and demo
JSON overview and demo
 
Creating Ruby Gems
Creating Ruby Gems Creating Ruby Gems
Creating Ruby Gems
 
Form Helpers
Form Helpers Form Helpers
Form Helpers
 

Dernier

Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 

Dernier (20)

Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 

Pick-a-Plex App: The Pinnacle of Cinema Experiences

  • 1. Pick-a-Plex The Pinnacle Cinema Experience Chris Callahan & Randall Reed, Jr. Flatiron School Presents August 19th, 2014
  • 2. The Problem ● Too many theaters! ● Too many showtimes! ● Too much time to choose!
  • 3. APIs “JSON is the lingua franca of the Internet”
  • 4.
  • 5. Integrating the YouTube API $( '.movie-title' ).on( 'click', function() { var title = $( this ).text().split( ' ' ).join( '+' ); var that = $( this ); if ( !$( this ).has( 'a' ).length ) { $.get( 'https://www.googleapis.com/youtube/v3/search?part=snippet' + '&order=rating&q=' + title + '+Official+Trailer&type=video' + '&videoDefinition=high&videoEmbeddable=true' + '&key=<%= ENV["YOUTUBE_API_KEY"] %>', function( data ) { var slug = data.items[0].id.videoId; that.append( '<br><a class="iframe" target="_blank"' + 'href="//www.youtube.com/embed/' + slug + '">Want to see the trailer?</a>' ); }); }});
  • 6. Performance Enhancements ● Raw SQL query to retrieve all data
  • 7. sql = <<-SQL SELECT theaters.name, theaters.id, theaters.rating, movies.title, movies.tomatometer, movies.description, showtimes.time, showtimes.fandango_url, showtimes.three_d FROM theaters JOIN ( SELECT showtimes.theater_id, movies.tomatometer FROM showtimes JOIN movies ON movies.id = showtimes.movie_id WHERE showtimes.theater_id = "#{self.id}" AND showtimes.time > "#{current_time}" GROUP BY showtimes.theater_id, movies.tomatometer ORDER BY movies.tomatometer DESC LIMIT 1 OFFSET 2 ) third_tomatometer ON theaters.id = third_tomatometer.theater_id JOIN showtimes ON showtimes.theater_id = theaters.id JOIN movies ON movies.tomatometer >= third_tomatometer.tomatometer AND movies.id = showtimes.movie_id WHERE showtimes.time > "#{current_time}" ORDER BY movies.tomatometer DESC, movies.title, showtimes.time SQL ActiveRecord::Base.connection.execute(sql)
  • 8. Performance Enhancements ● Raw SQL query to retrieve all data ● Rake tasks to delete old showtimes and call Rotten Tomatoes API
  • 9.
  • 10. Performance Enhancements ● Raw SQL query to retrieve all data ● Rake tasks to delete old showtimes and call Rotten Tomatoes API ● Check zip code before loading showtimes
  • 11. Zip Code Search class RequestsController < ApplicationController def create # ... matching_requests = Request.where("zip_code = ? AND created_at > ?", @request.zip_code, today) if matching_requests.empty? @request.save @request.make_theaters else @request = matching_requests.first end # ... end end
  • 12. DEMO
  • 13. Going Forward ● More robust theater rating data ● API caching ● Additional movie info