You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rave.apache.org by "Cooper, Sean D." <se...@mitre.org> on 2011/10/26 21:33:48 UTC

WidgetRatingService & WidgetService blend functionality

Jasha,

I was merging my latest changes back with the tree and noticed something odd.  If you created a new WidgetRatingService then why leave the saveWidgetRating, removeWidgetRating, and getUserWidgetRating methods in the WidgetService?  Shouldn't those by migrated to the WidgetRatingService?

I'm working on the WidgetComments and wanted to keep consistency with the ratings.

-Sean


Re: WidgetRatingService & WidgetService blend functionality

Posted by Jasha Joachimsthal <j....@onehippo.com>.
On 26 October 2011 21:33, Cooper, Sean D. <se...@mitre.org> wrote:

> Jasha,
>
> I was merging my latest changes back with the tree and noticed something
> odd.  If you created a new WidgetRatingService then why leave the
> saveWidgetRating, removeWidgetRating, and getUserWidgetRating methods in the
> WidgetService?  Shouldn't those by migrated to the WidgetRatingService?
>
> I'm working on the WidgetComments and wanted to keep consistency with the
> ratings.
>
>
You're right, it's not consistent. While I was applying your patch, I became
a bit worried about the performance of crawling through a list of ratings to
find the rating of a specific user. Especially when you can search for that
record if you already know the widget and user. That's why I created the new
WidgetRatingService, but I forgot to move the other methods.
If we're lucky, a widget can have 1000+ ratings and I doubt if it's a good
idea to eagerly fetch those when you're listing widgets. This will also
apply to comments.

Unfortunately I've applied the wrong version of your patch (the first,
incomplete instead of the second). I will fix this tomorrow morning and
hopefully you will find the correct end result when you start working thanks
to the time difference ;)

Jasha