Building an AOP Framework for PHP – Motivation

A couple of years ago, in 2009 to be precise, I came into contact with aspect-oriented programming (AOP) for the first time. That was a Java EE project in which JBoss Seam was used. Amongst others, the implementation used JBoss Seam Interceptors while EJB 3.0 introduced a standard interceptor model for session bean components.

The possibilities which were opened up by using such annotation based features were amazing. They allowed the encapsulation of cross-cutting concerns without having to change the affected code. By using AOP, in particular non-functional requirements can be realized, such as logging oder security checks. At the same time, the program logic remains lean.