For anyone trying to understand the inner working of the Drupal e-Commerce 4.6.* module, a pair of UML data model diagrams should be really helpful.
As the upcoming sites for OSInet, Riff News and a few others are supposed to be based on the Drupal CMS, I've started diving into the Drupal data model, especially for the e-Commerce module part.
Here is a pair of data model diagrams for this Drupal functionality:
- A UML class diagram for the ecommerce module in version 4.6
- A UML package diagram for same
A couple of warnings are in order, though:
- As I'm currently in the process of learning Drupal, the diagrams may contain errors. Use at your own risk !
- The diagrams are based on the 4.6.2 code base, and are subject to change. At the very least, the
country
attribute inec_addresse_base
is changing fromint(11)
tochar(2)
in a recent patch and future release. - The diagrams represent an object-oriented view of Drupal, but the code does not make use of the object features in PHP. This means that the diagrams do NOT represent the actual physical database implementation, either MySQL or PostgreSQL, but a higher-level view.
- This is apparent in the
*_base
classes. These are not part of the actual Drupal code, but represent abstractions from which actual Drupal code derives. For this reason, they are flagged in the UML diagrams as abstract, meaning they appear in italics. I know this is semantic abuse and UML purists would frown upon this, but it had to appear.
A case in point is the ec_address_base
class. It is actually implemented six times in the current code for the MySQL version:
- as
ec_address
inmodules/address/address.mysql
- as
shipping_*
attributes toec_transaction
inmodules/payment/payment.mysql
- as
billing_*
attributes toec_transaction
inmodules/payment/payment.mysql
- as
ec_address
inmodules/store/store.mysql
- as
shipping_*
attributes toec_transaction
inmodules/store/store.mysql
- as
billing_*
attributes toec_transaction
inmodules/store/store.mysql
In this case, it is easier on the reader to refer to the abstract base class ec_address_base
thant to the actual implementation, hence these abstractions.
Note that V2V has a video of Matt Westgate about the e-commerce module. Not very technical, but still interesting. Several videos about Drupal too.
Tagged for drupal, e-commerce, and uml in Technorati.
2006-10-07 - Update : See also a newer post about drupal ecommerce module dependencies in drupal 4.7.x
2005-11-28 - Update : this page, as well as other in the Grokking Drupal series of my blog, is now available on drupal.org. The version on drupal.org will probably be updated with time, whereas this one won't be.
You da man, thanks!
You da man, thanks!