[dev] Extension of commentCallback

Jan Schneider jan at horde.org
Thu Mar 8 08:48:54 UTC 2007


Please keep the discussion on the list.

Zitat von duck <duck at obala.net>:

> Jan Schneider wrote:
>> Ok, understood. But the comment_* examples don't make sense to me.
>> Agora should track the number of comments, not the commented  application.
>>
>
> I don't agree. Of course Agora tracks the number of replies. But  
> imagine how consuming will be to load Agora and request the number  
> of comments for every listed data compared to a counter stored  
> internal in the implemented application whit is retrieved with the  
> already done sql SELECT ( ex Ansel gallery, load Agora does at least  
> one query, then for the default 9 images displayed we will do 9  
> counts on the tables. Means at least 10 additional not needed  
> queries. ).

I understand how this may perform better. But we are talking about a  
comment API here, and that means that all comment handling has to be  
encapsulated. What you want to do is a hack. If you want a better  
performing API, implemented a method in Agora that allows to retrieve  
the number of comments in a batch mode.

> Then you can do an easily and fast sort the data by the most  
> commented entry and so on. Of course it depends on the application  
> what it would like to implement, or remain on the normal title. I  
> will write a Wiki page explaining how deal with comments, and which  
> callbacks types can be implemented.
>
>
> Duck
>



Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list