1. OOP와 AOP
OOP(Object Oriented Programming) : 사용자가 원하는 업무 기반의 로직에 관심(사용자 요구사항) - 주 업무 로직
AOP(Aspect Oriented Programming) : 개발자/운영자가 운영할 때 필요에 따라 끼어놓는 코드 - 주 업무는 아니지만
OOP ⊂ AOP : AOP가 더 큰 범위
2. Primary Core Concern과 Cross-cutting Concern
Primary Core Concern : 주 업무 로직을 담당
Cross-cutiing Concern : 로그처리, 보안처리, 트랜잭션처리 등 주 업무 로직은 아니지만 반복되는 필요한 작업
매 주 업무 로직마다 위 내용들을 처리하는 코드를 삽입하지 않고 중간에 Proxy를 두어
이들을 코드 중복없이 사용할 수 있도록 함
3. AOP 함수 호출 방식
특정 함수가 호출될 경우, Cross-cutting Concern을 먼저 방문하여 트랜잭션/보안/로그 등의 처리를 시작한다.
그리고 Core Concern에 작성된 주 업무를 실행한 후, 다시 Cross-cutting Concern으로 돌아오고 함수를 반환한다.
(위의 Cross-cutting Concern을 Proxy라고 한다.)