This blog’s been neglected a tad due to an obscene amount of other work but now that I have a bit of free time I’ve decided to delve into the world of web development. Previously I’ve only really had front-end web design experience – XHTML, CSS and some JavaScript, however in my other life I interact regularly with Oracle databases so I thought I’d play around with the main Open Source equivalent and document my experiences.

Installation

Being only a couple of years into the world of Mac (best decision ever!) I was vaguely aware of an inbuilt Apache web server in OS X but never really took the time to check it out. Turns out, I wouldn’t need to anyway due to MAMP. MAMP will easily install a complete local server environment for you to play with. And when I say easy, I really mean it:

  1. Visit the website and download the MAMP dmg
  2. Mount the disk image and drag the folder into your Applications folder MAMP Installation
  3. Open the MAMP folder in your Applications folder, double-click the MAMP widget and add it to your dashboardMAMP Widget
  4. On the widget, click on the ‘Start servers’ button and after a moment you should see two green lights
  5. You’re done! See, told you it was easy…

Okay, so you probably want some proof this was all it took. We’ll come to that next.

Tools

Coda

I’ve always used Dreamweaver for my web development but I decided to give the infamous Coda a try for the front-end development since I’d heard so much about it. I have to say, so far I’m very impressed. Whereas Dreamweaver has a load of functionality, I have to admit I probably used about 10%. Coda seems to have taken that 10% and packaged into a slick interface. Props.

Here I’ll show you how to add something useful to your new server environment:

  1. Visit the website and download Coda (you can use it free for 15 days)
  2. Unzip the file and drag the Coda icon to your Applications folder
  3. Add a new site with the following parameters:
    • Nickname: Localhost (or anything you like)
    • Local URL: http://localhost:8888/
    • Local Root: /Applications/MAMP/htdocsCoda Site Settings
  4. Leave everything else blank and click ‘Save’
  5. Double click on the new site and you’re presented with a blank html file
  6. Add some content and save the file as index.html
  7. Clicking on the preview button will show you the file via your new web server.

If you want to see a php file in action do the following:

  1. File > New > PHP-HTML
  2. Add: <?php phpinfo();?>
  3. Save the file as phpinfo.php
  4. Preview the file and voila, you have your current php settings and info

A couple of important things from this:

The /Applications/MAMP/htdocs folder acts as your root server folder

You can use any browser to view the files on your website to http://localhost:8888/yourfile.html

Sequel Pro

Okay, so that’s front-end stuff sorted. What about your MySQL databases you may ask. Well I decided to go for Sequel Pro as my database management tool. Here’s how to set it up:

  1. Visit the website and download the dmg
  2. Mount the disk image and drag the folder into your Applications folder
  3. Launch Sequel Pro and you will be presented with the new connection window, enter the following
    • Host: localhost
    • User: root
    • Password: root
    • Socket: /Applications/MAMP/tmp/mysql/mysql.sockSequel Pro Settings
  4. Leave the rest blank and then hit the + symbol to add the settings to your favourites
  5. Click ‘Connect’ and now you have access to MySQL!

Using the ‘Choose Database…’ drop-down you can select the ‘test’ database and add tables as you wish, or create a new database as required.

What’s next?

Good question! That’s as far as I’ve got so far but I’ll be sure to update you as I go along…

The Big Trip…

10 December 2008

Well it’s off to Southeast Asia again! Starting the 12th December I’m taking a break from the freezing European weather and heading on out in search of some warmth!

The plan:

  • 12/12 Paris to Singapore
  • 16/12 Singapore to Kuala Lumpur
  • 17/12 Kuala Lumpur to Penang
  • 19/12 Penang to Singapore
  • 21/12 Singapore to Phuket
  • 28/12 Phuket to Singapore to Bali
  • 07/12 Bali to Singapore to Paris to Austria

Yes, you read right, I’m flying staight to a friend’s stag do in an Austrian ski resort… I’ll be passed out on the bar if you need me!

I have my (new) camera gear packed and ready and I’ll do my best to post a few pics from the different places along the way.

Joker Shoot

16 September 2008

Why so serious? This Dark Knight inspired shoot was to form part of a make-up artist’s portfolio.

Details: Nikon D200, Nikkor 24-120mm, Nikon SB-800