I wonder if singleton pattern is the best for organizing the graphical part of an application.
For instance: a text editor has a menu bar, a few menu items, some buttons, and a editing area (no tabs). For any objects that require communication (say cut/copy/paste buttons with the editing area), we can create a mediator that ONLY mediates the communication among those objects. On top of small mediators, we can apply a singleton "master mediator" that facilitates the interaction among those small mediators.
I wonder if this is a good design pattern for a simple text editor. What other options can I have?
Aucun commentaire:
Enregistrer un commentaire