Calculation of ratings / points on the community website

To learn ASP.NET MVC, I'm going to create a community forum such as SO where people can rate posts, users, etc., and so the user can score points. I just can’t understand if I need to add points to the user profile whenever an action is performed (message rating up / down, user created a new message, etc.), or if it should be calculated based on various actions performed by the user .

I have several pro and con for both ways to do this:

Add rating:

Pro: Easier to implement, and much faster and less resource intensive.

Con: If the meaning of the various actions changes, there is nothing you can do about it. There is no way to show the story of how you got your points.

Rating calculation:

Pro: It’s much easier to have a point history for the user and people viewing this account. The ability to change the number of points for this type of activity.

Con: A little harder to implement. More resources are vast (can be prevented by caching data or creating a job that calculates points).

+3
source share
3 answers

I think you thought a lot about everything. I can just offer some technical advice. All things are equal, always start with what is easier to implement.

, , , . ? , . , .

, , . , , . 90% , , , . .

+2

, - stackoverflow, Stackoverflow , . linq, SQL, . ( , linq)

, , , linq, MVC .

+2

ActionFilter, , / . AuditActionFilter. , . , filterContext, xml, /, .

0

Source: https://habr.com/ru/post/1762177/


All Articles