File synchronisation

One of the least exciting but nonetheless necessary tasks involved with writing a content creation app for iOS is implementing a way to get data in and out of the app. While adding iTunes file sharing support is trivially easy, it’s pretty much expected that your app will also support online file storage services like Dropbox and WebDAV, which involves a lot more work. Most productivity apps on the iPad support this, so I had a look at number of them to see how they do it.

I found three main approaches:

  • Store all the documents locally, and provide import and export options for transferring individual documents between the iPad and the server. I don’t like this approach, because it means that if you’re regularly going back and forth between your computer and your iPad, you have to manually do the import/export each time, which is a pain.
  • Use iCloud. This is fine if you only ever want to access documents from the same app you created them in, the app is available for both your iPad/iPhone and your Mac, and the app supports iCloud on both platforms. But there’s no generic way of getting at your files from a PC or Mac, which I think makes it pretty useless. iWork documents are an exception, but even then you can only access them through a web interface, which doesn’t provide automatic synchronisation.
  • Allow access to files directly from the server, downloading them as necessary, and uploading them when they are saved.

I decided to go with this third approach, since it allows you to keep all your documents in one place and access them from anywhere – without the hassle of manually copying them back and forth all the time. But I noticed a couple of problems with the way in which the apps I looked at achieved this:

  • After closing a document, no local copy is kept on the iPad. It has to be re-downloaded each time you open it, even if it hasn’t changed on the server. Worse, you can’t access it offline – if you want to make some edits to your document on the train to work, you’re out of luck.
  • When saving a file, you are forced to wait for the upload to complete before you can carry on with your work.

In UX Write, I’ve implemented a file syncing mechanism similar to that of the PC and Mac Dropbox client. It works as follows:

  • UX Write keeps a local copy of any file you’ve previously opened. At regular intervals, or when you press “refresh”, it checks to see if these files have changed on the server and downloads any updated versions – in the background. You can also tell it to maintain a complete local copy of specific folders from your account.
  • If you try to open a file and there’s already a local copy of the latest version, it will open immediately.
  • When you save a file, it is written to local storage immediately, and uploaded in the background, while you continue with your work. If you’re not connected to the Internet at the time, it will upload the file later on, as soon as it gets a chance.
  • If the file has been modified independently on both the server and your iPad, you’ll be notified and given a chance to save your copy under a different name so you can later reconcile the differences.

The screenshot above shows what the file management interface looks like. Files that have a copy stored locally are shown in black, and files that exist on the server but not on the iPad are shown in grey. The icon to the right of each file shows its synchronisation status; the green ‘+’ over the iPad in some of these icons indicates that the file has been modified locally and is scheduled to be uploaded as soon as any other transfers have completed.

I’ve implemented these features in a generic manner which is not specific to any particular storage service, so it’s fairly easy for me to add support for new services. The first release of UX Write will support Dropbox and WebDAV, with other services being included in the future.

Announcing UX Write

So I’ve decided to start writing publicly about the project I’ve been working on for the past few months: a brand new word processor for the iPad. At first glance this may seem a bit redundant — there are already many of these in existence, so why does the world need another? Well, UX Write differs from other tablet word processors in some fundamental and important ways. In particular, it is designed specifically for professional writers who work with structured documents, in which content and presentation are separate concerns.

What this means for you as an author is that while writing your document, you can focus solely on what your writing says, while later on, either you or someone else decides what it looks like. During the writing process, you enter text, organize it into sections, add figures and tables, and label any paragraphs that have special meaning, such as “Exercise” or “Example”. Separately, you choose an existing template or define your own styles which specify formatting attributes such as fonts, colours, paragraph alignment, margins, indentation, and line spacing. You can thus achieve consistent formatting throughout your whole document without having to manually format paragraphs on a case-by-case basis.

Of course, desktop word processors such as Microsoft Word and OpenOffice have worked like this for many years, but for some reason, developers of similar apps for tablets have chosen to omit these features. I looked at all of the word processors available for both iOS and Android tablets and couldn’t find a single one which works as I’ve described above. As an academic, I was looking for something I could use for writing things like research papers, lecture notes, and books. Ideally, I wanted something like LyX (a graphical frontend to LaTeX), which I’ve used for many years, including for writing my entire PhD thesis.

I love the tablet form factor, and think that hardware-wise, they are excellent tools for getting work done on the go. But the software is currently lacking — we need more professional-quality content creation tools that provide the same level of functionality as their desktop counterparts. One particularly good example is the iPad version of OmniGraffle — which, as far as I can tell, includes every single feature that is present in the desktop version.

UX Write is designed to meet the needs of professional writers such as academics, graduate students, technical writers, any anyone else writing large documents such as manuals and reports. The app is not yet complete, and I’ve just recently got the first version out to a small number of beta testers. But I need more — if you write in a professional capacity, and want to be a part of bringing structured authoring tools to the iPad, I’d love to have you try out the program and give me your feedback!

Drop me a line at peter@uxproductivity.com.