[module] Current posts - module code for tutorial

Project page quote (external)

The well-known tutorial Creating modules - a tutorial: Drupal 7.x is fine for a very first introduction, but I don't recommend that you code that way when you are working with the OOE system because the code does not respect the Don't Repeat Yourself (DRY Principle), it is far too Write Everything Twice (WET) (because "we enjoy typing"). You should nevertheless inspect and understand that original tutorial example from beginning to end, otherwise you will not be able to understand the OOE adaptation of it.

Please then inspect my tutorial module OOE = Object Oriented Examples = One Of Each, which demonstrates how to implement the 'Current posts' module in a more object-oriented form and without repetition of strings (such as Drupal array keys) that are shared and/or could break on change. See the API of the class CurrentPosts implementation as an OOE IProject, and the graphical Unified Modeling Language (UML) diagrams at CurrentPosts. You can run the OOE adaptation live at OOE Current Posts.
Please be aware that the OOE adaptation of the Current Posts example still deliberately includes some of the "old" Drupal style coding in order to demonstrate the differences between that older style and the fully object-oriented approach demonstrated by other OOE demos.