Core and cross-cutting concerns

We can write workable code without logging or transaction management, as both of these are not part of your business logic. A Java application revolves around providing a customized and easy solution for an enterprise problem. Business logic is always at the center to provide primary functionality of the application, which may sometimes be referred to as primary concern or core concern. However, it also has to be supported for some other functionalities or services, and it can't be neglected. These services play a vital role in the application. Either the migration of the application becomes time consuming, or backtracking the problem that occurred at runtime will be difficult. These concerns are scattered throughout the application, mostly with repetitive code. Such secondary concerns are called cross-cutting concerns, or horizontal concerns. Logging, transaction management, and security mechanism are some of the cross-cutting concerns that developers use in the application.

The following diagram shows logging and transaction management as the cross-cutting concerns, which are scattered in the application code:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.20.90