October 2017
Intermediate to advanced
396 pages
10h 2m
English
It is a coupling of concerns in the application. Code tangling occurs when there is a mixing of cross-cutting concerns with the application's business logic. It promotes tight coupling between the cross-cutting and business modules. Let's see the following code to understand more about code tangling:
public class TransferServiceImpl implements TransferService { public void transfer(Account a, Account b, Double amount) { //Security concern start here if (!hasPermission(SecurityContext.getPrincipal()) { throw new AccessDeniedException(); } //Security concern end here //Business logic start here Account aAct = accountRepository.findByAccountId(a); Account bAct = accountRepository.findByAccountId(b); accountRepository.transferAmount(aAct, ...Read now
Unlock full access