JY's Weblog
mardi 29 avril 2003
Some technical comments about iTunes4...
iTunes 4 is a beautiful example of a "specialized browser". It uses html to render pages with texts and pictures, but it also uses macosX standard GUI elements when appropriate. When you browse the albums/artists, iTunes in fact gets the contents of these lists from a Web server out there at Apple (phobos is its nickname). The format for these lists is XML, more exactly the macosX plist format. iTunes reads this XML list then uses a standard list browser to show you the content.
Here is an example of such a list in XML :
<TrackList>
<plist version="1.0">
<dict>
<key>listType</key><string>search</string>
<key>priceFormat</key><string>$%0.2f</string>
<key>items</key>
<array>
<dict>
<key>kind</key><string>track</string>
<key>artistName</key> <string>The Flaming Lips</string>
<key>artistId</key><string>156604</string>
<key>bitRate</key><integer>128</integer>
<key>buyParams</key><string>productType=S&salableAdamId=192545&price=990</string>
<key>price</key><integer>990</integer>
<key>copyright</key><string>℗ 1995 Warner Bros. Label</string>
<key>duration</key><integer>171000</integer>
<key>fileExtension</key><string>m4p</string>
<key>genre</key><string>Rock</string>
<key>genreId</key><integer>21</integer>
<key>playlistName</key><string>Clouds Taste Metallic</string>
<key>playlistArtistName</key><string>The flaming Lips</string>
<key>playlistId</key><string>192563</string>
<key>previewURL</key><string>http://XXXXXXXXXXXXXXXXXXXXX.m4p</string>
<key>relevance</key><string>0.13054071</string>
<key>sampleRate</key><integer>44100</integer>
<key>songId</key><integer>192545</integer>
<key>comments</key><string></string>
<key>trackCount</key><integer>13</integer>
<key>trackNumber</key><integer>10</integer>
<key>songName</key><string>Lightning Strikes the Postman</string>
</dict>
So, basicaly, iTunes uses a REST interface to get his contents from their Web servers: iTunes gets an XML file from the server and parses it to put the contents in macosX native UI controls.
(Note that the Cocoa classes make it easy to serialize/deserialize structures in XML/plist format)
Simple open standards behind this beautiful iTunes4...
Note : Wonder what Phobos is ? ...
"Phobos [FOH-bohs] (fear) is a moon of Mars and was named after an attendant of the Roman war god Mars" (more)
In "Greek mythology, Phobos is one of the sons of Ares (Mars) and Aphrodite (Venus). "phobos" is Greek for "fear" (the root of "phobia") "(more).
Apple released today their new music download service within iTunes 4. Unfortunately, the service is not available outside the US. Not cool. At least we can preview the tunes and the service. It's not as serious as the fact that we still don't get the prints ordering from within iPhoto. I would pour money into it, but it can't. Please Apple, let me pour money in your wallet I want to order prints from iPhoto because it's so convenient.
Cool! Pierre's Web, le Weblog de Pierre Omidyar. A quand JLG ?...