For years (as long as I've been a web developer) I've always had hobby sites I maintain, separate to what I do as a day job. Mostly they are built on the LAMP stack. Developing for LAMP has always been something of a geeky pastime for mine. All that SSH, FTP, Vi etc makes me feel like I've still "got it" and I enjoy the geek aspect of it.
Despite enjoying this geekery I often find PHP quite tiresome and frustrating.
First there's the development aspect. Developing with PHP and MySQL has always been a faff, whereby the process is: hand code the PHP/HTML in a text editor, FTP to a test server, take a look in browser. Repeat. FTP to live server when happy.
Then there's the maintenance side of things, which normally runs like this: get a request from a "customer" to update their site, wonder where the most up-to-date version of the site's file are (somewhere locally, test server or live server?), opt to just edit the file directly on the live server. Not good.
I've tried using Zend Studio in the past but not got on with it and I've always struggled on with my text editor and FTP client (FileZilla).
Struggle no more though. In steps Coda 2. Coda is brilliant! Web development as it should be - it seamlessly integrates the editing, previewing and uploading of website files. Watch the "coda tour" video on the website to see it in action.
Here's a plain HTML file being edited in Coda:
You can preview the same HTML from inside the app, like so:
Notice how it's using Chrome and I can therefore use the Chrome Inspector tools, all without ever leaving the Coda app.
Here it is coding a PHP file with a live-updating split-screen preview below. The site is database-backed and running locally on the Mac.
As I'm not a full-time PHP or MySQL developer I almost always forget all the functions and how to use them. In steps Coda's "Book" feature. You can pin searchable reference manuals to the top bar, like so:
I can now find out what the syntax is for functions like date() without having to Google it. Brilliant.
I love how the Files section maintains a list of modified files that need publishing, which I can do as and when I'm ready to.
Now, whenever I get asked to make a quick mod to a site I can turn to the Mac, launch Coda and have it done in a matter of seconds.
I doubt I've done Coda justice above. There's more to it than what I've covered (it has MySQL and Shell tools built-in too). There's also more to my new setup than just a copy of Coda. To make it a truly great dev experience you'll need the following:
We all know what LAMP stands for? Well, MAMP is Mac, Apache, MySQL and PHP. By installing MAMP on your Mac you can have a fully-functioning web server running locally. You can then point your Coda sites to the local VirtualHost you setup, as below:
You might think installing MAMP would be a veritable nightmare of a Terminal job. It ain't. It couldn't be any easier if it tried. It downloads and installs like any other Mac app - just drag to the Applications folder.
For the last six years I've had a dedicated LAMP server with Fasthosts.co.uk. For the last five years I've had "Leave Fasthosts" on my to-do list. This last week I'm glad to say I have. I now have a Linode VPS. Linode is no nonsense hosting. You get a bare-bones Linux box with root access to the shell, through which it's down to you to add the A, M and P of LAMP. It's all very easily done and you end up with a blazingly fast web server.
I love this new setup. It's given me a renewed sense of excitement about what's possible and a will to learn some new stuff. I've not felt like that for a while. I just wish it were all available in such a nice package on Windows.
While I wouldn't want to use Coda full time, it is way, way better than using a plain text editor and there's no looking back for me. Buying Coda 2 and MAMP Pro is going to set you back about 100 GBP but it's well worth it IMO.