[TYPO3-typo3org] Ratings, another try
Michael Scharkow
mscharkow at gmx.net
Tue Apr 4 19:00:21 CEST 2006
Hi *,
I hope to finish the rating system for t3.org this week, but I need some
help and hints.
Okay, here's the problem to solve:
Ratings are split in three dimensions and relate to *one specific*
extension version. For every extension version it is fairly easy to
compute the average overall rating (overall is computed from the three
single dimensions and stored in a dedicated table column). No problem
here. All averages are only displayed if there at least 3 (or 5) ratings.
However, this means that on any extension version update, *all* prior
ratings are "lost": Let's say tt_news 2.2.25 is the best rated
extension, Rupi uploads a new version, and now it is not even in the top
list.
Solution 1: Average ratings are always for *all* extension versions,
this is as easily computed in SQL, but poses a new problem: The top
rated extension might not have one single rating for the current
version, or a long-time bad-ass extension might never make it above
average because of the old ratings legacy, even if the current versions
are top rated.
Solution 2: Make the ratings for the current version weigh more than the
older ratings. I don't want to write a research paper on this, so why
not simply say
WEIGHTED_AVG(version) = 2*AVG(version) + AVG(olderversions)) / 3
So that new versions matter, but the rating history is still useful. The
problem is now on how to compute this for the long lists of extensions
(think full list!). Please don't come up with a
foreach(extVersion) {compute_avg();}
because we need this to be *fast*. I don't know if it's possible to
compute this straight in SQL, so my solution would be another caching
table in which extkey, version, weighted_avg_rating are stored and which
is updated when a new rating is submitted.
With both solutions the problem remains that it is possible that a
overall top rated extension does not have any (good) ratings attached to
the current stable version, which is displayed everywhere...
Any thoughts on this? And please, no ideas without implementation proposals!
Cheers,
Michael
More information about the TYPO3-team-typo3org
mailing list