Document-Based or Library-Style App?
History
For quite awhile ( assuming you weren't building a utility app or game ) you've had the choice both on macOS and iOS/iPadOS of either building a document-based app or a library-style app.
- Document-based: Working with a custom or standard file type as a document bundle, accessed from Finder or Files.
- Library-style: Exposed custom objects stored in a database or hidden files available from some custom user interface.
Today
Support for document-based apps continues to get better and better, even from the latest Apple frameworks such as SwiftUI and SwiftData.
But when I see an app like Apple's Freeform ( which I've been enjoying working with ) choose to go the "library-style" route, it makes me wonder what the decision criteria is for choosing one over the other.
Guidance
The Human Interface Guidelines have this to say:
Depending on the platform, people may also expect to browse files without first opening an app. On a Mac, people use the Finder to access the macOS file system; on iPhone and iPad, people use the Files app to manage the documents and files on their device.
and further:
People are familiar with the system apps and interfaces for browsing and opening files, so it can work well to leverage these experiences in your app.
On the side of the "library-style" choice, a very-dated Apple document has this to say:
iPhoto hides its files from regular manipulation in the Finder by placing them within a single package. In addition, the app saves the user’s editing changes to disk at appropriate times. So, users are relieved of the need to manually save, open, or close documents. This simplicity for users is one of the key advantages of the library-style app design.
And of course Photos.app continues today in this same style.
The same document mentions this in support of document-based:
if your app works extensively with complex documents, the multiwindow style may be preferable because it provides more document-related infrastructure to help you implement your app
Distilling
From the dated document linked to above, and from reviewing Apple's apps (with the exception of Freeform!), here is what I distill:
- Document-based: Apps with complex data where users may end up spending considerable time working in fewer objects, and may desire to organize, collaborate, and share using traditional production methods.
- Library-style: Apps with focused or simple data objects that users spend less time working in directly per object, but have expectations on quick access and navigation over a larger number of logical objects.
A good example of two similar apps: Notes ( library-style ) and Pages ( document-based ). Now just to answer that nagging Freeform question: Why is it library-style?