After several articles examining individual pieces of my C++ event-planning model, it is time to move to the object that brings almost everything together: the Document . This is one of the most important architectural ideas in the application, and it is also one that has been in the back of my mind for many years. I remember the way older Apple productivity software treated a document as more than a stream of text. You could work inside one document and place different kinds of content into it: text, tables, calculations, graphics, images and other elements. The document was the thing the user understood. The technical implementation of the individual elements was secondary. Before writing this article I went back and researched that memory, and it turns out that I was remembering several related Apple ideas. AppleWorks was probably the clearest historical example. It brought word processing, spreadsheets, databases, drawing, painting and presentations into one int...