Location Independent Drupal Web Development with iPad

Drupal Development while Traveling with an iPad on iOS

Like many Drupal developers out there, I spend a lot of time traveling. It's one of the benefits of doing knowledge work: you can make your location independent from your work. Handling your email and most communication with a mobile device is straightforward and well supported. It's still rare for developers to do technical work while on the road with anything other than a traditional laptop. The reason is simple: it's hard to run a web server stack and write code without a full blown operating system.

Toting a modern lightweight laptop around the world is doable, but it's not easy. They're somewhat fragile, have a large power brick, and limited battery life. A travel laptop is yet-another-device to maintain to go along with your home workstation, tablet, and smartphone. They're also rather expensive.

What if it was possible to do your standard Drupal development work from the tablet you already own? I wanted to see if this was possible with the current scheme of apps and services available. I ran across a story by Mark O'Connor, a programmer, who had the same thought. He worked out a solution that would offload the heavy lifting to a remote server and had success with it. I wonder: Why can't we do this with Drupal, too? So, I decided to skip the laptop on my next trip and cut down on my baggage.

Despite only having a 28 liter Deuter backpack, I brought along an entire development workstation with me on a recent three weeks in Europe. Mind you, that small backpack also contained the rest of my clothes and needs for the trip. "How?" you might ask.

Tools and Tricks for Drupal Web Development from Anywhere

1) Apple iPad

iPad for mobile Drupal development traveling

Before the Android and Windows folks string me up by my toes, I'm sure this is all possible with other platforms. That said, I had a Retina iPad handy and I appreciate a challenge. With that in mind, a lot of the details in this post will revolve around iOS. I'm sure you'll manage to apply the key concepts and solutions to your own platform solution. I haven't attempted any of this on other platforms, so I can't compare or speak to them.

The primary advantage I see in the iPad is the variety of accessories, and application choice. You may do fine with a generic Bluetooth keyboard that's compatible with any tablet, but having a Smart Cover style keyboard can really help with ease of use while traveling. Similarly, you're going to be chasing down edge case uses of the platform which means having a huge library of Apps to leverage is beneficial. Still, it's worth looking at other tablet options that may suit your specific needs better. A mixed tablet/desktop device like Surface can have access to the entire Windows x86 application library, though those generally aren't mobile optimized.

For me, reliability was also a key need. Apple's walled garden can be an advantage if you have a supported use case and are doing real work. You want your system to reliably function and the last issue you want to deal with is a finicky OS, update, or application. Following this train of thought, I wanted hardware that was easy to simply replace. I don't mean working on the internals. I mean throwing the whole tablet away and starting fresh. Apple's cloud backup and app data storage systems mean that the underlying hardware becomes irrelevant. If the iPad should be stolen, lost, or broken, I could simply walk into the ubiquitous Apple stores or resellers and replace it with a clone. From there, it's just a matter of restoring a cloud backup and a bit of time. This removes the concern of lost luggage, thieves, or a horrendous downpour eliminating my ability to work for the remainder of the trip.

The platform itself also has a bright future with the iPad Pro expected to debut this November. The larger screen and more powerful multi-tasking system is specifically targeted at creative professionals. Putting aside the unknown that is an unreleased device, it's good to see that Apple has plans and a future for the iPad line as a professional's work device.

2) Logitech Ultrathin Keyboard Cover

Traveling Mobile Web Development Keyboard for iPad

For any web developer trying to make due on a tablet, the first accessory they should purchase is a compatible physical keyboard. Onscreen touch keyboards are quite usable for short stints, but try typing out a few thousand words or hundreds of lines of code on one. You'll add a solid 12 ounces (~350g) to your pack, but it's worth the weight.

I had three requirements for a physical keyboard alongside the iPad:

  1. Use the iPad's magnet attachment as a cover
  2. Support iPad specific shortcuts
  3. Double as a stand for the iPad

The Logitech Ultrathin Keyboard Cover meets these three key requirements. It connects wirelessly via Bluetooth which means you could also connect it to a smartphone if needed. It charges via micro-USB with a built-in battery. I purchased a used one off Amazon in near new condition for under $20. It was cheap enough that if it didn't work out, I wasn't losing much.

I've been using this slim keyboard now for months and can say that I type nearly as quickly as I can on my favorite full size keyboard. I can't do so for as long of periods, but my speed isn't handicapped. While it's quite a bit smaller, the key travel and placement is thoughtful. The keyboard's support for iOS shortcuts really helps boost productivity: a double-press of the dedicated home button brings up the app switcher, cut/copy/paste shortcuts work, there's a dedicated function key for Spotlight search, etc.

3) Smartphone with tethering capability

Have an iPad with cellular built-in? Skip this section.

You're going to need to connect to the Internet in order to do any development work. For now, there's no way I know of that'll let you run a local development environment on a tablet (perhaps a rooted Android device or a jailbroken iPad?). You'll need Internet access to utilize a remote environment. You can subsist on WiFi if you're confident you'll always have access.

You can also leverage the cellular in your smartphone. To do this, you'll need to connect your iPad to your smartphone by way of tethering. Your carrier and device will dictate how you can do this, but most carriers and smartphones offer a built-in way of doing so. If not, it's possible to do so with a jailbroken iPhone and a dedicated tethering app on the Cydia store. If you want to avoid jailbreaking, you might have luck with one of those apps with a hidden tethering capability that sneak onto the App Store once in a while.

If you're jailbreaking or otherwise bypassing your carrier's separate tethering plan, be wary: users have been caught and back-billed for a tethering plan.

One way or another, your iPad is going to need a connection to the Internet.

4) Mobile-friendly Drupal Administration

Some of your routine Drupal work will still be within the actual Drupal admin. You'll still be creating Views, editing Content Types, and exporting your changes to Features. It's important that the administration theme is compatible with your iPad's screen size. You'll also want to consider how using your finger rather than a mouse pointer will change the interaction with the administration elements.

We wrote up a dedicated post to creating a mobile-friendly Drupal administration environment, recently. That tutorial applies perfectly here. Drupal's mobile-friendly admin themes still have room to improve, but following our tutorial will put your Drupal administration into a state that will work well with an iPad.

5) Development Web Server Environment

Without the ability to natively run a Drupal development environment (web server and database), we need a remote one. The idea being, we can remotely run a development Drupal environment and feed our changes to it. You can do this by running an environment on your desktop workstation that you setup to connect remotely to, or you can create one in the "cloud" as I do.

I mentioned in the web services recommendations post that I generally prefer AWS for on-demand servers. Setup an instance that'll support a Drupal install. Configure the instance to have access to your Git version control system. Now it's a simple matter of accessing this remote development environment from your iPad, making your changes in-place, then following your normal commit and deployment process to your dev/stage/production environments for your project.

The development instance can also act as an application provider for your mobile device. You'll be able to access all the command line utilities through your mobile deice that are on your development server. You can perform basic text editing with Vim, commit code with Git, and fire off Drupal commands with Drush.

One of the great parts about having this instance always on and independent from the device you're accessing it from is that it'll always be in the same state as where you left off. Even if your iPad is destroyed in your travels, you can replace it, restore your device, and pickup your development work right where you left off. This also means it's possible, though difficult, to get some work done via a smartphone in a pinch as all you'll need is a shell connection to your development environment.

6) iOS Web Development and Project Apps

Of course, you're going to need lots of apps to handle various tasks. These app suggestions bring together earlier parts of this series on web services and desktop applications, as they're intended to all work together. Your mobile workstation becomes similar and synced with your desktop workstation.

Drupal Development Apps for iPad and iOS

Image Editing: Pixelmator

​If you need to do a bit of design work here or there, Pixelmator is an inexpensive, PSD compatible iOS app. The key here is Photoshop compatibility with a simple interface and a solid track record of updates. You want an app that'll keep pace with changes to the primary file format design work is saved to. Photoshop is the standard and Pixelmator offers a similar experience along with compatibility. 

SSH: Serverauditor

​Serverauditor is an SSH app for mobile devices. The app offers one key feature over similar apps: it'll maintain a background connection to a server. If you app switch to Mail to review change requests, Serverauditor will maintain its server connection in the background. A lot of the other SSH options do not do this. Serverauditor is also free. Panic makes a very well reviewed SSH app, Prompt, but I've not jumped on the bandwagon just yet since Serverauditor fulfills my needs while Prompt is fairly expensive.

Whatever your SSH app choice, it'll likely be the most important app choice you make for your mobile workstation. Much of your work will be within the shell on your remote development server: making quick text changes with Vim, committing changes with Git, executing deployment scripts, etc.

Code Editor: Coda for iOS

Again, this choice works with my recommended desktop code editor. If you need to write some serious code, Vim may not be enough for you. Coda for iOS is a full-featured code editor: syntax highlighting, local/remote file management, previewing and of course much more. It also provides an integrated terminal for SSH. If you're comfortable with Vim, you may be able to get away with ignoring a local code editor altogether.

Communications, Project Management, Billing

Keeping pace with the web services I recommended previously, mobile apps are available to support your billing, PM, and communication needs. Slack has a solid team chat app. Skype offers a mobile app with full video and audio calling as well as instant messaging. Basecamp's iPad offering cuts down on the noise so much it's almost a better solution than the desktop web app. Freshbooks' iPad app enables mobile time tracking and invoicing. These apps themselves are all free.

The idea here is that your "normal" workflow can be followed while you're traveling. Keeping consistent services and apps means that the jump between your home workstation and your tablet will be less jarring and generally in sync.

Miscellaneous

​I mentioned Evernote and Things as recommended applications for your desktop. Those work here, too. That'll help you keep your notes and task lists in sync across devices. If you're going to be doing some word processing, Pages, which is now free with iOS devices, is a fine solution. Your general productivity apps are covered between Microsoft, Google, and Apple's offerings.

I should also mention that you may want to consider tunneling your traffic over a VPN while you're traveling. Depending on the sensitivity of your development work and the security of the connections you use while you're away from home, securing your connection with a known VPN provider can help keep prying eyes away from your packets.

Lastly, you'll want something that'll keep your mobile workstation reasonably safe without adding too much heft to your baggage. There's loads of iPad cases, sleeves, and battery extending enclosures available. I opted for a more DIY approach. My iPad and keyboard fit together in a very snazzy recycled blue jean iPad sleeve that my more creative half made.

DIY iPad Sleeve with Recycled Blue Jeans

The Pro's and Con's of Working from an iPad

At the end of the day, while it's possible to do most of a typical Drupal developer's work from an iPad, it's not as efficient as on a desktop workstation or powerful laptop. If you do a lot of frontend development, we're still a long ways off of having a competent DOM inspector and effective process to produce graphical elements from images on an iPad. However, there's nothing stopping you here from writing CSS and JS. The trouble is in the details: debugging and inspecting. The same generally applies to the PHP side of things. You won't have much trouble making edits to theme files, writing simple scripts and hooks, or installing modules thanks to Drush. What you will have trouble with is debugging and other more complex tasks. You'll be able to handle the MySQL side of things with some combination of the MySQL command line and phpMyAdmin. The iPad workflow will also be dependent on the quality of your Internet connection. A slow or inconsistent connection means your work is going to be frustrating when you're trying to tackle things through a remote server.

On the positive side, and what I found to be most important is: I can do almost all my routine work from an iPad. What this means is that I can rely on an iPad to do most of my work from anywhere in the world. It doesn't have to be a grand tour of Europe, either. It can be as simple as deciding to take an extended lunch break at a park and finishing up a View change under leafy shade away from the stale feel of an office. An iPad is much easier to just grab and go with compared to a laptop. That's the biggest benefit: I can take my work with me, at any time, on a whim. The iPad extends my "office" to all the parks and coffee shops within a short walk around my office. That makes for a lovely change of scenery and a happier life.


Looking for more in our series on building a web developer toolkit, perfect for freelance Drupal developers, consultants, and agencies?


Did you like this post and want to see more on building your toolkit? Share it!

Chris's picture