Forum OpenACS Development: xotcl and photo albums

Collapse
Posted by Ivan Histand on
Hi,

Let's say I wanted to create a special-purpose photo album using xotcl, with these top level requirements:

  1. store images in the content repository using the option to store in the file system rather than the database
  2. provide a simple single-file upload widget
  3. store a large number of attributes about each image, the names and count of which are unknown until the image is uploaded. These attributes need to be searchable.
  4. Associate a list of searchable keywords for each image.
  5. Create other versions of the image related to the parent image. (thumbnails, etc)
  6. Associate each image with an album of related images.
  7. use the Categories package to categorize albums

Obviously the photo-album package meets some of these requirements, and I know what it would take to modify that package to meet my needs. I'm having a hard time however, determining if this can be done in xotcl, and before I start the design process I want to be sure I'm going in the best direction.

Can someone knowledgable about xotcl point me in the right direction?

Thanks,
Ivan

Collapse
2: Re: xotcl and photo albums (response to 1)
Posted by Ben Koot on
Ivan,

looks you can read minds. I have been wondering about the same issues. A proper procedure would solve many userability concerns.

Ben

Collapse
3: Re: xotcl and photo albums (response to 1)
Posted by Lurch . on
Ivan,
I tried going this route, and similar. I can not comment on your question on xotcl, but...
a) Photo Album turned out to be way too much of a hassle to modify, just take the 2 or 3 procs from it, don't bother with the rest.. CR is a lot easier to use with the "newer" API, not the one PA uses.
b) the Categoeies package is a dead end for this, if you plan to enter categories through your photo album interface.
Collapse
Posted by Malte Sussdorff on
Lurch, would you mind explaining why categories is a dead end? We are using it for exactly this purpose in at least five packages in OpenACS and never hit a problem, not to talk about a dead end.
Collapse
Posted by Ivan Histand on
It seemed to me also that Categories would work well for a photo album. The model is simple: An Album belongs to zero or more categories. Photos don't belong to categories, they only have keywords and attributes which describe them, not categorize. Search would be used to find photos related to keywords.

That said, one design idea that crossed my mind is to use Categories to store the keywords, by creating a new category for each new unique keyword. I havn't decided which is the better design.

Collapse
Posted by Hamilton Chua on
I don't have any experience with xotcl and just a sprinkling with photo album but I would like to share how I tackled a feature requirement which the client aptly called "Connections".

To keep a long story short, connections are keywords that a group of registered users have in common. For instance John is a hacker and he put "hacker" as a connections keyword. Paul comes along and would like to learn how to hack so he also puts "hacker" as a connection keyword.

When someone searches for this keyword "hacker" both John and Paul's names should appear.

The first package that immediately came to mind that would be of use here is the categories package because I saw connections as a way to categorize users according to connection keywords.

I wrote a user interface to allow users to enter their connection key words. I then wrote an api that will first check if the keyword exists in the chosen parent category of the categories package, if it does not then a new category is created and the user_id is mapped to the category.

Similarly if the category already exists in the category package, the user_id will be mapped to the existing category.

If the user removes the connection keyword from his list of connections then the mapping between the user_id and the category is removed.

I think categories fits the bill but integrating it into the photo album interface is a different matter. You might have to make it a two step thing, first upload and then have the user enter the attributes.

Alternatively, if your photos have IPTC information, I think you can use ImageMagick to extract the IPTC fields and put them in a table or turn them into categories (that is if you decide to use the categories pacakge).