29 August 2008

What’s your set-up? Working locally on Windows

Posted by Dan under: web development .

Just a quick post aimed at people newer to web development, really.  I can remember a time when I had some web-space and some crappy HTML editor from a disc from with .net magazine, an FTP client and not much else.  And this was in the days of dial-up so learning and progress were slow.

So what do I use now?  I’ve yet moved onto a Mac, although that is my next move but I have a little set-up which works pretty well on my XP machine.

Setting up a site

I run XAMPP from Apache Friends, because of all of the webserver installers, this one just worked straight away and had everything I needed.  I have this running from ‘C:\xampp’ and set-up directories in htdocs for each kind of work (ie. agency, freelance, demos of products, my own projects, etc) and within that, I have one per client or site, so I end up with a path like: C:\xampp\htdocs\hereinthehive\clientX\main_site

Each site has a fairly similar basic file structure:

  • behaviours - for Javascript
  • images
  • includes - for classes and snippets of code
  • styles - CSS
  • silo - storage for media used in upload, often subdivided by type/category

I then go to the ‘hosts’ file to set a loopback url, which on XP machines is normally at: ‘C:\WINDOWS\system32\drivers\etc\hosts’

You then add the name or domain for the site and set it to the loopback/localhost address like this:

127.0.0.1  hereinthehive

I then set the site up in Apache in the vhost config file at: C:\xampp\apache\conf\extra\httpd-vhosts.conf, basically, like this:

# Here in the Hive
<VirtualHost *:80>
DocumentRoot “C:/xampp/htdocs/hereinthehive/blog/”
ServerName hereinthehive
</VirtualHost>

If you’re using XAMPP then bring up the control panel and restart Apache.  You should now be running your site at http://hereinthehive/ in your browser!

I’ve found this great for working on laptops; I even have a version I can run from a pen-drive so if I need to do some dev work wherever I am, I have the files and tools to hand. I’m still a fan of Dreamweaver for all it’s bloat.  I’ve used it since version 4 and haven’t felt the need to move away from that yet although I do sometimes use NotePad++ for a bit of hand coding, FileZilla for FTP and PuTTy for SSH.  I used Fireworks most of the time for simple graphics tasks and Photoshop when I need some more fancy graphics.

So what about you?

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Technorati

2 Comments so far...

Phil Thompson Says:

29 August 2008 at 4:22 pm.

Apple fanboy coming through:

I use MAMP Pro, which allows for easy switching to PHP 4 (if required) then I’m coding in Dreamweaver - although I’m trying to use Coda more (it’s cheaper) but Dreamwevar Find/Replace is just too awesome. I just can’t get into Notepad++ or any of those other editors that the Windows (DW hating) crowd use.

FTP - Transmit or Coda/DreamWeaver’s built in efforts. Although DreamWeaver’s does suck at times. I used to use WS_FTP when I was Windows-based.

SSH - Coda again

SVN - Versions (versionsapp.com) although Coda’s latest update has this built in so I may not be bothering with Versions in the future.

Wonder Wyant Says:

28 October 2008 at 9:10 pm.

I’m getting strange symbols on your blog (Ã? Ã?Â) over and over in your post which make it really hard to read.

Any idea why?

I really need to “get” this.

Leave a Reply

    @hereinthehive on Twitter

    Search

    Categories

    Archives

    Tags

    Links

    Meta

    Other services I use

    View Dan Donald's profile on LinkedIn
    www.flickr.com
    Here in the Hive's items Go to Here in the Hive's photostream