> I think the nested set model would still work great in a threaded
> message board.
Steve,
I've been playing around a bit with the idea, and I'm not so sure. Nested
sets seem to work quite nicely for simplistic trees, but my (admittedly
premature) conclusion is that they just make things difficult if you're
shooting for more complex presentation.
For example, I need to be able to render some fairly complex trees, and
#RepeatString# indentation isn't sufficient. Currently I'm walking a nested
structure with a recursive custom tag that generates a tree that's visually
similar to the ones created with CFTREE. In order to draw all the lines
connecting the various children to their parents, I need to be able to "look
ahead" and see how many sibling items there are, which of them have
children, and which is the last sibling. That's fairly easy to do with
structures, even if CF's current method of recursion is sub-optimal.
Meanwhile, nested sets make the whole process considerably more difficult,
and the workarounds I've explored all lead me back to thinking that I'm
trying to use a wrench to do a hammer's job. The real overhead isn't in the
SQL, after all... it's in the struct-walking. If I'm going to have to take
that hit either way, it probably wouldn't make sense to take on the extra
complexity of nested sets.
Thoughts?
--
Roger
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists