AOP introduction

While writing any software application, the best practice is to divide your code into multiple independent modules based on business use cases. For example, you write an Employee Service class for all employee-related functions, an HRService class for all HR-related functions, and so on and so forth.

In general, the whole application consists of a set of independent classes that span multiple verticals and doesn’t share the same class hierarchy. This diagram depicts this scenario: 

Irrespective of the independent nature of each vertical, there are a few common items you need to implement across all of them, such as transaction ...

Get Java 9 Dependency Injection now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.