Building a Like/Follow feature, how would you do it?
Hey there
Im need of pros/cons on different approaches on how to build a like/follow feature, here im thinking performence mostly. I have content type named "projects" and members need to be able to follow the project.
So i need to be able to get a count on the followers and the single user needs to be able to get a list of the projects he/she follows.
1.Relations
Either im thinking that I would use the Relations in umbraco, but since relations only run directly to the database and not through the cache that might become quite expensive.
2.MNTP on member/project
Another solution is to have a mntp on either the project or the member with a list of the either followers or the projects i follow. Dunno if its to much to keep a list on both the project and the member but would prob. give the best performence.
We actually have this as an exercise at the official masterclasses and we use approach 1.
While #1 would require a db lookup, it's very efficient compared to reading a comma separated string and fetching the members from there (especially if you run a newer Umbraco installation with proper indexes ;-)). Remember accessing a DB on a website is a quite common thing.
Building a Like/Follow feature, how would you do it?
Hey there
Im need of pros/cons on different approaches on how to build a like/follow feature, here im thinking performence mostly. I have content type named "projects" and members need to be able to follow the project.
So i need to be able to get a count on the followers and the single user needs to be able to get a list of the projects he/she follows.
1.Relations
Either im thinking that I would use the Relations in umbraco, but since relations only run directly to the database and not through the cache that might become quite expensive.
2.MNTP on member/project
Another solution is to have a mntp on either the project or the member with a list of the either followers or the projects i follow. Dunno if its to much to keep a list on both the project and the member but would prob. give the best performence.
We actually have this as an exercise at the official masterclasses and we use approach 1.
While #1 would require a db lookup, it's very efficient compared to reading a comma separated string and fetching the members from there (especially if you run a newer Umbraco installation with proper indexes ;-)). Remember accessing a DB on a website is a quite common thing.
Hey Niels
Awesome and thanks for great input, was also my first top of the head idea since the other one seems messy and YACK'ish :)
Yea its on a 7.1.8, soooon 7.2 :D
is working on a reply...