Document-based applications



As I mentioned at GUADEC, I have a C++ library (Bakery) that attempts to
provide default behaviour for document-based apps. In the process of writing
it, I discovered a few simple bits of behaviour that all document-based apps
(e.g. gnumeric, rather than an MP3 player) should implement.

Here's a list. It seems quite obvious, but at present there is not consistency
between gnome applications. And because users *expect* consistency, they don't
read dialogs, or think much about what's happening. So if an application
behaves unusally (though not necessarly illogically) they can end up losing
their data without ever knowing why.

This also includes candiates for reusable dialogs, containing just icons,
text, and buttons. Many apps will need to show such dialogs, so we might as
well provide a consistent set to use.


**** Behaviour of document-based applications:

This assumes that there is a Single Document Interface rather than MDI.

* Default document:
  When an instance of the application is started, it should show a default
untitled document. e.g an empty spreadsheet.
  Default untitled documents start as 'not modified'.

* File|Open:

  * Already open:
  Check whether the document is already open in this or another instance. Tell
the user and bring it to the front if it is already open.
  e.g. 'This document is already open.'

  * New Instance?
  If the current document is just a default empty new document then
    open the document in a new instance if the document is
  else
    replace the current document with the opened docuement.
  
* File | Save
  
  * If the document was saved or opened before:
  Just save it, without asking for a path.

  * file extensions:
  If the document handles one type of document, then it should add the
extension if the user has not already specified it. This may result in e.g.
something.bla.blah, but that's OK.
  If more than one extension is possible, then give the user a choice.
    
  * Overwriting:
  Ask the user to confirm before replacing an existing file.
  e.g. 'Do you want to overwrite the existing file?' [Yes] [No]
  If [No], ask for another filename. Only stop when the user clicks cancel in
the file selection.

  * 'Modified' indicator:
  When the document has unsaved changes, this should be indicated by:
  - Disable File|Save menu item.
  - Disable File|Save toolbar button.
  - Show * after the document name in title bar.

* File | Save As:
  Asks for a new filepath, showing current filepath in FileSelector dialog as
default.

* File|Close
  Ask user whether they want to save changes to modified documents:
  e.g. 'This document has unsaved changes. Would you like to save it?
Document: /home/murrayc/something.blah' [Save] [Discard] [Cancel]

* File|Exit
  Should show the 'File | Close' functionality for each document in turn,
bringing the document's instance to the foreground before doing so.
  There should *not* be a 'Do you really want to close this application?'
dialog.

* File | Open Recent
  The application should keep a list of documents recently opened by the user,
and show the list in this submenu. Many applications put the list directly in
the File menu, presumably because this is what Microsoft Office does. But it
would be clearer to have them in a sub menu.
  Ideally, the number of remmebered applications would be configurable in the
preferences. Ideally that would be a system-wide preference.

Session Management:
  If the user logs off while an application is open, it should:
  - Warn the user about unsaved changes, like File | Exit.
  - Restart when the user logs back on.
  - Reopen the same documents when the user logs back on.

* Misc:
  The document's filename (not the whole path) should be shown in the
application's title bar. See also * 'Modified' indicator.
  If it has never been saved, then the title bar should show 'Untitled'.
  Maybe the untitled documents should be numbered.
  'Read-only' status should be indicated somehow as well.

* Other possible re-usable dialogs:
  - 'This document can not be opened, because it was saved by a later version
of the application.'
  - 'This document could not be opened'
  

Murray Cumming
murrayc usa net
www.murrayc.com

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]