Developer's Diary
Software development, with Terry Ebdon
01-Jun-2020 Weekly page classes

Table of Contents

Class collaboration

Combining yesterday's sequence diagram with Saturday's class diagram, and adding some detail, gives the following class collaboration. New classes are highlighted.

This still needs some work. Ideally createPage() would only exist in JournalProject, or possibly Project,and not in the derived classes. The sub-classes should just override some lower level methods. i.e. WebDoxy would instantiate the appropriate sub-class of Project, via an object factory, then always call the same sequence of methods. The object factory would implement factory methods.

Note
Factory methods are covered in the Gang of Four's classic Design Patterns book. There's a great discussion of object factories in Modern C++ Design, by Andrei Alexandrescu

31-MAY-2020 👈 Top of page 👉 02-JUN-2020

© 2020 Terry Ebdon.

Find me coding on GitHub, networking on LinkedIn, answering questions on Stack Exchange and hanging out on twitter.