[module] OOE = Object Oriented Examples = One Of Each

HOT TIP: this content is flagged as highly recommended !

Compatibility:

0
Project page quote (external)
Depends on modules [Drupal7]

The OOE module is the primary tutorial module for this demo site.

It is (so far) a purely educational tutorial module conceived to demonstrate (progressively) "one of each" of the possible features and capabilities of contributed Drupal7 modules, encapsulated in truly object-oriented form, and with a high level of support for graphical Unified Modeling Language (UML) diagrams of the system. The demos run live on this site. Or you can now experiment with it easily yourself: Download: OOE bundle with adapted Drupal-7.36 and installation instructions.

The acronym and Drupal project name OOE can stand for "One Of Each" or Object Oriented Examples.

The OOE module was intentionally spawned from existing Drupal.org tutorials such as:

Many of the demos in OOE = Object Oriented Examples = One Of Each - such as CurrentPosts - are object-oriented adaptations of such tutorials, and are offered with sincere thanks to the original developers of those Drupal tutorials and examples.

For example, DemoOfForms is adapted from the Drupal7: Example: Form API, but translated into the object-oriented world using a form controller and object-oriented form building components (instead of Drupal form arrays with Drupal "by convention" array keys).


OOE demonstrates a bridge between the Drupal7 core world and truly object-oriented PHP in a graphical UML-friendlier form

This module and this site promote together progress towards true object-orientation in Drupal by demonstrating a bridge system between the non-OO "hook and handler" (and structured arrays) world of Drupal and a completely object-oriented PHP system for interacting with Drupal core that never requires you to remember or type a Drupal structured array key ever again !

All of the demos (such as the minimal Demo project, DemoOfPageArguments , DemoOfForms) are driven by the OoeBridge that "maps" the ooe.module file into a truly, completely, object-oriented space (except for those examples like CurrentPosts deliberately designed here to show you "how not to do it" the old non-OO Drupal hook/handler/array way).

Best of all, the (very strict) Webel coding style of OOE is developed to be "friendly" to reverse-engineering into graphical Unified Modeling Language (UML) diagrams, at least as much as can be achieved with type-hinting and documentation tricks in PHP.

In order to understand the strictly DRY and OOP coding strategies of the OOE module it is essential that you please read all of:

- Don't Repeat Yourself (DRY Principle)

- Write Everything Twice (WET) (because "we enjoy typing")

There are very good reasons why this module is coded as it is, using the Webel recipe for UML-friendlier object-oriented PHP

And in order to understand why this module is coded as it is, you MUST please read (as you go) the cross-linked Notes "applied" to the UML pages (that appear under the UML diagrams in a special collapsible fieldset) because they explain the coding policies and conventions required to admit useful reverse-engineering of PHP to UML, as developed by Dr Darren of Webel IT Australia over many years. These policies are collected under:

- The Webel «!wrapper» @Components and «!analysis» @Interfaces recipe

- OOE: Notes: programming, policies, conventions, tips

And without understanding those special UML-friendly PHP coding policies you will likely also not understand: Webel UML for PHP: necessary departures from Drupal coding and documentation standards: special OO bridge method naming conventions; and UML-friendly 'I' prefix Interface names.

The OOE = Object Oriented Examples = One Of Each tutorial module is, and will always, be a work in progress, and is offered in the hope that it is useful to those Drupal developers intererested in OOP and design patterns, and that it helps promote a move towards true object-orientation in Drupal, and especially more use of true object-orientation in contributed module development.

Your next step should be to start examining the UML diagrams
of the demos listed under: OOE graphical UML models or just
use the OOE UML elements overview table with filters
Visit also