Chapter 4: Aspect-Oriented Programming

Aspect-Oriented Programming, commonly abbreviated as AOP, is a concept that will save you from copying and pasting the same lines of (boilerplate) code over and over again. Follow me in my reasoning:

  • Transaction handling code is everywhere in the code.
  • Because transaction handling code is everywhere, there is more code.
  • Because there is more code, there are more bugs.
  • You miss the deadline, because there are too many bugs.
  • You need to work overtime at the office, because you missed the deadline.
  • Your firstborn said her first words while you were at the office.

Even if you're not familiar with AOP, you know what I mean. Object-oriented languages like Java have concepts to micromanage modularization. You ...

Get Google Guice: Agile Lightweight Dependency Injection Framework now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.