Some Project-Building Tips
Anton Gerdelan [gerdela@scss.tcd.ie] 27 Nov 2013

Web developers set up a local server on their machine to test their site before uploading to the real server. Setting up on a real server is exactly the same process, except that it has a proper web address, or registered domain name.

Get project running on a local server, then try it with several different browsers.


Mongoose

  1. Download https://code.google.com/p/mongoose/
  2. Unzip in a local folder
  3. Run
  4. Serves files out of own folder (Windows) or /var/www/ (Linux/Mac)
  5. Create a test index.html page in the folder
  6. Navigate browser to http://127.0.0.1/

LAMP/WAMP/MAMP


Check that Apache2 is Running

  1. Restart (or start) Apache2 server
  2. Browse to http://127.0.0.1/ to see if basic HTTP works (HTML index page)
  3. On WAMP this is c:\wamp\www - you can put your HTML here

Check that PHP5 is Running

  1. Create a simple test.php file in your web folder (same place as the .html):


Check that MySQL is Running


Create a New Database with phpmyadmin

  1. Click on "Databases" tab
  2. Choose a name and format (I used default format)

Create a Table in the new Database

  1. You can create tables in phpmyadmin (or the mysql terminal) too
  2. Click on your new db in the left-hand thingy
  3. I'll make a table called "logins" with 2 columns of data.
  4. Guess what they will be?

Add a Couple of Default Entries

  1. "Adding" an entry to a table is called "INSERT"
  2. Click on the "insert" tab
  3. Note that when you do this PHPMYADMIN also shows you the SQL query (code) to use to do this from the SQL terminal or in a PHP script:
    INSERT INTO `antonsdb`.`logins` (`name`, `password`) VALUES ('anton', 'secret');

Query the Database from Our PHP Page



Now We Can SELECT/INSERT/etc.



Extra Info


Helpful Links



Our 3d Project

Gradually play with new ideas and put little demos up http://kdeg-vm-44.scss.tcd.ie/proxy/buildviz/demo/



And Because You Asked...

Youtube - fireball test vid