SpringBoot

μΈν”„λŸ° : λ°±κΈ°μ„ μ˜ 예제둜 λ°°μš°λŠ” μŠ€ν”„λ§ ν”„λ ˆμž„μ›Œν¬ -2

PYT 2019. 12. 14. 03:44
λ°˜μ‘ν˜•

2. AOP (Aspect-Oriented Programming) 관점지ν–₯ ν”„λ‘œκ·Έλž˜λ°

μ• ν”Œλ¦¬μΌ€μ΄μ…˜ 전체에 걸쳐 μ‚¬μš©λ˜λŠ” κΈ°λŠ₯을 μž¬μ‚¬μš©ν•˜λ„λ‘ μ§€μ›ν•˜λŠ”κ²ƒ

 

  • μ˜ˆμ‹œμ½”λ“œ

흩어진 μ½”λ“œμ—μ„œ λͺ¨μ•„놓은 μ½”λ“œλ‘œ (좜처:https://www.slideshare.net/whiteship/ss-111032788)

 

κ³΅ν†΅λœ κΈ°λŠ₯을 μž¬μ‚¬μš©ν•œ 것을 λ³Ό 수 있음
OOP(객체지ν–₯) μ—μ„œλŠ” κ³΅ν†΅λœ κΈ°λŠ₯을 μž¬μ‚¬μš©ν•˜λŠ” λ°©λ²•μœΌλ‘œ μƒμ†μ΄λ‚˜ μœ„μž„μ„ μ‚¬μš©ν•˜μ§€λ§Œ, ν•˜μ§€λ§Œ 전체 μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ—μ„œ μ—¬κΈ°μ €κΈ°μ—μ„œ μ‚¬μš©λ˜λŠ” λΆ€κ°€κΈ°λŠ₯듀을 μƒμ†μ΄λ‚˜ μœ„μž„μœΌλ‘œ μ²˜λ¦¬ν•˜κΈ°μ—λŠ” κΉ”λ”ν•˜κ²Œ λͺ¨λ“ˆν™”ν•˜κΈ° 어렀움
κ·Έλž˜μ„œ λ“±μž₯ν•œ 것이 AOP

  • AOP의 μž₯점

1. μ–΄ν”Œλ¦¬μΌ€μ΄μ…˜ 전체에 흩어진 곡톡 κΈ°λŠ₯이 ν•˜λ‚˜μ˜ μž₯μ†Œμ—μ„œ 관리됨

2. λ‹€λ₯Έ μ„œλΉ„μŠ€ λͺ¨λ“ˆλ“€μ΄ 본인의 λͺ©μ μ—λ§Œ μΆ©μ‹€ν•˜κ³  κ·Έμ™Έ 사항듀은 신경쓰지 μ•Šμ•„λ„ λœλ‹€λŠ” 점

 

ν˜„μ‹€μ„Έκ³„μ—μ„œ AOP의 μ μ ˆν•œ λΉ„μœ  (좜처:refactoring.guru)

 

Proxy

Intent Proxy is a structural design pattern that lets you provide a substitute or placeholder for another object. A proxy controls access to the original object, allowing you to perform something either before or after the request gets through to the origi

refactoring.guru

 

λ°˜μ‘ν˜•