tags:

views:

242

answers:

1

How does AOP ( Aspect Oriented Programming ) work in Drupal. I have learned about AOP in terms of using it for logging and security but how does it apply to Druoal?

+2  A: 

drupal mimics AOP paradigms through hooks, which basically allow developers to weave in bits of code during the flow of execution. you can take a look at the hooks a developer can implement here.

as a quick example, if i were developing a new node based module (nodes being the basic data form in drupal), i have instant access to comments and taxonomy with no additional work on my part. the comment and taxonomy modules have the ability to hook into nodes, and provide that added functionality. so in that sense i don't have to account for such features in my program but am able to take advantage of that flexibility.

Owen