PDA

View Full Version : little web codeing question


BaconFatty
08-26-10, 07:28 PM
Ok what I'm trying to set up is a site that users can post news storys that they themselves have written or they have found and have other users rate them. Posts with higher ratings show higher in the list kinda like digg, but with one main difference, people will also be able to rate other users. Users with a higher rateing have more power in there rateing.

For example, say user X posts a story, and User Y just joined and no one has rated him yet but he likes it so he gives it a thumbs up, well his vote only counts as 1, then user Z whos been on the site for a while and has a rateing on himself of 100 likes the same story and rates, well his vote counts as 10 so the story now has a rating of 11 and is displayed accordingly.

What my question is what language would be best suited for this kind of system? The only web languages I am well versed in are HTML and CSS. But I'm a fast learner so any ideas on this and/or links to sites on learning them would be helpful.

Jmtyra
08-26-10, 07:31 PM
::looks in thread::

::reads posts::

::realizes it's over my head::

::leaves::

:p

Good luck with your project :)

BaconFatty
08-26-10, 07:40 PM
::looks in thread::

::reads posts::

::realizes it's over my head::

::leaves::

:p

Good luck with your project :)

Thank you :)

Krogen
08-26-10, 07:59 PM
An SQL database for the ratings and some PHP code to retrieve the information from the database should do it.

PHP is very easy if you know C or C++, or any other programming language for that matter. SQL you could learn in a few nights, it's quite trivial.

BaconFatty
08-26-10, 08:07 PM
An SQL database for the ratings and some PHP code to retrieve the information from the database should do it.

PHP is very easy if you know C or C++, or any other programming language for that matter. SQL you could learn in a few nights, it's quite trivial.

I know C++, Python, Objective C, and cocoa, just dont think they can go online, you know of any good tutorials on learning basic PHP/SQL, other then w3schools or is w3 good enough for getting a good grasp on them?

Krogen
08-26-10, 10:22 PM
I know php.net is a great source for PHP stuff, I never read the documentation that they have, only used it for looking up mySQL functions. Check it out.

As for SQL, I don't know of any good sources for it. But a quick search through google turned out a nice tutorial at w3schools. It seems to cover pretty much everything there is in SQL. link (http://www.w3schools.com/sql/default.asp)

kayson
08-26-10, 11:47 PM
+1 for PHP and MySQL. Both are very easy to learn. If you are hosting the site yourself, you'll want to get pretty familiar with MySQL commands. If someone else is hosting the database and everything is set up for you, you really only need to learn SELECT, INSERT, and UPDATE.

To get the database set up, check out phpmyadmin (http://www.phpmyadmin.net/home_page/index.php). It's much easier to use this to create tables than send queries manually via a script.

hafa
08-27-10, 05:04 AM
I'm sure I'll get flack for this, but my personal preference is MSSQL/ASP/ASP.NET.

Virtually all Windows hosts offer MSSQL as part of the package. MSSQL is very powerful, portable and scalable, but connectivity to PHP is clunky at best. Although MYSQL is certainly adequate to your needs, MSSQL, IMHO, is a better DB.

If you're already familiar with C++, C# on the .NET platform will be a very easy transition and offers some of the best performance on the web today. You can then leverage the advantages of MSSQL with the performance and portability of .NET to your application. ASP classic is very easy to understand and has a comparable support and code base to PHP. For high traffic sites, however, it can have some performance issues if not coded correctly and the "spaghetti code" of VB script is offensive to some programmers.

I.M.O.G.
08-27-10, 01:27 PM
MySQL is best IMO. If you need it scalable, from the start use the innodb engine rather than the default myisam engine. Mysql is what vbulletin runs on, and with innodb the "big boards" don't have the scalability problems of a default mysql install.

Avoid windows hosts from the start and you won't be locked into them down the road - doing this can save you costs down the road.

As for your algorithm, digg and stumbleupon already do something similar. Instead of giving someone rep by voting for them, you can follow them. The more followers someone has, the more power their activities carry due to "network effect". This also avoids some problems inherent with reputation based systems and "gaming" the algorithm.

Sounds like a cool project, just keep in mind its important to reward new members. If a new member sees their votes count as nothing compared to established members, they will be less inclined to participate, and new members are the lifeblood of any online community.