Performance: Cross-cutting concerns concept
MEDIUM IMPACT
This concept affects application startup time and runtime performance by adding layers that intercept core logic.
@Aspect @Component public class LoggingAspect { @Before("execution(* com.example..*(..))") public void logStart() { /* logging logic */ } }
public void process() { logStart(); checkSecurity(); // core logic logEnd(); } // repeated in every method| Pattern | Code Duplication | Runtime Overhead | Maintainability | Verdict |
|---|---|---|---|---|
| Manual code duplication | High | High | Low | [X] Bad |
| Aspect-Oriented Programming (AOP) | Low | Medium | High | [OK] Good |