Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rasmus Fjord 672 posts 1562 karma points c-trib
    Dec 08, 2014 @ 13:48
    Rasmus Fjord
    0

    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.

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Dec 08, 2014 @ 14:02
    Niels Hartvig
    101

    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.

  • Rasmus Fjord 672 posts 1562 karma points c-trib
    Dec 08, 2014 @ 14:03
    Rasmus Fjord
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft