Should I use document or non-document based application

Discussion in 'Mac Programming' started by BadWolf13, Jun 26, 2010.

  1. BadWolf13 macrumors 6502

    Dec 17, 2009
    Ok, I know this is more of an opinion based question, which I usually don't bother people with, but I want to see what the more experienced programmers think of the options here. So if you will, please indulge me.

    I've got this application I'm working on, at the core, it's basically a database within an NSMutableArray. The main window shows the database as a list in a tableview. Now, when someone double-clicks any item in the list, that item opens up in a new "detail" window showing more information about that object. The way I see it, I could make it a document based application, where the items in the database are all opened, closed and saved as documents, and I overwrite the loading and saving methods to load and save to the NSMutableArray instead of to separate files. The other way is to simply use a windowController to tie the "detail" windows to the item in the array that the user has clicked.

    My first thinking is that the document-based application idea will have a lot of methods that I don't need, so just creating my own object and windowController subclasses would be simpler, but I'm curious to know what the experienced programmers think.
  2. kainjow Moderator emeritus


    Jun 15, 2000
    I don't think document-based would be good, you'd probably end up overriding a lot of built-in behavior. That type of format is setup for when each document is represented as a separate file.

Share This Page