Dropbox vs. iCloud
(This is fairly rambling, but I had to write some of this down. Maybe it will be useful to someone. Maybe not.)
As I have hinted at elsewhere, I am in the midst of programming a version of MultiMarkdown Composer for iOS. A key part of any app that handles text editing on an iOS device is a good method for getting data onto and off of the device. In the case of iOS apps, the two main methods are Dropbox and iCloud.
I have been using Dropbox for quite a while, and as a user I have found it incredibly useful. I use it to keep various files in sync for multiple applications on my iPhone and iPad. When I am using multiple computers, it keeps folders in sync between computers. Using the Dropbox app on my iPhone, I can easily access most of my documents from anywhere in the world.
iCloud hasn’t been around as long, and is not integrated into as many applications yet. On the Mac side, the file folders are hidden inside the Library directory — the goal seems to be to keep the files in various “silos” organized by application. Dropbox, on the other hand, is folder-centric which makes it easy to share data between applications by using a common folder.
As a developer, however, I have come to realize how iCloud is years ahead of Dropbox.
The Dropbox app (for Mac, Windows, and Linux) makes sync easy. You really don’t have to think about it once you’ve set it up. Your files just magically appear on all of your computers. The Dropbox SDK, on the other hand, is nothing more than an API to make it possible to upload and download files to the Dropbox server. The complicated part is actually keeping those files in sync, and they kept that part to themselves.
Uploading and downloading files isn’t that complicated. Deciding when to update a particular file on a server, whether two copies of a file are the same or different, which copy to use in the case of a conflict, when to download new data from a server — these decisions are much more complicated.
By leaving the sync algorithm out of the SDK, Dropbox leaves this up to each developer to reinvent. Sync is not an easy problem to “solve.” While the approach Dropbox uses is not perfect, it’s really good — as a user, I have had exceedingly few problems over the years I have been using the service.
As a developer, however, Dropbox has been the bane of my programming existence for the last couple of months.
It probably took me a couple of hours (if not less) to code the sync routines in my app to work with iCloud, once I had the basics of how it worked figured out. I wrote to a file in a specific folder, and the file is magically updated in all other copies of the app. I just watch that folder for changes, and update my local database when necessary. The OS handles all the mechanics of getting the data up to date across devices.
I have spent weeks, on the other hand, trying to get Dropbox working properly with various edge cases. For example, if a user saves a couple of updates to a document in rapid succession, the app might try to upload the second copy before the first copy has completed. This results in a conflict. I have to manually track all download requests and re-request files that fail to download. Otherwise, there’s a conflict. I’ve had to add so many complicated checks and double checks to work around all these problems that the code just keeps getting longer and longer. Which makes it more prone to error, which means it needs more fixing.
For iCloud, however, I write to a folder. I read from that folder. That’s basically it.
I still use Dropbox. I’m glad exists. But I think as more developers begin to understand how easy iCloud is, they’re going to wonder how much time and effort it is worth reinventing the wheel in order to support Dropbox when iCloud support is relatively effortless. If I didn’t think users would cry foul, I would strip out Dropbox support from my app and make it iCloud only (with improved support on the Mac end for the iCloud data).
If Apple ever decides to increase the space available in iCloud, and make it easier to share files between applications and between users, then Dropbox might have to work really hard to keep their completive advantage.
Old Comments
As a user, Dropbox is seamless because it works on every device I use, including occasionally Windows and even Linux, whereas iCloud is Apple-specific. Dropbox also lets me share folders with others with fine levels of granularity, and I have (thanks to referrals) over 16GB of free spaceenough for my entire documents folder.
However, after reading this, I’m not at all happy that Dropbox doesn’t include it’s sync magic in the public api, but now I understand the problems I’ve had (on my wireless network) with changes ‘piling up’ and conflicting (Elements and MarkNote), and why some apps (MarkNote) use a ‘save to Dropbox’ route, so thanks for the elightenment.