Spotify Apps -- a taste of the future of desktop apps?

I had a go at building a Spotify App at the weekend. I was pleasantly surprised how simple and intuitive it is. Enjoyable too -- highly recommended. If you've ever tried any client-side web development, you're already familiar with the technologies involved. Premium account not required. Have you tried it yet? What did you think?

A Spotify App is really just an Index.html file which you can hack any way you want, along with any CSS or JS files -- just as you might expect from a HTML5-based dev platform. It seems you can access every aspect of the Spotify application, from the obvious stuff like user data and playlists etc to the player engine; and more too including authentication, some evidence of filesystem access, third-party social platforms and APIs, etc.

    // Spotify App JavaScript example: get playlist.
    var playlist = sp.core.getPlaylist('spotify:user:tim_acheson:playlist:64WuH2cJahz6BYDLKVWJ5m');
    for (i=0; i<=playlist.length; i++) {
        var track = playlist.getTrack(i);

The first thing I noticed, just by traversing the object model with my JavaScript code, is that there's much more to it than what's currently covered in the documentation. In fact, I even found myself wondering whether developers were supposed to be meddling with some of this stuff yet...

Another thing that really struck me is how nice it is being able to extend desktop software using existing technologies and knowledge and skills I already have from developing for the web. I could imagine this sort of think being the future of desktop apps. I hope building Windows 8 apps using HTML5/JS/CSS is a bit like this! ;P

The richness of the objects available to the JavaScript reminded me of working with Silverlight using JavaScript. (Silverlight  embedded in a web page is integrated with JavaScript by default in stark contrast to Flash where the developer has to explicitly write daft boilerplate ActionScript for every aspect of the Flash-JavaScript bridge, and even then the resulting object model in JavaScript is inflexible and often counter-intuitive).


Also, here's my concise and abridged quick-start Spotify App JavaScript API reference, which I jotted down as I played with it. ;)

I'll add to this too, because there's a stuff that the official documentation doesn't mention -- a lot of stuff which you wouldn't even know is there! So watch this space...

If you have any questions, feel free to ask me -- if it's your first attempt, I might be able to save you running into problems or questions that I've already sorted out.

Enjoy! ;)

08 December 2011

Share the love:

Comments: 6

Add Comment

Tim Acheson (15 Oct 12, 13:22)

Related: Microsoft announces Xbox Music!

Maybe this is why my feature requests for a Spotify app on Xbox, directed at both Xbox and Spotify, were never fulfilled! (E.g. on Spotify's support forum on 14 December 2011, or my comment on Major Nelson's blog post ten months ago.)

A smart move for Spotify now would be to develop an app for Xbox! I must admit, I love Spotify, but my experience with their customer support could not be much worse. I purchased a track from Spotify and the downloaded file was corrupted. I've been emailing them every month for almost three years now and sometimes they reply to say they're investigating but still no real response.

See also: LiveSide coverage of Xbox Music announcement.

Tim Acheson (07 Mar 13, 16:27)

Spotify has just launched a WebPlayer and it's awesome! You can now use and listen to Spotify in a web browser. It's currently in Beta and available as a preview in the UK before the global roll-out.

Tim Acheson (13 Sep 13, 16:06)

Related: Twitter #Music app launched on Spotify

The new Twitter #Music app on Spotify is well worth a look. It's an excellent concept, perfect within the context of the Spotify player, and it's well-executed. Best Spotify app to date, imho. Twitter's stand-alone Twitter Music app was always an interesting idea, but it works even better within the context of the Spotify player.

Tim Acheson (29 Oct 14, 16:57)

Spotify's sent out an email to their developer email list today confirming that Apps are now being removed from the desktop client, a while after they stopped accepting submission for new app submissions. I gather that they plan to drop support for the desktop app altogether eventually, presumably because web apps are the future on all platforms. The benefits of web apps over desktop apps are well documented.


  • Twitter
  • LinkedIn
  • Facebook
  • Windows Live / Messenger
  • Xbox Live
  • RSS
  • Email