MusicBottle: Difference between revisions

From MusicBrainz Wiki
Jump to navigationJump to search
(→‎Implementation: I18n notes/pointers.)
(use interwiki prefixes)
 
(39 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''MusicBottle''' (or "the bottle") is the temporary codename for a new project being discussed mostly between [[User:Caller_number_six|caller#6]] and [[User:Freso|Freso]]. This here page will document design decisions etc.
'''MusicBottle''' (or "the Bottle") is a project with the intend of presenting [[MusicBrainz]] data in a way more suitable for presentation and browsing where musicbrainz.org is mostly for editing purposes. It is led by [[User:Freso|Freso]] and [[User:Caller_number_six|caller#6]] with contributions from [[User:LordSputnik|Lordsputnik]] and a bunch of other the MusicBrainz people.


Discussion will happen probably mostly on [[Communication/IRC|IRC]] in the room #musicbottle. Feel free to come and hang out. We will probably also utilise the mb-devel [[Communication/Mailing Lists|mailing list]] for getting feedback on some design decisions (e.g., input on how to implement caching).
Discussion will happen probably mostly on [[Communication/IRC|IRC]] in the room #musicbottle. Feel free to come and hang out. We will probably also utilise the mb-devel [[Communication/Mailing Lists|mailing list]] for getting feedback on some design decisions (e.g., input on how to implement caching).

* [https://github.com/Freso/MusicBottle Source code on GitHub.]
* [http://musicbottle.mbsandbox.org/ Code running on the MusicBrainz sandbox server.] (Not guaranteed to be running.)
* [http://ci.musicbrainz.org/job/MusicBottle/ Continuous integration (Jenkins)] (Test results from whenever new code is pushed to GitHub.)
* [https://twitter.com/musicbottle_dev @musicbottle_dev (Twitter)]
* [https://identi.ca/musicbottledev @musicbottledev (Identi.ca)]

<div style="float:left; margin:2em;">[[File:porpoise.jpg]]</div>
== Purpoise, the Mission Statement ==
# Showcase the MusicBrainz data in a prettier way than what can reasonably be achieved on musicbrainz.org.
# Show what can be done using the data fetched from [[MusicBrainz]]' [[Web Service]].


== Background ==
== Background ==
Line 14: Line 25:
== Implementation ==
== Implementation ==


As Freso likes writing Python and CallerNo6 wants to learn the language, this quickly became the language of the project (even though no code has yet been written). [http://flask.pocoo.org/ Flask] was initially recommended by ianweller and subsequently endorsed by ruaok, so that is the framework we're currently looking into. We will most likely aim for getting the code running on an nginx server.
As Freso likes writing [http://xkcd.com/353/ Python] and caller#6 wants to learn the language, this quickly became the language of the project. [http://flask.pocoo.org/ Flask] was initially recommended by ianweller and subsequently endorsed by ruaok, so that is the framework we're currently looking into. We will most likely aim for getting the code running on an nginx server.


We're also going to need some kind of cache, to not hit MusicBrainz (or other sites) over and over again. We're looking into [https://en.wikipedia.org/wiki/MongoDB MongoDB] and possibly other NoSQL databases for now.
We're also going to need some kind of cache, to not hit MusicBrainz (or other sites) over and over again. We're looking into [[wikipedia:MongoDB|MongoDB]] and possibly other NoSQL databases for now.


The main codebase will be GPL v2+ and any libraries developed to keep sane abstractions will be LGPL'd. (Any Flask-specific extensions will be BSD/MIT-style licensed.) All the code will be in Git repositories.
The main codebase is GPL v2+ and any libraries developed to keep sane abstractions will be LGPL'd. (Any Flask-specific extensions will be BSD/MIT-style licensed.) The code is available on [https://github.com/Freso/MusicBottle GitHub].

=== Libraries, APIs, etc. ===
* Web services:
** MusicBrainz: [[Development/XML Web Service/Version 2|XML]] / [[Development/JSON Web Service|JSON]]
** [https://www.mediawiki.org/wiki/API:Main_page MediaWiki API]
** [https://developers.google.com/youtube/ YouTube API]
** [https://dev.twitter.com/ Twitter Developers]
** [https://developers.facebook.com/ Facebook Developers]
** [http://bandcamp.com/developer Bandcamp API] ([http://bandcamp.com/developer/api_terms_of_use Terms])
** [[Cover_Art_Archive/API|Cover Art Archive]]
** [http://fanart.tv/api-docs/music-api/ Fanart.tv Music API]
** [http://developer.myspace.com/ MySpace Developer Platform]
** [http://www.apple.com/itunes/affiliates/resources/blog/introduction---search-api.html iTunes Search API]
** [https://www.discogs.com/developers/ Discogs API]
** [[Flickr Machine Tag]]
*** [http://www.flickr.com/services/api/ Flickr API]
** [http://www.last.fm/api Last.fm API] (provides lookup of artist by MBID and images for artists)
** [http://www.worldcat.org/wcpa/content/affiliate/default.jsp WorldCat Affiliate Tools]
* [http://docs.python.org/release/2.6.5/ Python] libraries:
** [http://docs.python.org/release/2.6.5/library/urllib2.html urllib2]
** [http://docs.python.org/release/2.6.5/library/urlparse.html urlparse]
** [http://api.mongodb.org/python/2.3/api/pymongo/ pymongo]
* [http://flask.pocoo.org/docs/ Flask]
** [http://packages.python.org/Flask-Babel/ Flask-Babel]
** [https://flask-pymongo.readthedocs.org/en/latest/ Flask-PyMongo]
** [http://packages.python.org/Flask-Testing/ Flask-Testing]
** [http://flask-script.readthedocs.org/en/latest/ Flask-Script] (manage.py)
* [http://jinja.pocoo.org/docs/ Jinja2]
* [http://werkzeug.pocoo.org/docs/ Werkzeug]
* [http://www.mongodb.org/display/DOCS/Home MongoDB]
*Other
**[http://talka.tv/docs/ Talkatv] comment system ([https://github.com/talkatv/talkatv github page])
** [http://schema.org/ schema.org]


=== Other pointers ===
=== Other pointers ===


* [http://flask.pocoo.org/docs/styleguide/ Coding style (Pocoo Styleguide)]
* [http://flask.pocoo.org/docs/styleguide/ Coding style (Pocoo Styleguide)]
** @seealso [http://python.net/~goodger/projects/pycon/2007/idiomatic/ Code Like a Pythonista: Idiomatic Python] for a tour through PEP 8 and various Python "tricks".
* I18n:
* I18n:
** [http://flask.pocoo.org/docs/patterns/urlprocessors/ Using URL Processors (Flask docs)]
** [http://flask.pocoo.org/docs/patterns/urlprocessors/ Using URL Processors (Flask docs)]
** [http://packages.python.org/Flask-Babel/ Flask-Babel]
** [http://packages.python.org/Flask-Babel/ Flask-Babel]
* Testing
** [https://github.com/gabrielfalcao/HTTPretty HTTPretty]
** [http://lists.idyll.org/pipermail/testing-in-python/2012-December/005280.html [TIP] testing against HTTP services]
* See JSON output "pretty-printed" in your browser:
** [https://addons.mozilla.org/en-us/firefox/addon/jsonview/ Firefox]
** [https://chrome.google.com/webstore/search-extensions/jsonview Chrome]
* Examples of Flask usage
** [https://github.com/mitsuhiko/flask/wiki/Large-app-how-to Large app how to]
* Miscellaneous
** [http://stackoverflow.com/questions/9499286/using-google-oauth2-with-flask Using Google OAuth2 with Flask]


== Random ideas ==
== Random ideas ==
Line 34: Line 89:


Images from fanart.tv
Images from fanart.tv

== Proper name ==

The "Musicbottle" name is just a codename until we decide on a proper name. Several suggestions have been thrown back and forth. General themes are music and brains (for obvious reasons), bottles/flasks (due to using Flask), and Star Trek (because of [[MusicBrainz Picard]] and CallerNo6 being an old-time trekkie). [[/Name suggestions|Suggestions are welcome.]]


== Inspiration ==
== Inspiration ==


* [http://catfishsmooth.net/ CatfishSmooth]
* [http://catfishsmooth.net/ CatfishSmooth]
* [http://musicwn.com/ Music Web Navigator] - uses MusicBrainz and Last.FM data.
* "[http://blog.soundcloud.com/2010/03/04/motoboy/ Moto Boy] (or, how to build a beautiful and functional artist website)"
* [http://richseam.com/ richseam]
* [http://www.bbc.co.uk/music BBC Music artist pages] (e.g. [http://www.bbc.co.uk/music/artists/bd5cf3e9-cb6c-41f3-8c7d-e9bda3c4e721 S Club (7)])
* [http://beardscratchers.com/ Beardscratchers Compendium of Music]


=== Mock-up pages ===
=== Mock-up pages ===
* [http://people.scs.carleton.ca/~cwalton3/temp/mbmockups/ajax/ Magic Javascript MusicBrainz site thing.]
* [http://mbjs.kepstin.ca/ Magic Javascript MusicBrainz site thing.]
* http://people.scs.carleton.ca/~cwalton3/temp/mbmockups/bs-r.html
* http://people.scs.carleton.ca/~cwalton3/temp/mbmockups/bs-r.html
* http://people.scs.carleton.ca/~cwalton3/temp/mbmockups/bs-rg.html
* http://people.scs.carleton.ca/~cwalton3/temp/mbmockups/bs-rg.html
Line 54: Line 110:
* [http://www.jazzhistorydatabase.com/content/musicians/ Jazz History Musicians]
* [http://www.jazzhistorydatabase.com/content/musicians/ Jazz History Musicians]
* [http://mingus.onttonen.info/ Charles Mingus Home Page]
* [http://mingus.onttonen.info/ Charles Mingus Home Page]

== Sub and related pages ==

* [[/Integrating Commercial Services]]
* [[/Related media]]
* [[/Quotes]]
* Retired/deprecated pages
** [[/Name suggestions]]
** [[/Tasks]] - use https://github.com/Freso/MusicBottle/issues instead.

Latest revision as of 14:46, 1 May 2014

MusicBottle (or "the Bottle") is a project with the intend of presenting MusicBrainz data in a way more suitable for presentation and browsing where musicbrainz.org is mostly for editing purposes. It is led by Freso and caller#6 with contributions from Lordsputnik and a bunch of other the MusicBrainz people.

Discussion will happen probably mostly on IRC in the room #musicbottle. Feel free to come and hang out. We will probably also utilise the mb-devel mailing list for getting feedback on some design decisions (e.g., input on how to implement caching).

porpoise.jpg

Purpoise, the Mission Statement

  1. Showcase the MusicBrainz data in a prettier way than what can reasonably be achieved on musicbrainz.org.
  2. Show what can be done using the data fetched from MusicBrainz' Web Service.

Background

(Write stuff.)

Design decisions/philosophy

  1. Don't hardcode any information. While it may be tempting to mark that Mozart is a composer in the code, we want the site to display the what can be retrieved using only MusicBrainz. Retrieving information from sources linked to from MB data is fine, but hardcoding such info is not.
  2. Use the URL scheme of musicbrainz.org as long as at makes sense. This should simplify a lot of things, and make inter-site URL mapping quite easy. So e.g. http://musicbottle.net/artist/3c25958a-2bff-4381-8eb4-7dbe84c3e75e will match https://musicbrainz.org/artist/3c25958a-2bff-4381-8eb4-7dbe84c3e75e

Implementation

As Freso likes writing Python and caller#6 wants to learn the language, this quickly became the language of the project. Flask was initially recommended by ianweller and subsequently endorsed by ruaok, so that is the framework we're currently looking into. We will most likely aim for getting the code running on an nginx server.

We're also going to need some kind of cache, to not hit MusicBrainz (or other sites) over and over again. We're looking into MongoDB and possibly other NoSQL databases for now.

The main codebase is GPL v2+ and any libraries developed to keep sane abstractions will be LGPL'd. (Any Flask-specific extensions will be BSD/MIT-style licensed.) The code is available on GitHub.

Libraries, APIs, etc.

Other pointers

Random ideas

How and what to pull in and how to present it?

Twitter, YouTube, Facebook, ... activity streams.

Images from fanart.tv

Inspiration

Mock-up pages

Other sites

Sub and related pages