David Golding



The Web Developer’s Starter Kit

By David Golding | Print This Post Print This Post

So you want to begin developing for the net… You have visions of a website that looks good, functions well, and is fun. Well here’s your starter kit, everything you will want to install and run before jumping out there to build websites.

Choose your language

You’ll have to decide on a language with which to develop. The most popular are: Java, PHP, C/C++, ASP, Perl, Ruby, and Python. You probably don’t know which one means what, what all the letters mean, and how different they all are. I’m going to focus on PHP, mainly because it is my preference, but the starter kit can be easily adapted to any of the others. I recommend trying out PHP just a little and then from there you can discover what other language options best suits you.

The Kit

For developing in PHP, you will need:

Once you have installed all these programs and they are waiting for you to use them, you should be in business. And when you’re web host is configured, you’re ready to set up your site.

For a detailed step-by-step installation of both Xampp and MySQL, see my other article, How to Install CakePHP on a Mac. It’s the same for PCs too.

When Xampp is running, you should be able to open Firefox and type simply “http://localhost” and it will show up in the browser. What you have now is the equivalent of your web hosting service except it’s running on your computer. It’s tricking Firefox into thinking that it’s connecting to the internet to view files on your computer, when really you need no internet connection at all. This is good. It means you can run scripts and files from your computer without having to upload them to your web host, open them in the browser, and make fixes in cycles like that. When it’s running correctly on your localhost, then you can upload them all the same to the web host, or remote host, and it will run.

Writing “Hello World” with the Startup Kit

Let’s write a “hello world” script using the startup kit. Go into Eclipse. It will want to set up a workspace. In the xampp folder (usually installed in the Applications folder on a Mac), there’s a directory called “htdocs.” Choose this folder in Eclipse as the workspace. That way whenever you create and edit projects, they are immediately accessible to the localhost.

  1. In the File menu in Eclipse, select “New PHP Project.”
  2. Name it “helloworld”
  3. In the PHP Explorer window, right click on the folder “helloworld” and select New > PHP File
  4. Name it “index.php”
  5. Double-click on “index.php” to edit the file.
  6. Paste the following code:
1
2
3
<?php
echo "Hello World!";
?>

Now when you fire up

1
http://localhost/helloworld

, it will display “Hello World!”.

My recommendation from here is to start small, with some good scripts. Copy and paste code from other scripts on the net and play around with it. Eclipse makes life wonderful. You can have multiple files open, it will catch some errors for you, and is generally a good program for any time of programming and scripting.

Jump on over to Hotscripts and you’ll find somewhere around 12,000 PHP scripts to play with. When you’re ready to set up some databases to house data, you’re all set with MySQL and CocoaMySQL. You’re well on your way to becoming a brilliant web programmer!

Now that you’re started in PHP, go out there and create some sites!


Comments

No Responses to “The Web Developer’s Starter Kit”



Submit Comment


Beginning CakePHP: From Novice to Professional by David Golding

Other Blogs

David Golding

A blog about CakePHP, web design, and grad studies in religion. © 2008, D. Golding