liveBook · Manning

Aspect-oriented programming

Also called AOP

Aspect-oriented programming is a technique that modularizes cross-cutting behavior and applies it to existing code at specified join points.

How 2 Manning books explain it

Grokking Software Architecture

A programming technique that modularizes cross-cutting concerns and automatically applies them at designated join points in program execution.

How it is used
Automates uniform cross-cutting logic, such as logging, around selected methods while keeping business logic separate.
How deep it goes
Defines runtime or compile-time weaving, demonstrates method logging, and notes overhead and limited access to business context.
Examples
Shows a framework weaving a log call into OrderService.saveOrder.
What you can do after
Evaluate AOP as an automated option for uniform cross-cutting behavior, weighing cleaner business logic against overhead and limited data context.

Read how Grokking Software Architecture explains aspect-oriented programming →

Spring Start Here, Second Edition

Aspect-oriented programming is a programming technique that modularizes behavior applied across multiple program components, such as logging or transaction management.

How it is used
Decouples recurring supporting logic from business methods and applies it to selected calls.
How deep it goes
Defines aspects, advice, and pointcuts, while stopping short of implementation details.
Examples
Uses logging, permission checks, execution-time measurement, and transaction management as examples.
What you can do after
Evaluate whether recurring non-business logic should be separated to reduce duplication and improve readability.

Read how Spring Start Here, Second Edition explains aspect-oriented programming →

Also covered in

What to know first

Related concepts

Questions about aspect-oriented programming

What is aspect-oriented programming?

Aspect-oriented programming is a technique that modularizes cross-cutting behavior and applies it to existing code at specified join points.

Which Manning books explain aspect-oriented programming?

Grokking Software Architecture and Spring Start Here, Second Edition.

What should I know before learning aspect-oriented programming?

Manning books that teach aspect-oriented programming usually introduce dependency injection first.

What are the parts of aspect-oriented programming?

Aspect-oriented programming includes advice and pointcut.

What is aspect-oriented programming also called?

Aspect-oriented programming is also called AOP.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.