June 2018
Intermediate to advanced
408 pages
11h 23m
English
Code scattering means crosscutting concerns are duplicated across all modules of an application. Let's look at the following example to understand code scattering:
public class TransferServiceImpl implements TransferService { public void transfer(Account source, Account dest, Double amount) { //permission check if (!hasPermission(user) { throw new AuthorizationException(); } }}public class AccountServiceImpl implements AccountService { public void withdraw(Account userAccount, Double amount) { //Permission check if (!hasPermission(user) { throw new AuthorizationException(); }}
As we saw in preceding code sample, the permission check (security) is our crosscutting concern that is duplicated in all services.
These code tangling ...
Read now
Unlock full access