I am building a beer recipe application in Cocoa. It's has one main window, with a couple of textfields, tableviews etc. I want to be able to Open and Save recipes in XML format. I found some examples of reading/writing XML. Should my application be a document-based application? What are the benefits? All examples I find of document-based applications are using RTF files or binary (drawings) files, never XML.
The file format used with document based applications doesn't matter at all. You can read and write XML if you like.
The advantages of NSDocument
are that open, save, save as and the close button are handled for you, as well as a "Save before quit"-message and various other things.
I can think of two solutions for a recipe application:
I think for a beer recipe app, the second solution would give a better user experience because a user is unlikely to edit two recipes at the same time (see YummySoup! for example).
I hope this answers your question. :)