Your SlideShare is downloading. ×
0
Shazam to Spotify - spike/demo web project
Shazam to Spotify - spike/demo web project
Shazam to Spotify - spike/demo web project
Shazam to Spotify - spike/demo web project
Shazam to Spotify - spike/demo web project
Shazam to Spotify - spike/demo web project
Shazam to Spotify - spike/demo web project
Shazam to Spotify - spike/demo web project
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Shazam to Spotify - spike/demo web project

4,388

Published on

Converting a Shazam history in a Spotify playlist.

Converting a Shazam history in a Spotify playlist.

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
4,388
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  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

×