Random thoughts about Web Development across multiple dev machines

I just picked up a refurbished 2012 Macbook Air from the Apple online store to replace a 2007 Macbook Pro. I didn’t use the MBP much because it just couldn’t keep up, but I missed being able to work anywhere, including at home without having to sneak upstairs to the office.

Now that I have the MBA, those limitations are gone, but  working on the same project on different computers can still be a challenge. However, compared to just a few years ago, creating the same web development environment across several computers can be accomplished with just a little effort.

Hello Dropbox

Dropbox is nothing new. I’ve used it to share files for a while, but what has really made it most valuable to me is putting all of the web projects in a Dropbox folder. I started out just making a symbolic link of the Sites folder on one of my workstations to “Sites” in Dropbox, but eventually just put the Sites folder itself in Dropbox.
Now when I create a new site, it automatically propagates to all computers, including any git repositories that are created.
Using MAMP Pro, I create the same .dev sites on all workstations (though I wonder if I could share the Apache conf file to avoid duplicating this effort).

Sublime Text 2

Using the instructions here, I’ve mapped the Sublime Text 2 config files to a Dropbox folder on all computers so that installed packages and preferences are shared. I’m also saving all Sublime Text project files to a Dropbox folder.

Laravel

I’ve been using the Laravel PHP Framework for a couple of months now and one things that has made life easier for me is Migrations using Artisan, along with an easy way to switch database engines. With Laravel, I can set up my dev environment to use sqlite. The sqlite db file is stored within the app, so it is stored in Dropbox, and therefore, shared across all environments.
When it’s time to deploy to a Test or Production environment, I can tell Laravel to use a different database engine, and run my migrations to replicate the same db schema (and possibly some seed data) to the new environment without regard for the database engine I’ve chosen for that environment. If I need to use MySQL in my Dev environment, at least I can use migrations to simply replication across all dev machines.

OS X and iCloud

I’m sure Windows has it’s own cloud solution(s) and I should probably know something about that, but since I’m a hardened Mac user, I don’t really care. But I can say that having iCloud for syncing text files (textedit, IA Writer, etc.), Reminders, Notes, Calendar events, application preferences, etc. is a huge time-saver/productivity booster.