Hey, that's cool! > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Barney Boisvert > Sent: Tuesday, September 06, 2005 11:23 PM > To: [email protected] > Subject: Re: [CFCDev] Hierarchies > > > Nested sets aren't that complex, just conceptually different from > anything else, so it takes a bit of head work to figure out. Once > done, however, it's a breeze to work with. One thing that nested sets > has and the adjacency list method lacks is inherent ordering of > sibling nodes; something that's vitally important for a content > hierarchy. And it's not dependant on the DB either. Here's a sample > tree manager component I put together a while back that abstracts all > the messiness: > > http://www.barneyb.com/blog/archives/000532.jsp > > It's built for MySQL, but porting it should be pretty trivial, as long > as your DB supports subqueries. And best of all, the port won't > require a great understanding of the nested set model, since the > individual queries are all quite simple to understand how they work, > even if you don't understand why they do what they do. > > cheers, > barneyb > > On 9/6/05, Nando <[EMAIL PROTECTED]> wrote: > > > > I've found the nested set model difficult to implement. The SQL for > > retrieving the tree is easy enough, but updating it is pretty > complex. And > > from what i remember, you're dependent on using MSSQL, although varients > > probably exist for other advanced DBMS's. > > > > I use a simple system that builds a page hierarchy using both a > parentID and > > a numeric level value that starts with 0 for the root of the tree and is > > incremented by 1 for each level of the hierarchy. When adding a > page under a > > parent, the PK of the parent page goes in the parentID field of > the new page > > and the level value is incremented by 1. Simple. I use a > recursive function > > to create an ordered query so my display queries (QorQ's) are > efficient. > > > > You can do lots of nifty display things very quickly with a > combination of > > parentID's and level values and that recursive function. I can > share some > > code with you if you'd like. I'm sure you'd be able to figure out how to > > generate your XML file using this approach as your foundation. > > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > > Phil Cruz > > Sent: Tuesday, September 06, 2005 5:09 PM > > To: [email protected] > > Subject: Re: [CFCDev] Hierarchies > > > > Check out this article on the nested set model > > http://coldfusion.sys-con.com/read/42123_f.htm > > > > hth, > > Phil > > > > > > On 9/6/05, chris.alvarado > > <[EMAIL PROTECTED]> wrote: > > > Hello all, > > > > > > I'm working on a project where i need to allow a user to build the > > structure for an online manual through some sort of form based tool. > > > > > > The structure is hierarchical in nature, in that there are > chapters which > > contain various pages and then those pages can even contain "sub pages". > > after the user build the structure of the manual the structure > needs to be > > saved as an XML file. however, I've been having a heck of a time > > representing the structure in ColdFusion. does anyone have any pointers > > (tutorials, examples etc) of dealing with hierarchies in ColdFusion? > > > > > > thanks for any help! > > > > > > -- > > > -chris.alvarado > > > [application developer] > > ---------------------------------------------------------- > > > You are subscribed to cfcdev. To unsubscribe, send an email to > > [email protected] with the words 'unsubscribe cfcdev' as the > subject of the > > email. > > > > > > CFCDev is run by CFCZone (www.cfczone.org) and supported by > CFXHosting ( > > www.cfxhosting.com). > > > > > > CFCDev is supported by New Atlanta, makers of BlueDragon > > > http://www.newatlanta.com/products/bluedragon/index.cfm > > > > > > An archive of the CFCDev list is available at > > www.mail-archive.com/[email protected] > > > > ---------------------------------------------------------- > > You are subscribed to cfcdev. To unsubscribe, send an email to > > [email protected] with the words 'unsubscribe cfcdev' as the > subject of the > > email. > > > > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting > > (www.cfxhosting.com). > > > > CFCDev is supported by New Atlanta, makers of BlueDragon > > http://www.newatlanta.com/products/bluedragon/index.cfm > > > > An archive of the CFCDev list is available at > > www.mail-archive.com/[email protected] > > ---------------------------------------------------------- > > You are subscribed to cfcdev. To unsubscribe, send an email to > > [email protected] with the words 'unsubscribe cfcdev' as the > subject of the > > email. > > > > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting > > (www.cfxhosting.com). > > > > CFCDev is supported by New Atlanta, makers of BlueDragon > > http://www.newatlanta.com/products/bluedragon/index.cfm > > > > An archive of the CFCDev list is available at > > www.mail-archive.com/[email protected] > > > -- > Barney Boisvert > [EMAIL PROTECTED] > 360.319.6145 > http://www.barneyb.com/ > > Got Gmail? I have 100 invites. > > > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email to > [email protected] with the words 'unsubscribe cfcdev' as the > subject of the email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported by > CFXHosting (www.cfxhosting.com). > > CFCDev is supported by New Atlanta, makers of BlueDragon > http://www.newatlanta.com/products/bluedragon/index.cfm > > An archive of the CFCDev list is available at > www.mail-archive.com/[email protected] > >
---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
