A minor disclaimer, this is meant for other designers; while anyone is welcome to read it, it will likely bore you to tears if you’re not designing for a living. If anyone notices something poorly written or just wrong, please let me know. Hopefully it helps someone or gives someone new ideas.
When I work on a new or existing web project, my most common setup is to have a local version; a development server (usually a subdomain on the same server as the hosted site, such as dev.whateversite.com); and then the live site. There are a few things I do that make life a lot easier, thought I’d share it in case someone might be helped by it.
Some notes on software: I feel Textmate is essential. Coda is nice too, but Textmate is really such a powerful, simple, and stable program, I couldn’t imagine using anything else. Out of a fresh install it’s pretty good, but I change my ‘theme’ to Twilight and sub out my font with Inconsolata, which I feel is one of the better monotype fonts. I also have a custom bundle that I use which enables me to wrap a block of copy in whatever tag, I have p, li, h1, h2, etc. all mapped to f keys. This is huge timesaver.
I start on a localhost and create a new virtual host. Pulling up terminal I type: cd /etc/apache2/extra, then I type mate httpd-vhosts.conf (you’ll need Textmate for that second command).
Start a new virtual host if this is a new project:
cd /etc/apache2/extra
mate httpd-vhosts.conf
Add a new virtual host (same as your other one, just change the number by one digit). Then you’ll want to restart apache.
sudo apachectl restart
Next, I create a new git repository. If you’re working with others, this is vital, but even if you’re working alone, it’s nice to have an infinite backup of every change you’ve made. I use git as my repo because it’s a lot faster than SVN, branching makes more sense to me on git, and it’s a distributed repository. To get a better idea of the pros and cons of distributed repository versus central repository (SVN) I’d search for other pages on this. For me, I just like the tidiness of git; it’s quick, clean, there aren’t .svn files littering all my files, and I’ve never had any huge issues. There aren’t any decent GUIs for git, but that doesn’t really bother me. If Versions ever develops a tool for git, I’m sure it would do well, but for me, I just use the Textmate bundle.
I use InDesign to design my comps. I’m not sure why Photoshop became the industry standard for this. It makes zero sense to me (and it’s incredibly inefficient). Photoshop is good for raster (photos mainly), Illustrator for vector (logos, drawings, etc.), and InDesign is good for both. If all your graphics are placed images, there is no slicing needed. This could be a post all on its own, but I’ve used Photoshop when working for other agencies (believe it or not, there are designers that can’t use InDesign), and it takes exponentially longer — especially if you decide to be more organized than having 500 layers named Layer 123 (or whatever).
When the comps are approved, I take it apart and put it into HTML then get to play in Textmate for the rest of the time. I use Textmate Projects for all the sites I’m building or maintaining and keep these in a folder on my dock. To test locally in IE, I use Parallels. I’ve used both VMWare and Parallels and it’s really choosing the lesser of two evils. But for my setup anyway, to view a localhost on Parallels, I use http://pk.local:8080 (you’ll need to change that to whatever your username and port are of course).
When it’s all shiny on my localhost, I’m ready to push to the dev site. As an aside: my developer is a genius, probably the smartest person I know (maybe tied with my brother). He does all these really cool little things for me which for him are relatively simple, but save me hours of work. So, thanks to him and this little Ruby Gem he wrote, I just commit and push my changes in git (using the Textmate bundle, this takes all of 10 seconds). Then I type production-sync devsite into Terminal. “Devsite” is whatever the development server nickname I’ve defined. This syncs everything outside of the files defined in my .gitignore file. This little action is brilliant, it’s saved me so much time. It’s not the first time I’ve seen a way to sync, but it’s the first one I can use without stressing about the results. Because it’s SSH and git, this entire process is incredibly quick. If you’re used to FTP, you’ll think you’ve done something wrong — it’s that quick. After the client approves, then I use the same command (instead of devsite it’s livesite, or whatever) to push to the live site. And that’s it.
This is something you’ll only have to do once until you get a new computer. For that reason I’m not 100% on all these steps, but it’ll get you started. It’s geared toward 10.6; if memory serves, 10.5 is different. Your Mac already has php, apache, and rails installed. Setting up a local server isn’t too bad. For this to work the same way for you, you’ll need Textmate installed. In addition to that, when you install Textmate, it will ask you if you want an alias installed. I’m not sure of the exact dialog box, but it’s the only alert box besides registration. You want to install this; essentially, this allows Terminal to speak to Textmate.
mate /private/etc/apache2/httpd.confcd /etc/apache2/extramate httpd-vhosts.confListen 8080NameVirtualHost *:8080<VirtualHost *:8080>ServerAdmin youremail@whateversite.comDocumentRoot "/Users/yourusername/Sites/whateversite"ServerName localhost:8080ErrorLog "/private/var/log/apache2/whateversite-error_log"CustomLog "/private/var/log/apache2/whateversite-access_log" common</VirtualHost>sudo apachectl restart<?php phpinfo(); ?>, you’ll see a php info page when you go to . That means you did everything right so far.This is the setup for your php and virtual hosting. You’re also going to want MySQL most likely.