PHP Picasa

13Mar09

I decided a while back to upgrade my photo gallery software. At that time I was using my own online file store and a simple recursive browse algorithm to manage the organization of all of my photos. For the base case I would fire up a flash slide show that I found for $50 somewhere on the internet several years back.

I really liked my own custom written stuff for managing the nested file structure because it meant all I had to do was replicate my local file structure on the server and the app would dynamically create the browse logic. I could have albums inside of albums inside of albums, which helped me to organize by year, then by event, then by sub-category.

But I had to replace the slide show software. It was really choppy for slower internet connections and was not smart enough to strip the size / quality of the images for display on the web. As well I was restricted to one size (small), and overall it was just dodgy all around.

So I started looking at online gallery software, including packages I could install on my server and maintain myself as well as fully-hosted packages. The self-hosted options sounded appealing because then I would be unrestricted by storage and would have full control over the data and could even customize the software if needed, particularly configuring it to match my website theme, etc. The fully-hosted options sounded appealing because then I would not have to worry about maintenance and as new features / fixes became available I would reap the benefit without having to do anything.

Having had recent pleasurable experiences with Google apps, I decided to check out their Picasa software. It is gallery software fully-hosted by Google with online administration, as well as an option to download a client application for managing your gallery. I opened an account and decided I really liked the UI / look and feel and most of the functionality. The slide show quality was much better than what I was using as well. The only thing I didn’t like about it was the fact that I had to have a completely flat album structure. There was no way to store albums within albums.

When I started looking around it seemed most gallery packages followed the same line of thinking and did not support the concept of nested albums structures.

It really bothered me at first, because I thought that it must be a common requirement. I couldn’t figure out why it wasn’t supported.

So I decided to link the Google slide show functionality with my own custom browse algorithms. This worked quite well because Google provides links to slide shows for posting on web pages or in blog articles, etc. I was able to keep my dynamic browse stuff and just add in a look-up for slide show content in my base case event. It wasn’t perfect though, because it meant any time I uploaded a new album to Picasa, I needed to copy / paste the slide show content into a database table on shaunmacrae.com.

Then I begin to think about data storage / retrieval paradigms on the web in general, particularly in the case of Google.

Google taught me when I first opened my Gmail account that I did not need to organize my email. They taught me by making it very difficult to create overly complicated, nested folder structures for archiving my emails, so that I would be forced to use the less onerous options to tag, or even better, simply search for keywords in the email’s from, to, subject, body, or whatever! This was pretty easy for me to adjust to, and as a result I don’t spend any time whatsoever filing and organizing emails anymore. My Inbox has over 20, 000 messages and if I need something I just search for it.

Then Google taught me when I first opened my Google Docs account that I did not need to organize my documents. They taught me also by making it very difficult to create overly complicated, nested folder structures for archiving my documents, so that I would be forced to use the much less onerous options to tag, or even better, simply search for keywords in the document’s name or body content, or search / browse by file type, date created, modified, etc. This was more difficult for me to adjust to. The thought of having all my documents in one folder just seemed wrong and so different from how most windows users would think of organizing files. Eventually, though I did get used to it. In fact, due to others having trouble adopting to this new paradigm as well, Google eventually decided to support nested directory structures (ironically powered behind the scenes by the same tagging functionality we were all objecting to), so that users could create these massive, complex structures. I thought ah cool, I can create nested directories now and began doing just that. 2 weeks later I moved all of my documents out of the directories and deleted the placeholders. I was just tired of having to think about where I put things. I found myself always using the search facility to find things anyway.

So that was it. Picasa was following the same paradigm, and because most of the other leading gallery software providers were also, I was forced to flatten my directory structure and start to think about attaching classifications to albums instead of structures for albums.

At around the same time, I learned about Picasa’s open API options for php development. I quickly found that others were building there own apps powered by Picasa and even offering their own custom PHP Picasa APIs – in particular Cameron Hinkle’s can be found here. As part of departing from my dependency on nested albums, I was able to harness the power of the these open APIs to create a new browsing interface based on flattened albums. Cameron’s stuff is really good, and easy to use. I am only using a small fraction of the functionality, but plan to build in pagination, searching, etc. along the way. To give a feel what I’ve done with it so far, here is my gallery. To give you a feel for some of the other stuff it’s capable of, here is Cameron’s gallery.

So at this point I had a fully self-sufficient custom gallery app. I would upload new photos to Picasa via the web upload functionality or via my Picasa client app, and the rest was taken care of.

Then I got my Mac. It turns out IPhoto has exporters for Picasa and Facebook! That made my day. My IPhoto gallery remains synced with my online apps and the website remains synced with them. Then I got my iPhone, which syncs to iPhoto automatically as well!

For me, this is all a testament to the power of open source / open API software i.e.) notice Microsoft were not mentioned once in any of this.

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

0 Responses to “PHP Picasa”


  1. No Comments

Leave a Reply


Comment guidelines: No spamming, no profanity, and no flaming. Inappropriate comments will be deleted outright.




Follow shaunmacrae on Twitter