Sunlit sync and publishing

It was Macworld Expo in 1997, and Steve Jobs had just come back to Apple. Somehow I was lucky enough to get a seat in the keynote, and I sat there with a big grin on my face as Steve came out to talk about NeXTSTEP, which would eventually become the foundation for Mac OS X. He likened developing an app to constructing a building, one level at a time. A good OS allowed you to build higher.

Microsoft’s DOS gave you very little, so you had to start at the ground floor. Developing for the Mac and Windows was like starting out on a 5-story building. But the developer tools from NeXT were like starting out on the 20th floor, because they were so advanced, because they “lifted the developer up” and let apps be developed more quickly than if you had to deal with all the basic foundational stuff every app needs.

I think the App.net API is that same kind of advancement for apps compared to most other web APIs. It is significantly more consistent and full-featured than anything else out there.

Sunlit syncs stories and photos with App.net, using your App.net private file storage (for storing photo data) as well as private channels and messages (for syncing story titles, permissions, and other metadata). We like this solution because everyone who signs in to the app with their App.net credentials gets sync automatically. It also means that if you authorize other apps to see your App.net files, you can manage the data Sunlit syncs there, or get it out again without us having to directly build an export feature.

(Although we do offer a number of export choices in Sunlit, such as saving photos to your camera roll, sharing them on social networks, or sending them to any app that supports “Open In”. We do this with OvershareKit.)

Publishing in Sunlit is another feature that utilizes App.net file storage. It allows you to take a story — photos and text — and publish it to a URL. The URL is public, but it’s not linked from anywhere unless you directly share the URL with someone. This makes it convenient for quickly publishing a set of photos and sending the link to family, for example.

Here’s what the published stories currently look like: http://sunlit.io/manton/nationalparks

On the surface this may look like Sunlit is uploading photos and other data to sunlit.io, where it’s probably stored in a relational database or on the server filesystem somewhere. But that’s not how it works at all.

The iPhone app actually uploads all photos to App.net file storage, marks the new files public, then generates a static HTML page and also uploads that to App.net. It then registers the story with sunlit.io, which caches the HTML just to make things a little faster. We never store any photos on sunlit.io itself, instead merely referencing their public URLs on App.net. (View source on the page to see the proof.)

This difference means you can move the site anywhere just by copying files from App.net, with any number of available file management tools. Or just copy the HTML file to your own server to serve the page from your own domain. The CSS and JavaScript is all bundled inline in the HTML, except jQuery, which loads from a URL.

We think this approach makes the whole system a lot more flexible and open. Your data is never hidden inside the app and your published pages are never locked behind a server.

Several months ago I wrote this about App.net:

“The promise of App.net is bigger than one type of app. App.net isn’t just a blank slate; it’s an amplifier. It’s waiting to power the next new idea and help it grow into something big.”

I still believe that. It’s making apps easier to build and more powerful, just like NeXTSTEP was. There’s really no other web platform like it. That’s why we picked it for Sunlit.