views:

240

answers:

3

I'm looking to start on a project web 2.0 app for a bit of fun. I'm a little confused as to what sort of backend I will require. The site revolves around a user submitting an item, then other users submitting responses, then rating each response up or down. That sounds a little like digg.com I realise. How do I go about tackling a project like this? Is a ruby-on-rails + MySQL solution a good way to start? I've also read it could be developed using wordpress :S

Are there any guides/documentation/global-tutorials for this sort of thing? I'm very new to web applications and am using this as a learning tool.

Dom

A: 

Use whatever technology you have some familiarity with or whatever you would like to learn. You can do bad job or great job with any technology at hand.

From the description you provide, it should not be that complicated, but you will definitely need to learn some HTML and CSS, and later JavaScript.

User
I'm well experienced with html css and js. I have next to no experience with database manipulation via web languages. I'm wondering what the best method is.
There is no best. Just pick up a technology, get a book and go practice.
User
+1  A: 

You basically need 3 things to build a site like you're looking for.

1) you need a database to store the state of your application. Something like MySQL or MSSQL Express Edition.

2) you need a server side technology like PHP or ASP.NET to handle the communications between the web browser and the database.

3) you need some javascript code in your browser to capture the events and inputs from your users.

A basic flow might look like this:

A user navigates to page and clicks a button which raises a javascript click event. The click event handler makes an AJAX request back to the PHP code running on the server which saves the data to the database.

lomaxx
Cheers for that. I'm most concerned about the layout of the database. How do I store the data? Do I make a new table for each topic, with the actual responses being the fields (with the ratings as columns). I realise these are the noobiest comments, so perhaps some texts/guides on web database utilization.
+1  A: 

First things first, when starting to learn something like this, read a book.

If its Rails you are interested in, you could probably skip buying a book on databases, but would advise:

For online guides, Rails has its own 'Rails guides' - http://guides.rubyonrails.org/

For a free guide to Ruby you could try the online pickaxe http://whytheluckystiff.net/ruby/pickaxe/

The plus side to Rails is that you have a Ruby API to access your database (in the form of ActiveRecord) where you can skip out (initially) on learning a lot of SQL (not recommended for performance applications, but good for starting with).

My advice is to learn this stuff before you go on to AJAX.

Oh, and skip web development on Windows, go install VMWare Server and install any distribution, though, for ease of use try Ubuntu (unless you are already on a Linux machine / Mac), it will save you lots of development headaches later on, though may be a pain initially. There are guides for getting set up for this all over Google.

As for your question on databases, even though the books may suggest using sqlite, try and avoid it, and go for something like Postgres instead of MySQL, the benefits will become obvious to you once you start looking at more advanced SQL stuff.

Omar Qureshi
Thank you. Appreciate the answers guys. Will look at some of those links. I think the best thing to do is just get a prototype up and running and tweak the issues out, rather then try and plan for problems now.
If you do some BDD, then you can plan for problems now and develop for them. Adding tests for basic stuff, then adding additional tests every time you find a flaw in your app
Omar Qureshi