Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ideas Page #31

Open
dragoonis opened this issue Jun 7, 2012 · 8 comments
Open

Ideas Page #31

dragoonis opened this issue Jun 7, 2012 · 8 comments

Comments

@dragoonis
Copy link
Member

Purpose

The purpose of this page is to let users input their suggestions of what's missing in PPI, and let people vote on these ideas, similar to stack overflow, where the item with the most votes is at the top.

Implementation

  1. The route for this should be at /ideas (/modules/Application/resources/config/routes.yml)

  2. This should be mapped to an Ideas controller (Application/Controller/Ideas.php)

  3. There should be an ideas database table containing fields. id, title, vote_score
    3.1) There should be a Storage class to map to the ideas table named: Application/Storage/Ideas.php
    3.2) Their should be an Application\Entity\Idea class to be returned by the above Storage class

  4. The issue of duplication should be avoided, so we need to match on IP Address and cookie, thus a second database table is needed.
    4.1) DB table named: ideas_votes with fields. id, idea_id, ip_address this will let us determine if a user of a specific ip_address has already voted on this idea_id before.
    4.2) A cookie will be set on this named ppi_idea_x where X is the ID of the idea, this will let them still vote on multiple ideas.

  5. When someone is voting it will maintain the ideas.vote_score field, either incrementing or decrementing the value.
    5.1) When displaying the ideas a simple ORDER BY ideas.vote_score DESC will be enough to show ideas with the highest votes.

@alfrekjv
Copy link
Member

alfrekjv commented Jun 7, 2012

Sounds good, for point 4, I propose cookies + IP, since in some cases the IP is dynamic. (Specially in my country, My modem grabs a different IP any time it connects to the net)

@dragoonis
Copy link
Member Author

Ammending original comment.

@miguelramos
Copy link

I propose a friendly way for reading routes. On config you have defined routes like: Module:Controller:Method, my propose is to distinguish module name and method in other way like: Module::Controller@Method. And for more complex controllers you can use a point to refer folder controllers. Example: Module::path.to.controller@method. I think, this way is more friendly readable.

@dragoonis
Copy link
Member Author

Hi Miguel,

From a simple perspective there's no technical advantage on changing a ":" to a "@". This is syntax being re-used from the Symfony2 component library which is in our advantage to be consistent with.

There may be a need for revising the syntax if a developer would like to use sub-controllers to further organise their /Controllers/ directory. However deviating from the globally known ":" syntax does seem disadvantageous.

Regards,

  • Paul.

@BenExile
Copy link
Contributor

Hi Everyone,

The IP check would be easily bypassed via a proxy and cookies can be removed by the user.

My opinion is that anonymous votes should not be allowed and that users who wish to contribute should create an account and vote that way.

Opinions?

@alfrekjv
Copy link
Member

I like @benthedesigner 's opinion, if anyone wants to contribute/vote, there's no harm for a 2 minutes registration form.

@dragoonis
Copy link
Member Author

@benthedesigner Good points.

Lets roll this out, and then we can debate over making it secure and unique at the end.

I have some things I can to achieve first, before I allow user registrations, that's why.

Cheers :)

@dragoonis
Copy link
Member Author

Found a website similar to what we're looking to do: http://puu.sh/15Evn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants