E D R , A S I H C RSS

DPSC Chapter4

Chapter 4

Structural Patterns


Adapter(105) Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces

Bridge(121) Decouple an abstraction from its implementation so that the two can vary independently

Composite(137) Compose objects into tree structrures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.

Decorator(161) Attach Additional responsibilities and behavior to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.

Facade(179) Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.

Flyweight(189) Use sharing to support large numbers of fine-grained objects efficiently.

Proxy(213) Provide a surrogate or placeholder for another object to control access to it.


Adapter(105) λŠ” λ‹€λ₯Έ μΈν„°νŽ˜μ΄μŠ€μ˜ Clients듀이 μ˜ˆμƒν• μˆ˜ μžˆλŠ” ν˜•νƒœμ˜€ 클래슀의 μΈν„°νŽ˜μ΄μŠ€λΌ λ³€ν˜•μ‹œν‚¨λ‹€. 즉, AdapterλŠ” μ–‘λ¦½ν• μˆ˜ μ—†λŠ” λ‹€λ₯Έ μƒν™©μ˜ λ‘κ°€μ§€μ˜ 일을 μˆ˜ν–‰ν•˜λŠ” ν΄λž˜μŠ€λΌ μƒν˜Έκ°„μ—°κ²°μ‹œν‚€λŠ” 역할을 ν•œλ‹€.

Bridge(121)은 적용(implementation)의 μΆ”μƒν™”λΌ ν†΅ν•œ λΆ„λ¦¬λΌ ν†΅ν•˜μ—¬ λ‘˜μ—κ²Œ 독립성을 λΆ€μ—¬ν•œλ‹€.

Composite(137)은 전체-λΆ€λΆ„μ˜ 계측 λ‚˜νƒ€λ‚΄κΈ°μœ„ν•œ treeꡬ쑰둜 각 objectλΌ κ΅¬μ„±μ‹œν‚¨λ‹€. CompositeλŠ” client 듀이 κ°œλ³„μ˜ object와 objectλ“€μ˜ 쑰합을 μΌμ •ν•œ κ·œμΉ™μœΌλ‘œ λ‹€λ£°μˆ˜ 있게 ν•œλ‹€.

Decorator(161)은 objectμ—κ²Œ λ™μ μœΌλ‘œ μž„λ¬΄μ™€ 할일을 λΆ€μ—¬ν•œλ‹€. DecoratorλŠ” κΈ°λŠ₯의 ν™•μž₯을 μœ„ν•œ ν•¨μˆ˜μ— λŒ€ν•˜μ—¬ μœ μ—°ν•œ 선택을 μ œκ³΅ν•œλ‹€.

Facade(179)λŠ” ν™•μž₯된 μ‹œμŠ€ν…œμ—μ„œ(ν•˜μœ„, 상속받은) interfaceλ“€μ˜ 쑰합에 λŒ€ν•œ 일관적인 μ ‘κ·Ό(interface)을 μ œκ³΅ν•œλ‹€. FacadeλŠ” ν™•μž₯ μ‹œμŠ€ν…œ(ν•˜μœ„, 상속받은)을 μ€λ” μ‚¬μš©ν•˜κ²Œ 쉽도둝 높은 λ‹¨κ³„μ˜ interfaceλΌ μ •μ˜ν•œλ‹€.

Flyweight(189)λŠ” λ§Žμ€ 수의 잘 λ§Œλ“€μ–΄μ§„ objectλ“€μ˜ 효과적인 κ³΅μœ λΌ κ°€λŠ₯μΌ€ ν•œλ‹€.

Proxy(213)은 λ‹€λ₯Έ object의 μ‘°μ •,관리(control)을 μœ„ν•œ λŒ€ν–‰μž, placeholerλΌ μ œκ³΅ν•œλ‹€.
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:23:04
Processing time 0.0127 sec