Module Object Oriented Programming API
Component type
Maintenance status
Development status
Downloads
Component created
Component changed
What is it for?
This module allows you to write modules in pure OOP syntax. It becomes handy when you need some kind of "aspects" to inweave into the main functionality of your module. Moopapi does it by Decorator pattern. Currently we have these types of decorators implemented:
- Logger: allows to log every method calling together with all parameters passed. A mighty tool for development and debugging in some circumstances.
Used by: BOTCHA (spam protection without CAPTCHA) - its use case is that while developing Selenium-tests for its JavaScript there is no chance to use usual development tools such as XDebug, because Selenium-tests are intended to be launched via command-line interface. Moopapi logger helps BOTCHA to keep debugged.
- Cacher (planned, see #1870060: Create new decorator: Cacher): The idea is to separate a logic of an application and tricks to make it work faster. It could be done by Cacher "aspect" which includes all speed optimizations while your application contains pure business logic.
- Adapter: Abstraction layer for Drupal major version. The concept is thoroughly described here: #1932290: Forwardport doctrine - a proposed solution for Drupal major version migration problem. See 4.x branches of BOTCHA project (D6 & D7) together with common part x.x-1.x as an implementation of such audacious approach.
