Re: Services_MusicBrainz Package: Request for contributors

From: Date: Sat, 22 Apr 2006 02:47:01 +0000
Subject: Re: Services_MusicBrainz Package: Request for contributors
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-42313@lists.php.net to get a copy of this message
Ok cool interesting, yes, i think services like these should be contained within an umbrella package. I personally think if you can see firing off dispatcher events and letting the user handle the results is a better approach. Even giving them an option to transform the results with xslt would be cool. Ive made alot of changes since then so the xml results are cached using Cache_Lite. On 22/04/2006, at 6:49 AM, Jacob Singh wrote:
Hi Dan, This does sound interesting. And good work on your class. I've also thought about this. My inclination is to have multiple independent service classes for music meta data engines and an addition Services_MusicMetadata class which instantiates them by factory. The later project will be quite complex I suppose because the main usage for it would probably be to query and then select results. For instance, I want to get album art, an artist description and a release schedule for abbey road, I query 3 different engines and engines a and b give me different album art and descriptions and c gives me a release schedule, but not the other pieces of data. So my user would fire off one request, and get 3 responses which would have to be mapped into one object that could contain their attributes. Ouch. I suppose this would be the task of Services_MusicMetadata, to map the result objects of each Service into a unified format. PaymentProcess does something similar for payment gateways. Anyway, I'm not prepared to take on the task of making all meta-data engines return standardized results. I'd prefer to architcht each engine separately, probably returning an object heirachy simular to what the engine itself returns and then built an aggregator pattern like you are suggesting. Does this make sense? -Jacob P.S. I've set up invite only svn access to the code I've been working on for Services_MusicBrainz, let me know off list if you want access to this. Thanks, J Dan Rossi wrote:
I was contemplating an AudioScrobbler service but i havent had any stability atm to get the time and I dont have a proper server to even run my example code. I would however suggest that both could be integrated i guess using factory drivers as its pretty much the same it seems. I was suggested by somebody to also load versioned factory drivers for version changes in their webservice, as especially with the audioscrobbler service it could change. you may want to check these early stages http://www.electroteque.org/pear/Services_AudioScrobbler/ http://www.electroteque.org/pear/Services_AudioScrobbler/index.phps http://www.electroteque.org/pear/Services_AudioScrobbler/AudioScrobbler.phps I dont know how the yahoo service works, but i thought a query/command/parameter style to the REST service was valid here but it could be changed. On 17/04/2006, at 3:26 AM, Jacob Singh wrote:
Hello, I'm a developer with http://calabashmusic.com. We want to create a web service client for MusicBrainz to-be released web service. (http://wiki.musicbrainz.org/XMLWebService). It uses a REST interface and lends itself to the pattern used by Martin Jansen's Yahoo service because it returns various types of content. The interesting part is that these content types (artists, releases, tracks, etc) are inter connected. So the process would be something like: $artistReq=& Services_MusicBrainz::factory("artist"); $artistReq->name = "beatles"; $artists = $artistReq->send(); /** * $artists is now an iterator object which will iterate through objects translated from MB's schema. * Each result has a score for testing match to artist name, or whatever criteria is used **/ foreach($artists as $artist) { if($artist->score > 90) {
     $releaseReq = & Services_MusicBrainz::factory("release");
     $releaseReq->releasetype = "Compilation";
     $releaseReq->artistid = $artist->id;
      $albums =       $releaseReq->send();
     echo $albums[0]->title //Past Masters, Volume One, see (http://musicbrainz.org/ws/1/artist/b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d?type=xml&inc=sa-Album)
} } But all of this is just a guess... This is my first attempt at contributing to PEAR and if I could find angels to help me with the following, I'd by mighty obliged: 1. People interested in coding this. 2. People interested in writing tests for it. 3. People willing to help with docs. Thanks, Jacob P.S. Bounty for major contributors! Free downloads at http://calabashmusic.com! --PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.pear.dev (#42313) next »