You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Allen Gilliland <al...@sun.com> on 2007/01/09 20:51:41 UTC

Quick Proposal: new status field for comments

This is another very short proposal which I'll just do on the list.

Currently, the roller_comment table has 3 boolean columns for approved, 
spam, pending which identify the state of the comment.  This ends up 
causing a bit of extra work and confusion because you have to set 
multiple flags on a comment to properly identify it's state rather then 
simply choosing a single status flag.  I'd like to fix this so that 
comments use a status column like the one used for weblog entries.  The 
benefits are that 1) it's easier to manage what state a comment is in 
and 2) it will improve query performance for comments.

1. it's easier to manage because instead of having to mark a comment 
with pending=true and approved=false to make it a comment awaiting 
moderation, you would instead simply set status=PENDING.  this is easier 
and more extensible then the current solution.

2. on a more useful note, this will improve query performance. 
currently queries against the comment table require many columns of 
criteria to get the proper result set, i.e. approved=true and spam=false 
and pending=false.  with this change all those criteria will be 
consolidated into a single criteria for status=XXXX which will make 
queries shorter, faster, and easier to index for.

The process for making this change is easy enough ...

1. add a new status column to the comment table and attribute to the 
CommentData pojo.
2. add a couple lines to the sql upgrade script to properly set the 
status column during upgrades.
3. update the comment/trackback servlets and comment management struts 
actions to use the new status field instead of all the old boolean 
fields to manage comment status.

The statuses will be ...

APPROVED - valid comment for display on weblog
SPAM - considered spam, not available for display on weblog
PENDING - awaiting moderator approval, not considered spam

everyone okay with this?  any objections?

-- Allen

Re: Quick Proposal: new status field for comments

Posted by Allen Gilliland <al...@sun.com>.

Dave wrote:
> Allen,
> 
> Looks like you're suggesting these states:
>   PENDING
>   APPROVED
>   UNAPPROVED
> 
> But I would like to differentiate new comments that are pending due to
> comment moderation being enabled vs. comments that are pending because
> they were judged to be invalid. We should still be able to show
> suspected spam comments in ping and comments awaiting moderation in
> yellow.
> 
> So you could have these states:
>   PENDING - waiting for moderation
>   INVALID - pending and judged to be invalid by comment validators
>   APPROVED - approved for display
>   UNAPPROVED - not approved for display

yes, that is what i have.  i noticed on the UI that we used the word 
'disapproved' so that's what i have called the state where a comment is 
not spam or pending or approved.  and what you have as INVALID i had 
just called SPAM, but they are the same thing.

so, all incoming comments start out as either ...

SPAM - if caught by one of the comment validators
APPROVED - no problems, valid comment
PENDING - no problems, but is queued for moderation

then via comment management ...

UNAPPROVED is for comments which are either denied at moderation time, 
or for comments that an admin decides they don't want displayed but 
don't want to delete either.

-- Allen


> 
> 
> - Dave
> 
> 
> 
> On 1/9/07, Allen Gilliland <al...@sun.com> wrote:
>> I am looking at the upgrade path for this right now and I am seeing that
>> some comments have approved=0, spam=0, and pending=0, which I guess
>> means that it's a comment that the blog owner just doesn't want to honor
>> for some reason?  I am planning to call this state, UNAPPROVED, but just
>> wanted to make sure this is a valid status that we want to continue
>> supporting.
>>
>> -- Allen
>>
>>
>> Dave wrote:
>> > +1 to that as well. Good idea.
>> >
>> > - Dave
>> >
>> >
>> >
>> > On 1/9/07, Allen Gilliland <al...@sun.com> wrote:
>> >> This is another very short proposal which I'll just do on the list.
>> >>
>> >> Currently, the roller_comment table has 3 boolean columns for 
>> approved,
>> >> spam, pending which identify the state of the comment.  This ends up
>> >> causing a bit of extra work and confusion because you have to set
>> >> multiple flags on a comment to properly identify it's state rather 
>> then
>> >> simply choosing a single status flag.  I'd like to fix this so that
>> >> comments use a status column like the one used for weblog entries.  
>> The
>> >> benefits are that 1) it's easier to manage what state a comment is in
>> >> and 2) it will improve query performance for comments.
>> >>
>> >> 1. it's easier to manage because instead of having to mark a comment
>> >> with pending=true and approved=false to make it a comment awaiting
>> >> moderation, you would instead simply set status=PENDING.  this is 
>> easier
>> >> and more extensible then the current solution.
>> >>
>> >> 2. on a more useful note, this will improve query performance.
>> >> currently queries against the comment table require many columns of
>> >> criteria to get the proper result set, i.e. approved=true and 
>> spam=false
>> >> and pending=false.  with this change all those criteria will be
>> >> consolidated into a single criteria for status=XXXX which will make
>> >> queries shorter, faster, and easier to index for.
>> >>
>> >> The process for making this change is easy enough ...
>> >>
>> >> 1. add a new status column to the comment table and attribute to the
>> >> CommentData pojo.
>> >> 2. add a couple lines to the sql upgrade script to properly set the
>> >> status column during upgrades.
>> >> 3. update the comment/trackback servlets and comment management struts
>> >> actions to use the new status field instead of all the old boolean
>> >> fields to manage comment status.
>> >>
>> >> The statuses will be ...
>> >>
>> >> APPROVED - valid comment for display on weblog
>> >> SPAM - considered spam, not available for display on weblog
>> >> PENDING - awaiting moderator approval, not considered spam
>> >>
>> >> everyone okay with this?  any objections?
>> >>
>> >> -- Allen
>> >>
>>

Re: Quick Proposal: new status field for comments

Posted by Dave <sn...@gmail.com>.
Allen,

Looks like you're suggesting these states:
   PENDING
   APPROVED
   UNAPPROVED

But I would like to differentiate new comments that are pending due to
comment moderation being enabled vs. comments that are pending because
they were judged to be invalid. We should still be able to show
suspected spam comments in ping and comments awaiting moderation in
yellow.

So you could have these states:
   PENDING - waiting for moderation
   INVALID - pending and judged to be invalid by comment validators
   APPROVED - approved for display
   UNAPPROVED - not approved for display


- Dave



On 1/9/07, Allen Gilliland <al...@sun.com> wrote:
> I am looking at the upgrade path for this right now and I am seeing that
> some comments have approved=0, spam=0, and pending=0, which I guess
> means that it's a comment that the blog owner just doesn't want to honor
> for some reason?  I am planning to call this state, UNAPPROVED, but just
> wanted to make sure this is a valid status that we want to continue
> supporting.
>
> -- Allen
>
>
> Dave wrote:
> > +1 to that as well. Good idea.
> >
> > - Dave
> >
> >
> >
> > On 1/9/07, Allen Gilliland <al...@sun.com> wrote:
> >> This is another very short proposal which I'll just do on the list.
> >>
> >> Currently, the roller_comment table has 3 boolean columns for approved,
> >> spam, pending which identify the state of the comment.  This ends up
> >> causing a bit of extra work and confusion because you have to set
> >> multiple flags on a comment to properly identify it's state rather then
> >> simply choosing a single status flag.  I'd like to fix this so that
> >> comments use a status column like the one used for weblog entries.  The
> >> benefits are that 1) it's easier to manage what state a comment is in
> >> and 2) it will improve query performance for comments.
> >>
> >> 1. it's easier to manage because instead of having to mark a comment
> >> with pending=true and approved=false to make it a comment awaiting
> >> moderation, you would instead simply set status=PENDING.  this is easier
> >> and more extensible then the current solution.
> >>
> >> 2. on a more useful note, this will improve query performance.
> >> currently queries against the comment table require many columns of
> >> criteria to get the proper result set, i.e. approved=true and spam=false
> >> and pending=false.  with this change all those criteria will be
> >> consolidated into a single criteria for status=XXXX which will make
> >> queries shorter, faster, and easier to index for.
> >>
> >> The process for making this change is easy enough ...
> >>
> >> 1. add a new status column to the comment table and attribute to the
> >> CommentData pojo.
> >> 2. add a couple lines to the sql upgrade script to properly set the
> >> status column during upgrades.
> >> 3. update the comment/trackback servlets and comment management struts
> >> actions to use the new status field instead of all the old boolean
> >> fields to manage comment status.
> >>
> >> The statuses will be ...
> >>
> >> APPROVED - valid comment for display on weblog
> >> SPAM - considered spam, not available for display on weblog
> >> PENDING - awaiting moderator approval, not considered spam
> >>
> >> everyone okay with this?  any objections?
> >>
> >> -- Allen
> >>
>

Re: Quick Proposal: new status field for comments

Posted by Allen Gilliland <al...@sun.com>.
I am looking at the upgrade path for this right now and I am seeing that 
some comments have approved=0, spam=0, and pending=0, which I guess 
means that it's a comment that the blog owner just doesn't want to honor 
for some reason?  I am planning to call this state, UNAPPROVED, but just 
wanted to make sure this is a valid status that we want to continue 
supporting.

-- Allen


Dave wrote:
> +1 to that as well. Good idea.
> 
> - Dave
> 
> 
> 
> On 1/9/07, Allen Gilliland <al...@sun.com> wrote:
>> This is another very short proposal which I'll just do on the list.
>>
>> Currently, the roller_comment table has 3 boolean columns for approved,
>> spam, pending which identify the state of the comment.  This ends up
>> causing a bit of extra work and confusion because you have to set
>> multiple flags on a comment to properly identify it's state rather then
>> simply choosing a single status flag.  I'd like to fix this so that
>> comments use a status column like the one used for weblog entries.  The
>> benefits are that 1) it's easier to manage what state a comment is in
>> and 2) it will improve query performance for comments.
>>
>> 1. it's easier to manage because instead of having to mark a comment
>> with pending=true and approved=false to make it a comment awaiting
>> moderation, you would instead simply set status=PENDING.  this is easier
>> and more extensible then the current solution.
>>
>> 2. on a more useful note, this will improve query performance.
>> currently queries against the comment table require many columns of
>> criteria to get the proper result set, i.e. approved=true and spam=false
>> and pending=false.  with this change all those criteria will be
>> consolidated into a single criteria for status=XXXX which will make
>> queries shorter, faster, and easier to index for.
>>
>> The process for making this change is easy enough ...
>>
>> 1. add a new status column to the comment table and attribute to the
>> CommentData pojo.
>> 2. add a couple lines to the sql upgrade script to properly set the
>> status column during upgrades.
>> 3. update the comment/trackback servlets and comment management struts
>> actions to use the new status field instead of all the old boolean
>> fields to manage comment status.
>>
>> The statuses will be ...
>>
>> APPROVED - valid comment for display on weblog
>> SPAM - considered spam, not available for display on weblog
>> PENDING - awaiting moderator approval, not considered spam
>>
>> everyone okay with this?  any objections?
>>
>> -- Allen
>>

Re: Quick Proposal: new status field for comments

Posted by Dave <sn...@gmail.com>.
+1 to that as well. Good idea.

- Dave



On 1/9/07, Allen Gilliland <al...@sun.com> wrote:
> This is another very short proposal which I'll just do on the list.
>
> Currently, the roller_comment table has 3 boolean columns for approved,
> spam, pending which identify the state of the comment.  This ends up
> causing a bit of extra work and confusion because you have to set
> multiple flags on a comment to properly identify it's state rather then
> simply choosing a single status flag.  I'd like to fix this so that
> comments use a status column like the one used for weblog entries.  The
> benefits are that 1) it's easier to manage what state a comment is in
> and 2) it will improve query performance for comments.
>
> 1. it's easier to manage because instead of having to mark a comment
> with pending=true and approved=false to make it a comment awaiting
> moderation, you would instead simply set status=PENDING.  this is easier
> and more extensible then the current solution.
>
> 2. on a more useful note, this will improve query performance.
> currently queries against the comment table require many columns of
> criteria to get the proper result set, i.e. approved=true and spam=false
> and pending=false.  with this change all those criteria will be
> consolidated into a single criteria for status=XXXX which will make
> queries shorter, faster, and easier to index for.
>
> The process for making this change is easy enough ...
>
> 1. add a new status column to the comment table and attribute to the
> CommentData pojo.
> 2. add a couple lines to the sql upgrade script to properly set the
> status column during upgrades.
> 3. update the comment/trackback servlets and comment management struts
> actions to use the new status field instead of all the old boolean
> fields to manage comment status.
>
> The statuses will be ...
>
> APPROVED - valid comment for display on weblog
> SPAM - considered spam, not available for display on weblog
> PENDING - awaiting moderator approval, not considered spam
>
> everyone okay with this?  any objections?
>
> -- Allen
>

Re: Quick Proposal: new status field for comments

Posted by Craig L Russell <Cr...@Sun.COM>.
+1 Sounds like a good idea.

Craig

On Jan 9, 2007, at 11:51 AM, Allen Gilliland wrote:

> This is another very short proposal which I'll just do on the list.
>
> Currently, the roller_comment table has 3 boolean columns for  
> approved, spam, pending which identify the state of the comment.   
> This ends up causing a bit of extra work and confusion because you  
> have to set multiple flags on a comment to properly identify it's  
> state rather then simply choosing a single status flag.  I'd like  
> to fix this so that comments use a status column like the one used  
> for weblog entries.  The benefits are that 1) it's easier to manage  
> what state a comment is in and 2) it will improve query performance  
> for comments.
>
> 1. it's easier to manage because instead of having to mark a  
> comment with pending=true and approved=false to make it a comment  
> awaiting moderation, you would instead simply set status=PENDING.   
> this is easier and more extensible then the current solution.
>
> 2. on a more useful note, this will improve query performance.  
> currently queries against the comment table require many columns of  
> criteria to get the proper result set, i.e. approved=true and  
> spam=false and pending=false.  with this change all those criteria  
> will be consolidated into a single criteria for status=XXXX which  
> will make queries shorter, faster, and easier to index for.
>
> The process for making this change is easy enough ...
>
> 1. add a new status column to the comment table and attribute to  
> the CommentData pojo.
> 2. add a couple lines to the sql upgrade script to properly set the  
> status column during upgrades.
> 3. update the comment/trackback servlets and comment management  
> struts actions to use the new status field instead of all the old  
> boolean fields to manage comment status.
>
> The statuses will be ...
>
> APPROVED - valid comment for display on weblog
> SPAM - considered spam, not available for display on weblog
> PENDING - awaiting moderator approval, not considered spam
>
> everyone okay with this?  any objections?
>
> -- Allen

Craig Russell
DB PMC
clr@apache.org http://db.apache.org/jdo