Forum OpenACS Development: Re: xotcl and photo albums

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).