Forum Moderators: phranque

Message Too Old, No Replies

Creating an online polling site

         

charlie jive

12:44 am on Mar 23, 2006 (gmt 0)

10+ Year Member



Hello everyone!

I'm planning on starting a new website that will offer of plenty of online polls to visitors. The site will highlight the preferences of visitors by offering a myraid of polls/lists (upwards of 500-2000 polls/lists). The problem is I don't know where to start!

Last year I got into website creation pretty heavily for a few months, but to be perfectly honest I was on no sleep half the time and half inebraited the rest of the time so unfortunately much of my expertise (such as it was) has been replaced with other junk up in the wastebasket of my head. I still command a fairly good knowledge of HTML/PHP/MySQL (and a very limited command of CGI scripting) and am confident that these three will be enough to get the site up and running, however I'm in desperate need of a few tips on how to get started.

(I'm afraid that it might be best to utilize some form of CMS for this project. I have no real experience using a CMS, so any links to sites/forums that would help speed up the learning process would also be appreciated.)

Requirements:

- Dynamic polls that allow users to vote on their preferred options and view the results of each poll.
- A form of IP/User logging that will allow users to cast a certain amount of votes in a given time period.
- Ability for users to create new polls and have them added to a master list (ie: a portion of the homepage will display categories and sub-categories of polls/lists available for veiwing/voting).
- A "popularity" rating system that will enable polls to be listed (descending order) in terms of sheer number of votes.
- Ability to cross-list users/voters and their poll choices (ie: one user wants to contact other users/voters who had similar interests and/or votes).

Those are about the only requirements I can think of at the moment. And while I appreciate any critiques of my brainchild, please keep in mind that the site will be quite a bit more comprehensive than my brief description, but the real meat and potatoes will be the polls/lists (with an emphasis on "lists"...by "polls" I merely mean that users will be able to cast a vote to determine the order of the "lists").

Any suggestions on how to get started are greatly appreciated! Thanks in advance.

Edit: Forgot a requirement.

charlie jive

1:15 am on Mar 23, 2006 (gmt 0)

10+ Year Member



I forgot to mention a fact that may be quite relevant: The gist of the website is to display the lists, not the polls themselves, although each list is in itself sort of a poll in that users/visitors will have the option to vote for their choice(s).

In fact, the "polls" aren't actually going to be polls. Users will be able to click on a "Vote now" type link that will allow them to register their votes. Again, the most important aspect of the website will be the lists themselves, not the polls, per se.

I feel like I'm not articulating this well.

Demaestro

4:28 pm on Mar 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well I can tell you that to start you will need to decide what dynamic code you will use to serve up the html for your site.

You WILL NOT want to do this with just HTML, XHTML, and javascript. Even if you use some neat AJAX stuff it will still be really hard to pull off what you want without some dynamic scripting language.

PHP right now seems to be the leading language for dynamic sites although I am not a fan of it. Lots of security issues from what I can see, but lots of people use it and are happy with it.

I would take a look at it though because there are so many people using it, and that will make it easier to find code examples and maybe even find some code that is available to the public that does some of the stuff you want already.

You will also need to decide on a database to store polling results and poll attributes. Again if you decide to go with PHP then MySQL seems to bundle nice with it. Depending on how you want this to scale you should be ok, but you do have to consider that if your site is popular that you could end up with billions of records that you want something that can scale up if needed, I know the free MySQL works nice to a point and but it is possible that the data will at some point outgrow your db so make sure that you have options to upgrade if needed.

Once you have these 2 things then you can get started.

Post back if you have more questions.

charlie jive

4:36 pm on Mar 23, 2006 (gmt 0)

10+ Year Member



Thank you for the reply. I am comfortable with PHP and MySQL, so I'll most likely utilize those two (if I don't move up to a CMS). After reading my own posts, I realize how much I had forgotten, and I was able to ascertain the solutions to some of the requirements I listed. However, I am still uncertain on how to go about the IP/User logging part, but I'm sure if I do some research I can find a script that I can modify to get that accomplished without a problem.

The question still remains though - To CMS or not to CMS?

With the ability for users to vote (modify) on various polls/lists and to have the power to create, modify, and remove lists/polls of their own, it seems that a CMS would be a much simpler and effective way of managing a site such as the one I'm planning.

Comments?

Demaestro

5:59 pm on Mar 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well it depends on how you want to have your repository.

If you use a CMS then presumably you would create a portal type called "poll" and you would let users create polls and set them up. If you go this route then you will have an object in an object oriented database. That is to say that all the polls would be an object and you would have to decide how you wanted to store the reults of the polls. Perhaps the poll itself could be a container type object that could contain poll result sub-objects. This has advantages and disadvantages. One major advantage is if you use the right CMS that handles the indexing of objects then you won't have to write much SQL. It will be mostly searches on your object catalog.

The disadvatage to this though is you can't take advantage of relation database querying. The joy of SQL comes when you want to do reporting. Getting totals, or joining agianst related data is so much easier with SQL.

It really is a personal choice but I always use reporting as my guide, if I anticipate lots of reporting and querying of data then I go SQL (relational database). If it is just a matter of cataloging some objects and bringing them to a screen with some methods that allow browsing and a prent child type of relationship through out I go with an object oriented database.

Because you haven't picked a CMS I will add this comment. When you go with something that someone else built then you have to play nice with the code they laid down. If something doesn't work as advertised, or just does't do what you had hoped then there is a lot of time spent trying to figure out someone elses code, or looking up documentation so that you can make changes. I find that it saves headaches if you stick to the beast you know. That way when you run into a road block you aren't frustrated with figuring out what someone else did.

If I were you I would go SQL. And since I am pointing you in a direction, I will be happy to answer more questions when they come up so don't be shy and keep posting.

Demaestro

6:06 pm on Mar 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Oh also the IP of the visting user if a simple thing to get, it is grabbed many different ways and I am a PHP not knower so I am not sure about the syntax for grabbing it but it comes in the HTTP header.

I bet a simple search of the PHP section would reveal the answer to this, I would say you can ask in there but I am wagering that it has been asked and answered more then once.

charlie jive

1:12 am on Mar 24, 2006 (gmt 0)

10+ Year Member



Thanks again, Demaestro! I've been busy today so I haven't had a chance to do much research, but your advice is very helpful and much appreciated.