NYCPHP Meetup

NYPHP.org

[nycphp-talk] Should labels/tags be inherited?

Chris Shiflett shiflett at php.net
Wed Nov 2 12:25:09 EST 2005


csnyder wrote:
> Suppose I have an image object stored in my system, with the
> single label "fun". And suppose that I attach an audio object,
> describing the image in my own words.
> 
> The image is at /csnyder/images/001.jpg and the audio is at
> /csnyder/images/001/description.mp3.
> 
> Should the audio object inherit the "fun" label?

This is purely subjective, but I would say no. My reasoning is that it 
leaves you with full flexibility, so you're not polluting your tags in a 
way that can't be undone.

It's easy to consider tags of parents as tags of the child in your code, 
and you can store these separately, so you can distinguish between them 
(even if you have no such need right now).

Stated differently, I like to err on the side of having too much 
granularity - I can always group data in the code without losing 
information (like the fact that the image was labelled fun and the audio 
just inherited the label).

Chris

-- 
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/



More information about the talk mailing list