Hi Vidar, On Thu, Apr 23, 2009 at 10:16 PM, Vidar Ramdal <[email protected]> wrote: > These are just some loose thoughts that have been brewing in my mind > lately, after reading Richardson/Ruby: RESTful Web Services [1].
Good choice ;-) >... In order to make Sling (even) more buzzword compliant, I have been > thinking about a system for tags. Yes, I'm talking about those > keywords that you label your bookmarks with on del.icio.us, photos on > Flickr and so on. > > Of course, a tag could just be a (multi-value) string property on a > node. But a tag could also be considered to be a resource in its own > right, with its own URL (e.g. /tags/<tagname>). (The concept of tags > as resources is very much present in [1]). Sounds good, and as Felix says I just wrote a blog entry about this yesterday [2]. From that you can see that in Day's cq5 the tags are a hierarchy of nodes under /etc/tags, with a specific node type, so a tag is indeed a separate resource. > ...Accessing a tag's URL would output nodes that have the given tag. The > list could of course be rendered in different formats (json, xml, > etc).... Good idea, but maybe with a specific selector? You can argue that accessing a tag directly should return it, for example /etc/tags/mynamespace/mycategory/mytag.tidy.json would return info about the tag itself, whereas /etc/tags/mynamespace/mycategory/mytag.items.json would return links to items tagged with "mytag". > Accessing /tags would give a list of tags that are in use. That > list would be useful when a user is applying tags to nodes (in > auto-complete fields etc). Sounds good. In cq5 this is also used to manage the tags, change their titles or descriptions, etc. > ...In its simplest form, this could be implemented with a servlet or two. > But, Sling being a WEB framework, maybe tags should be a more > integrated part of the framework.... I agree with Juanjo, that a tagging system is not a core component. And I agree with you that it's a common use case, so contrib is probably the place? The tagging system would then be one or several bundles, servlets, observation components if needed, etc. -Bertrand [1] http://oreilly.com/catalog/9780596529260/ [2] http://dev.day.com/microsling/content/blogs/main/cq5tags.html
