Best practice for threaded comments

Author Message

Oliver Frommel

Friday 01 August 2008 6:47:52 am

Hello,

for a project I need to import some old data from another CMS. Among other things there are lot of comment threads up to about four levels deep. What I'd like to know is what's that best way of storing them in eZ publish.

I thought about re-creating the comment thread structure in terms of container objects containing the children. Or I could save theme somewhere flat and re-create the structure through object relations. Or a mixture. Or something I did not think of yet.

The aim is to save processing in a template that has to display that tree structure of a certain object, say an article and all affiliated comments.

I would be grateful if you could give me some best practice advise on this.

Thanks
Oliver

Piotrek Karaś

Friday 01 August 2008 11:17:48 pm

I'm not sure there is a best practice for that, or at least I'm not aware of it.

Creating an object per comment and reflecting threads by structuring parent/child comments would be the default way, I think, and definitely some API exists to import that quite easily. But if you have a substantial number of those comments (going into tens or hundreds of thousands and above) and/or those comments are a key functionality and are expected to be very popular, then moving them into eZ Publish as objects may be risky - you'll end up with gigantic structure of objects of little singular importance. I such case I would think of moving this functionality outside of eZ Publish content model, into my own extension/database tables.

But it would be really great to hear someone who has actually dealt with this problem!

Cheers,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Oliver Frommel

Monday 04 August 2008 4:41:03 am

Thanks for your comments, Piotrek. Actually there are quite a few comments I want to import, about 60.000. What exactly will be the problem when I import them as eZ objects? Will that slow down eZ that much?

Best
Oliver

Piotrek Karaś

Tuesday 05 August 2008 11:40:19 am

Hi,

Threaded comments under a number of articles (or any other objects) should be fine - it's usually a problem when you have too many objects under one node. But I haven't dealt with an eZ site of that size from administrative side, so I wouldn't know for sure, but I expect the content-model tables to grow significantly. Sites with way more nodes are known to work fine, though, but you would have to ask others what's the cost.

Cheers,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.