[uml] Common

REFACTOR: this software engineering content is flagged as under consideration for refactoring.

Webel module:


UML element type:

OOE stereotypes:

UML Diagram
Click on the UML diagram to view it in a lightbox image viewer. You may then zoom in (or just open the image in a new web browser tab using the Download Original link to view large diagrams).

UML modelling domain:


The STEM_DEMO_.. consts might be better placed elsewhere. They were originally here (at the top level) because they were referenced in the ooe.module, but since the use of OoeBridge (extends AbstractModuleMap ["bridge"], which implements IModuleMap ["bridge"]) they could perhaps be moved into demo classes.

These Common consts are currently used (imported by) too many classes. For example, currently the MODULE identifier string 'ooe' is passed to constructors of many classes; if an IModule is used instead of a string there might be less need to import Common.

This isolates some crucial repeated text elements so that they can be propagated throughout the system.

There is much (and sometimes heated) debate about whether one should use constants in Interfaces or in AbstractClasses, but the main thing is to encapsulate repeated strings to promote Don't Repeat Yourself (DRY Principle) coding.

If you use PHP 'const' within a Class or Interface (rather than 'define') keep in mind that you can't perform any computations to derive the const value (not even string concatenation or string operations) and you can't use arrays !
Visit also