SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Downloaden Sie, um offline zu lesen
Shazam to Spotify
web demo project
Converting a Shazam history in a Spotify playlist.

Fabio Mora - http://fabio.mora.name
Live at http://shazam2spotify.techeffe.net
Source at https://github.com/morafabio/shazam2spotify/
Try it by downloading a sample Shazam history.

Fabio Mora - http://fabio.mora.name
Fabio Mora - http://fabio.mora.name
Technologies
● Frontend
○ Twitter Bootstrap 3
○ AngularJS

● Backend
○ PHP5.4
○ Silex - a web microframework based on Symfony2
○ Guzzle - a HTTP client for consuming web services

● Server
○
○
○
○

A small cloud VPS
Ubuntu 12.04
nginx
php-fpm
Fabio Mora - http://fabio.mora.name
Coding notes
● C.R.C. cards
○ I started with those to clarify myself the domain model

● T.D.D.
○ I used Test Driven Development
■
■

Karma is used for JS unit testing
PHPUnit is used for unit and integration tests

● Covered by end to end tests
○ Selenium is used for functional tests

● Continuous Integration
○ Travis CI is used as CI server
https://travis-ci.org/morafabio/shazam2spotify

Fabio Mora - http://fabio.mora.name
Coding notes
● Git as version control system
○ And hosted on GitHub
https://github.com/morafabio/shazam2spotify/

● Bash scripting
○ Repetitive tasks and builds are automated
https://github.com/morafabio/shazam2spotify/tree/master/scripts

● Dependency managers
○ Composer for PHP
○ Bower for JS
○ NPM for Karma

● Design Patterns
○ Factory, Proxy, Mediator, Decorator (from the GoF)
○ Dependency Injection
○ MVC
Fabio Mora - http://fabio.mora.name
How it works
1. A file is uploaded to the server service via POST
●

https://github.com/morafabio/shazam2spotify/blob/master/public/js/app.js#L9-L24

2. The controller handle the request
●

https://github.com/morafabio/shazam2spotify/blob/master/public/service/app.php#L20-L41

3. The parser filters the input file
●

https://github.com/morafabio/shazam2spotify/blob/master/src/Shazam2Spotify/Shazam/History.php#L27-L39

4. Domain object are generated: playlist and songs
●

https://github.com/morafabio/shazam2spotify/tree/master/src/Shazam2Spotify/Common

5. Each song in the playlist is parsed
●

https://github.com/morafabio/shazam2spotify/blob/master/src/Shazam2Spotify/Service/Locator.php#L24-L33

6. The Spotify Metadata API is consumed
●

https://github.com/morafabio/shazam2spotify/blob/master/src/Shazam2Spotify/Spotify/Metadata.php

7. The response is sent back in JSON
●

https://github.com/morafabio/shazam2spotify/blob/master/src/Shazam2Spotify/Common/Playlist.php#L24-L33

8. The view is rendered by the controller
●
●

https://github.com/morafabio/shazam2spotify/blob/master/public/js/filters.js
https://github.com/morafabio/shazam2spotify/blob/master/public/index.html#L66-L83
Fabio Mora - http://fabio.mora.name
Thanks!

Fabio Mora - http://fabio.mora.name

Weitere ähnliche Inhalte

Was ist angesagt?

"fireap" - fast task runner on consul
"fireap" - fast task runner on consul"fireap" - fast task runner on consul
"fireap" - fast task runner on consulIKEDA Kiyoshi
 
Pharo 8.0 (alpha) and more
Pharo 8.0 (alpha) and morePharo 8.0 (alpha) and more
Pharo 8.0 (alpha) and moreESUG
 
Raspberry pi Part 26
Raspberry pi Part 26Raspberry pi Part 26
Raspberry pi Part 26Techvilla
 
Front Page of Hacker News with GitLab Pages
Front Page of Hacker News with GitLab PagesFront Page of Hacker News with GitLab Pages
Front Page of Hacker News with GitLab PagesWill Hall
 
Mothra - A FreeBSD send-pr tool for bugzilla system
Mothra - A FreeBSD send-pr tool for bugzilla systemMothra - A FreeBSD send-pr tool for bugzilla system
Mothra - A FreeBSD send-pr tool for bugzilla systemDaniel Lin
 
Heroku & Sinatra
Heroku & SinatraHeroku & Sinatra
Heroku & Sinatramyles_byrne
 
KDE Plasma Develop Intro
KDE Plasma Develop IntroKDE Plasma Develop Intro
KDE Plasma Develop Introcsslayer
 
Type script新鮮貨報你知
Type script新鮮貨報你知Type script新鮮貨報你知
Type script新鮮貨報你知Jimmy Ho
 
Embedding Chromium into AGL demo platform with WAM
Embedding Chromium into AGL demo platform with WAMEmbedding Chromium into AGL demo platform with WAM
Embedding Chromium into AGL demo platform with WAMIgalia
 
Having fun with Raspberry(s) and Apache projects
Having fun with Raspberry(s) and Apache projectsHaving fun with Raspberry(s) and Apache projects
Having fun with Raspberry(s) and Apache projectsJean-Frederic Clere
 

Was ist angesagt? (11)

"fireap" - fast task runner on consul
"fireap" - fast task runner on consul"fireap" - fast task runner on consul
"fireap" - fast task runner on consul
 
Python in a real life
Python in a real lifePython in a real life
Python in a real life
 
Pharo 8.0 (alpha) and more
Pharo 8.0 (alpha) and morePharo 8.0 (alpha) and more
Pharo 8.0 (alpha) and more
 
Raspberry pi Part 26
Raspberry pi Part 26Raspberry pi Part 26
Raspberry pi Part 26
 
Front Page of Hacker News with GitLab Pages
Front Page of Hacker News with GitLab PagesFront Page of Hacker News with GitLab Pages
Front Page of Hacker News with GitLab Pages
 
Mothra - A FreeBSD send-pr tool for bugzilla system
Mothra - A FreeBSD send-pr tool for bugzilla systemMothra - A FreeBSD send-pr tool for bugzilla system
Mothra - A FreeBSD send-pr tool for bugzilla system
 
Heroku & Sinatra
Heroku & SinatraHeroku & Sinatra
Heroku & Sinatra
 
KDE Plasma Develop Intro
KDE Plasma Develop IntroKDE Plasma Develop Intro
KDE Plasma Develop Intro
 
Type script新鮮貨報你知
Type script新鮮貨報你知Type script新鮮貨報你知
Type script新鮮貨報你知
 
Embedding Chromium into AGL demo platform with WAM
Embedding Chromium into AGL demo platform with WAMEmbedding Chromium into AGL demo platform with WAM
Embedding Chromium into AGL demo platform with WAM
 
Having fun with Raspberry(s) and Apache projects
Having fun with Raspberry(s) and Apache projectsHaving fun with Raspberry(s) and Apache projects
Having fun with Raspberry(s) and Apache projects
 

Ähnlich wie Shazam to Spotify web demo converts history to playlist

Deployment tales
Deployment talesDeployment tales
Deployment talesAmoniac OÜ
 
Fuzzing softwares for bugs - OWASP Seasides
Fuzzing softwares for bugs - OWASP SeasidesFuzzing softwares for bugs - OWASP Seasides
Fuzzing softwares for bugs - OWASP SeasidesOWASPSeasides
 
Magento 2 performance profiling and best practices
Magento 2 performance profiling and best practicesMagento 2 performance profiling and best practices
Magento 2 performance profiling and best practicesJacques Bodin-Hullin
 
TYPO3 Flow - Web Sockets
TYPO3 Flow - Web SocketsTYPO3 Flow - Web Sockets
TYPO3 Flow - Web SocketsChanthorn Ngeth
 
使用Eclipse快樂的mruby開發
使用Eclipse快樂的mruby開發使用Eclipse快樂的mruby開發
使用Eclipse快樂的mruby開發yamanekko
 
CloudOpen North America 2013: Vagrant & CFEngine
CloudOpen North America 2013: Vagrant & CFEngineCloudOpen North America 2013: Vagrant & CFEngine
CloudOpen North America 2013: Vagrant & CFEngineNick Anderson
 
Bodin - Hullin & Potencier - Magento Performance Profiling and Best Practices
Bodin - Hullin & Potencier - Magento Performance Profiling and Best PracticesBodin - Hullin & Potencier - Magento Performance Profiling and Best Practices
Bodin - Hullin & Potencier - Magento Performance Profiling and Best PracticesMeet Magento Italy
 
Panther loves Symfony apps
Panther loves Symfony appsPanther loves Symfony apps
Panther loves Symfony appsSimone D'Amico
 
SaaS Boilerplate.pptx
SaaS Boilerplate.pptxSaaS Boilerplate.pptx
SaaS Boilerplate.pptxDuyKhi8
 
ENIB 2015-2016 - CAI Web - S01E01- La forge JavaScript
ENIB 2015-2016 - CAI Web - S01E01- La forge JavaScriptENIB 2015-2016 - CAI Web - S01E01- La forge JavaScript
ENIB 2015-2016 - CAI Web - S01E01- La forge JavaScriptHoracio Gonzalez
 
Mitmproxy usage v20141216
Mitmproxy usage v20141216Mitmproxy usage v20141216
Mitmproxy usage v20141216Jingchao Di
 
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScriptENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScriptHoracio Gonzalez
 
Using VIM for PHP/Symfony development
Using VIM for PHP/Symfony developmentUsing VIM for PHP/Symfony development
Using VIM for PHP/Symfony developmentCarlos Mafla
 
TriplePlay-WebAppPenTestingTools
TriplePlay-WebAppPenTestingToolsTriplePlay-WebAppPenTestingTools
TriplePlay-WebAppPenTestingToolsYury Chemerkin
 
Scalable Django Architecture
Scalable Django ArchitectureScalable Django Architecture
Scalable Django ArchitectureRami Sayar
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Chef on SmartOS
Chef on SmartOSChef on SmartOS
Chef on SmartOSEric Saxby
 

Ähnlich wie Shazam to Spotify web demo converts history to playlist (20)

Deployment tales
Deployment talesDeployment tales
Deployment tales
 
Deployment tales
Deployment talesDeployment tales
Deployment tales
 
Fuzzing softwares for bugs - OWASP Seasides
Fuzzing softwares for bugs - OWASP SeasidesFuzzing softwares for bugs - OWASP Seasides
Fuzzing softwares for bugs - OWASP Seasides
 
Magento 2 performance profiling and best practices
Magento 2 performance profiling and best practicesMagento 2 performance profiling and best practices
Magento 2 performance profiling and best practices
 
TYPO3 Flow - Web Sockets
TYPO3 Flow - Web SocketsTYPO3 Flow - Web Sockets
TYPO3 Flow - Web Sockets
 
使用Eclipse快樂的mruby開發
使用Eclipse快樂的mruby開發使用Eclipse快樂的mruby開發
使用Eclipse快樂的mruby開發
 
CloudOpen North America 2013: Vagrant & CFEngine
CloudOpen North America 2013: Vagrant & CFEngineCloudOpen North America 2013: Vagrant & CFEngine
CloudOpen North America 2013: Vagrant & CFEngine
 
Bodin - Hullin & Potencier - Magento Performance Profiling and Best Practices
Bodin - Hullin & Potencier - Magento Performance Profiling and Best PracticesBodin - Hullin & Potencier - Magento Performance Profiling and Best Practices
Bodin - Hullin & Potencier - Magento Performance Profiling and Best Practices
 
Panther loves Symfony apps
Panther loves Symfony appsPanther loves Symfony apps
Panther loves Symfony apps
 
SaaS Boilerplate.pptx
SaaS Boilerplate.pptxSaaS Boilerplate.pptx
SaaS Boilerplate.pptx
 
ENIB 2015-2016 - CAI Web - S01E01- La forge JavaScript
ENIB 2015-2016 - CAI Web - S01E01- La forge JavaScriptENIB 2015-2016 - CAI Web - S01E01- La forge JavaScript
ENIB 2015-2016 - CAI Web - S01E01- La forge JavaScript
 
Mitmproxy usage v20141216
Mitmproxy usage v20141216Mitmproxy usage v20141216
Mitmproxy usage v20141216
 
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScriptENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
 
Using VIM for PHP/Symfony development
Using VIM for PHP/Symfony developmentUsing VIM for PHP/Symfony development
Using VIM for PHP/Symfony development
 
TriplePlay-WebAppPenTestingTools
TriplePlay-WebAppPenTestingToolsTriplePlay-WebAppPenTestingTools
TriplePlay-WebAppPenTestingTools
 
Argocd up and running
Argocd up and runningArgocd up and running
Argocd up and running
 
Scalable Django Architecture
Scalable Django ArchitectureScalable Django Architecture
Scalable Django Architecture
 
Running Symfony
Running SymfonyRunning Symfony
Running Symfony
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Chef on SmartOS
Chef on SmartOSChef on SmartOS
Chef on SmartOS
 

Mehr von Fabio Mora

Esperimenti Kanban: tra economia e teoria delle code.
Esperimenti Kanban: tra economia e teoria delle code.Esperimenti Kanban: tra economia e teoria delle code.
Esperimenti Kanban: tra economia e teoria delle code.Fabio Mora
 
La Unix Way vista da un DevOps
La Unix Way vista da un DevOpsLa Unix Way vista da un DevOps
La Unix Way vista da un DevOpsFabio Mora
 
We don't talk about Agile anymore
We don't talk about Agile anymoreWe don't talk about Agile anymore
We don't talk about Agile anymoreFabio Mora
 
A quick introduction: Extreme Programming
A quick introduction: Extreme ProgrammingA quick introduction: Extreme Programming
A quick introduction: Extreme ProgrammingFabio Mora
 
Quick Introduction: Extreme Programming
Quick Introduction: Extreme ProgrammingQuick Introduction: Extreme Programming
Quick Introduction: Extreme ProgrammingFabio Mora
 
Progressive Feature Rollout
Progressive Feature RolloutProgressive Feature Rollout
Progressive Feature RolloutFabio Mora
 
It was just Open Source - TEDx Novara
It was just Open Source - TEDx NovaraIt was just Open Source - TEDx Novara
It was just Open Source - TEDx NovaraFabio Mora
 
2009 - Quotidiana Legalità
2009 - Quotidiana Legalità2009 - Quotidiana Legalità
2009 - Quotidiana LegalitàFabio Mora
 
The Crossword Game
The Crossword GameThe Crossword Game
The Crossword GameFabio Mora
 
Continuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by exampleContinuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by exampleFabio Mora
 
L’elefante nella stanza! [con LiquidO™] - Codemotion 2014
L’elefante nella stanza! [con LiquidO™] - Codemotion 2014L’elefante nella stanza! [con LiquidO™] - Codemotion 2014
L’elefante nella stanza! [con LiquidO™] - Codemotion 2014Fabio Mora
 
L’elefante nella stanza! [con LiquidO™]
L’elefante nella stanza! [con LiquidO™] L’elefante nella stanza! [con LiquidO™]
L’elefante nella stanza! [con LiquidO™] Fabio Mora
 
Tanti "piccoli rilasci" con Symfony2
Tanti "piccoli rilasci" con Symfony2Tanti "piccoli rilasci" con Symfony2
Tanti "piccoli rilasci" con Symfony2Fabio Mora
 
LinuxDay 2009 - Quali programmi?
LinuxDay 2009 - Quali programmi?LinuxDay 2009 - Quali programmi?
LinuxDay 2009 - Quali programmi?Fabio Mora
 
LinuxDay 2009 - Cos'è Linux?
LinuxDay 2009 - Cos'è Linux?LinuxDay 2009 - Cos'è Linux?
LinuxDay 2009 - Cos'è Linux?Fabio Mora
 
Se “Embrace Change” è difficile.
Se “Embrace Change” è difficile.Se “Embrace Change” è difficile.
Se “Embrace Change” è difficile.Fabio Mora
 
If "Embrace Change" is Hard (@milano-xpug)
If "Embrace Change" is Hard (@milano-xpug)If "Embrace Change" is Hard (@milano-xpug)
If "Embrace Change" is Hard (@milano-xpug)Fabio Mora
 
Perchè Agile? Cambiamenti culturali work in progress.
Perchè Agile? Cambiamenti culturali work in progress.Perchè Agile? Cambiamenti culturali work in progress.
Perchè Agile? Cambiamenti culturali work in progress.Fabio Mora
 
cambiare punto di vista
cambiare punto di vistacambiare punto di vista
cambiare punto di vistaFabio Mora
 
CoderDojo - Galliate, 20 aprile 2013
CoderDojo - Galliate, 20 aprile 2013CoderDojo - Galliate, 20 aprile 2013
CoderDojo - Galliate, 20 aprile 2013Fabio Mora
 

Mehr von Fabio Mora (20)

Esperimenti Kanban: tra economia e teoria delle code.
Esperimenti Kanban: tra economia e teoria delle code.Esperimenti Kanban: tra economia e teoria delle code.
Esperimenti Kanban: tra economia e teoria delle code.
 
La Unix Way vista da un DevOps
La Unix Way vista da un DevOpsLa Unix Way vista da un DevOps
La Unix Way vista da un DevOps
 
We don't talk about Agile anymore
We don't talk about Agile anymoreWe don't talk about Agile anymore
We don't talk about Agile anymore
 
A quick introduction: Extreme Programming
A quick introduction: Extreme ProgrammingA quick introduction: Extreme Programming
A quick introduction: Extreme Programming
 
Quick Introduction: Extreme Programming
Quick Introduction: Extreme ProgrammingQuick Introduction: Extreme Programming
Quick Introduction: Extreme Programming
 
Progressive Feature Rollout
Progressive Feature RolloutProgressive Feature Rollout
Progressive Feature Rollout
 
It was just Open Source - TEDx Novara
It was just Open Source - TEDx NovaraIt was just Open Source - TEDx Novara
It was just Open Source - TEDx Novara
 
2009 - Quotidiana Legalità
2009 - Quotidiana Legalità2009 - Quotidiana Legalità
2009 - Quotidiana Legalità
 
The Crossword Game
The Crossword GameThe Crossword Game
The Crossword Game
 
Continuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by exampleContinuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by example
 
L’elefante nella stanza! [con LiquidO™] - Codemotion 2014
L’elefante nella stanza! [con LiquidO™] - Codemotion 2014L’elefante nella stanza! [con LiquidO™] - Codemotion 2014
L’elefante nella stanza! [con LiquidO™] - Codemotion 2014
 
L’elefante nella stanza! [con LiquidO™]
L’elefante nella stanza! [con LiquidO™] L’elefante nella stanza! [con LiquidO™]
L’elefante nella stanza! [con LiquidO™]
 
Tanti "piccoli rilasci" con Symfony2
Tanti "piccoli rilasci" con Symfony2Tanti "piccoli rilasci" con Symfony2
Tanti "piccoli rilasci" con Symfony2
 
LinuxDay 2009 - Quali programmi?
LinuxDay 2009 - Quali programmi?LinuxDay 2009 - Quali programmi?
LinuxDay 2009 - Quali programmi?
 
LinuxDay 2009 - Cos'è Linux?
LinuxDay 2009 - Cos'è Linux?LinuxDay 2009 - Cos'è Linux?
LinuxDay 2009 - Cos'è Linux?
 
Se “Embrace Change” è difficile.
Se “Embrace Change” è difficile.Se “Embrace Change” è difficile.
Se “Embrace Change” è difficile.
 
If "Embrace Change" is Hard (@milano-xpug)
If "Embrace Change" is Hard (@milano-xpug)If "Embrace Change" is Hard (@milano-xpug)
If "Embrace Change" is Hard (@milano-xpug)
 
Perchè Agile? Cambiamenti culturali work in progress.
Perchè Agile? Cambiamenti culturali work in progress.Perchè Agile? Cambiamenti culturali work in progress.
Perchè Agile? Cambiamenti culturali work in progress.
 
cambiare punto di vista
cambiare punto di vistacambiare punto di vista
cambiare punto di vista
 
CoderDojo - Galliate, 20 aprile 2013
CoderDojo - Galliate, 20 aprile 2013CoderDojo - Galliate, 20 aprile 2013
CoderDojo - Galliate, 20 aprile 2013
 

Kürzlich hochgeladen

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 

Kürzlich hochgeladen (20)

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 

Shazam to Spotify web demo converts history to playlist

  • 1. Shazam to Spotify web demo project Converting a Shazam history in a Spotify playlist. Fabio Mora - http://fabio.mora.name
  • 2. Live at http://shazam2spotify.techeffe.net Source at https://github.com/morafabio/shazam2spotify/ Try it by downloading a sample Shazam history. Fabio Mora - http://fabio.mora.name
  • 3. Fabio Mora - http://fabio.mora.name
  • 4. Technologies ● Frontend ○ Twitter Bootstrap 3 ○ AngularJS ● Backend ○ PHP5.4 ○ Silex - a web microframework based on Symfony2 ○ Guzzle - a HTTP client for consuming web services ● Server ○ ○ ○ ○ A small cloud VPS Ubuntu 12.04 nginx php-fpm Fabio Mora - http://fabio.mora.name
  • 5. Coding notes ● C.R.C. cards ○ I started with those to clarify myself the domain model ● T.D.D. ○ I used Test Driven Development ■ ■ Karma is used for JS unit testing PHPUnit is used for unit and integration tests ● Covered by end to end tests ○ Selenium is used for functional tests ● Continuous Integration ○ Travis CI is used as CI server https://travis-ci.org/morafabio/shazam2spotify Fabio Mora - http://fabio.mora.name
  • 6. Coding notes ● Git as version control system ○ And hosted on GitHub https://github.com/morafabio/shazam2spotify/ ● Bash scripting ○ Repetitive tasks and builds are automated https://github.com/morafabio/shazam2spotify/tree/master/scripts ● Dependency managers ○ Composer for PHP ○ Bower for JS ○ NPM for Karma ● Design Patterns ○ Factory, Proxy, Mediator, Decorator (from the GoF) ○ Dependency Injection ○ MVC Fabio Mora - http://fabio.mora.name
  • 7. How it works 1. A file is uploaded to the server service via POST ● https://github.com/morafabio/shazam2spotify/blob/master/public/js/app.js#L9-L24 2. The controller handle the request ● https://github.com/morafabio/shazam2spotify/blob/master/public/service/app.php#L20-L41 3. The parser filters the input file ● https://github.com/morafabio/shazam2spotify/blob/master/src/Shazam2Spotify/Shazam/History.php#L27-L39 4. Domain object are generated: playlist and songs ● https://github.com/morafabio/shazam2spotify/tree/master/src/Shazam2Spotify/Common 5. Each song in the playlist is parsed ● https://github.com/morafabio/shazam2spotify/blob/master/src/Shazam2Spotify/Service/Locator.php#L24-L33 6. The Spotify Metadata API is consumed ● https://github.com/morafabio/shazam2spotify/blob/master/src/Shazam2Spotify/Spotify/Metadata.php 7. The response is sent back in JSON ● https://github.com/morafabio/shazam2spotify/blob/master/src/Shazam2Spotify/Common/Playlist.php#L24-L33 8. The view is rendered by the controller ● ● https://github.com/morafabio/shazam2spotify/blob/master/public/js/filters.js https://github.com/morafabio/shazam2spotify/blob/master/public/index.html#L66-L83 Fabio Mora - http://fabio.mora.name
  • 8. Thanks! Fabio Mora - http://fabio.mora.name