Documented application or not?

I am writing a desktop application that can be used to manage a dance academy. My master data model contains objects such as Student, Teacher, Class, Invoice, etc., as well as various relationships between them.

My planned user interface consists of a vertical split view with an iTunes-like OutlineView on the left. When you click on the Students element in this outline view, the contents of the right pane are swapped from the NIB ManageStudents. Similarly, if you click on the “Invoice” item in the form of a diagram, the current view will be replaced by the ViewInvoices view. Pretty simple, huh?

My big dilemma is whether to go based on documents or not? All my reading suggests that this would be a good choice if the user had multiple instances of objects open at the same time. Not so here - there will always be only one instance of the main window open at any given time.

On the other hand, I can see so many benefits from the NSDocument-based examples that I see (and, frankly, most of the examples that I see on the Internet seem to be document-based). If I took this path, I would be interested to know if I will determine the type of document for each of my main objects or only one control document.

Any instructions would be greatly appreciated. Alternatively, pointers to where specific advice gives when NSDocument is / does not fit (Apple's “Document-Based Application Overview” helps “Word processors and spreadsheet applications are two example document-based applications” - I was hoping for something more understandable and relevant for other real-world applications)

+4
source share
2 answers

Think about your problem area. What is a document? Dance academy? If so, and you think that your users will manage only one academy, then a document-based model is not needed. On the other hand, if you think that the document is a teacher, then most likely one Academy manager will want to deal with several teachers, so the model of the document seems appropriate.

The key issue is the issue of independence. If all the objects in your application model are connected, then there is no need to manage independent documents. If, on the other hand, there is a free collection of objects, each of which has its own set of related “children,” then this looks like a collection of documents. That's why a word processor is based on a document: text, attributes and images in one file are not related to data in another file, so it makes sense to consider them as independent documents.

+2
source

If you see the advantage of switching to NSDocument-based, go for it. The reason I say this is because if there is a lot of text input / reading, then it should be a good choice.

0
source

All Articles