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

Shazam to Spotify - spike/demo web project

on

  • 3,797 views

Converting a Shazam history in a Spotify playlist.

Converting a Shazam history in a Spotify playlist.

Statistics

Views

Total Views
3,797
Views on SlideShare
3,795
Embed Views
2

Actions

Likes
0
Downloads
0
Comments
0

1 Embed 2

http://www.slideee.com 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Shazam to Spotify - spike/demo web project Shazam to Spotify - spike/demo web project Presentation Transcript

    • 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