Site Search :
Standard Enterprise XML Methodology Pattern Setting Tunning Other
Article Contributors
GuestBook
Javapattern Maven
XSourceGen Dev
JetSpeed Test
JLook Image
jLook Family Site


±âº»ÆÐÅÏ Overview part-1
 
±âº»ÀûÀÎ ÆÐÅÏ¿¡ ´ëÇÑ °£·«ÇÑ °³¿ä¸¦ º¸µµ·Ï ÇÑ´Ù. ( 2003/03/07 ) 788
Written by ienvyou - ÃÖÁö¿õ
1 of 1
 

¢º µðÀÚÀÎ ÆÐÅÏ Àû¿ë½Ã Áß¿äÇÑ ¼¼°¡Áö ±ÔÄ¢
1. Implementation class °¡ ¾Æ´Ñ interface ¸¦ ÀÌ¿ë
2. Inheritance °¡ ¾Æ´Ñ Delegation À» »ç¿ë

    public interface AA {
        public String getInfo();
    }
    public class Super implements AA {
        public String getInfo() {}
    }
    public class Sub {
        AA delegator;
        public void test() {
             delegator.getInfo();
        }
    }

cf ) white-box reuse : Inheritance	vs. black-box reuse : Delegation

3. Coupling ÀÇ ÃÖ¼ÒÈ­
* Ä¿Çøµ : ¾î´À ÇϳªÀÇ ±â´É º¯È­°¡ Àüü ½Ã½ºÅÛÀÇ ±¸Á¶¿¡ ¿µÇâÀ» ¹ÌÄ¡´Â Á¤µµ
> ÀÌ°ÍÀÌ Ä¿Áú¼ö·Ï À߸øµÈ µðÀÚÀÎ

>> Refactoring °ú design pattern
    > ½ÇÁ¦ ¹®Á¦ ºÐ¼®ÀÌ Á¾·áµÈ ÀÌÈÄ Á»´õ È¿À²ÀûÀÎ ÄÚµå·Î º¯È­½ÃÅ°´Â °ÍÀ» refactoring À̶ó ÇÑ´Ù.
    > ÀÌ °úÁ¤¿¡¼­ µðÀÚÀÎÆÐÅÏÀÌ Àû¿ëµÇ¾îÁö´Â °æ¿ì°¡ ¸¹´Ù
    > ±¸ÇöÇϱâ ÀÌÀü¿¡ º¸Áö ¸øÇß´ø µðÀÚÀλóÀÇ ¹®Á¦Á¡µéÀ» ½ÇÁ¦ ±¸Çö¿¡ µé¾î°¡ À̸¦ °³¼±ÇÏ´Â °Í

>> Anti-Pattern
> s/w ¸¦ ¸¸µå´Â °úÁ¤¿¡¼­ ½±°Ô µµÃâµÇ´Â ¹Ù¶÷Á÷ÇÏÁö ¾ÊÀº ¹æ¹ýµé

> Á¾·ù
    - °ü¸®»óÀÇ ¾ÈƼ
    - architecture »óÀÇ ¾ÈƼ
    - °³¹ß»óÀÇ ¾ÈƼ
> ´ëÇ¥ÀûÀÎ anti-pattern
    - Spaghetti code : °³¹ß°úÁ¤¿¡¼­ ³ªÅ¸³².  ±â´ÉÀÇ Ãß°¡·Î ÀÎÇØ ÄÚµåÀÇ º¹Àâµµ°¡ Áõ°¡, ²¿ÀÌ´Â Çö»ó
    - Stovepipe System : architectureÀÇ ¹®Á¦, È®½ÇÇÑ Ãß»óÈ­°¡ ¾øÀÌ Çϳª·Î ¹­¾î Á¦Ç°À» ¸¸µå´Â °æ¿ì
    ½Å·Ú¼º, À¯Áöº¸¼ö°¡ ¸ðµÎ ÀúÇÏ
    - Analysis Paralysis : ºÐ¼®´Ü°è¿¡¼­ ³Ê¹« ¿Ïº®ÇÔÀ» Ãß±¸ÇÏ´Ùº¸¸é °³¹ß ÁøÇà ÀÚü°¡ ¸¶ºñ
    - Swiss Army Knife :  architecture ÀÛ¼º½Ã ÇϳªÀÇ °´Ã¼¿¡ ³Ê¹« ¸¹Àº ±â´É/ÀÎÅÍÆäÀ̽º¸¦ ³Ö´Â °æ¿ì º¹Àâ, 
    À¯Áöº¸¼ö ³­ÀÌ, Ä¿Çøµ Áõ°¡
    - Ambiguous Viewpoint : ºÒ¸íÈ®ÇÑ »óÅ¿¡¼­ ¸ðµ¨¸µÀ» ÁøÇà -> °´Ã¼ÀÇ ºÒ¸íÈ®



1) Facade pattern
    > ¿©·¯ °´Ã¼µéÀÌ °¡Áö´Â logic À» ÇϳªÀÇ °´Ã¼·Î ÁýÁß½ÃÅ°´Â ÇüÅÂ
    > helper, wrapper¶ó°íµµ ÇÑ´Ù
    > client side¿¡¼­ Á¢±ÙÇØ¾ß ÇÒ Å¬·¡½º°¡ ¸¹Àº °æ¿ì ¾Õ´Ü¿¡ Facade class¸¦ ¸¸µé¾î À̸¦ ÅëÇØ Á¢±Ù
    > client ¿Í ³»ºÎ ±¸Çö class ¿ÍÀÇ coupling ÃÖ¼ÒÈ­
    > logic ¿¡¼­ jdbc api¿¡ ÀÇÁ¸ÀûÀÌÁö ¾ÊÀ½À¸·Î ÀÎÇØ sqlj , oodb µîÀÇ Áö¿øÀ» µ¶¸³ÀûÀ¸·Î ¼öÇà °¡´É.
    > java.net.URL class °¡ ´ëÇ¥ÀûÀÎ ¿¹

    public interface JDBCHelper {	}
    public class JDBCStatementHelper implements JDBCHelper{  }
    public class JDBCPrepStatementHelper implements JDBCHelper{  }


2) Factory method pattern 
    > logic ÃøÀÇ ¿äû¿¡ µû¶ó ¼­·Î ´Ù¸¥ °´Ã¼¸¦ »ý¼ºÇÏ´Â Factory ¸¦ Á¤ÀÇ
    > ÇϳªÀÇ facade class ³»ÀÇ °è¼ÓÀûÀÎ ±â´ÉÃß°¡´Â ·ÎÁ÷ÀÇ º¹À⼺°ú runtime error À¯¹ß °¡´É¼º °íÁ¶
    > factory pattern ÀÇ »ç¿ë½Ã ±â´É È®Àå ¹× Ãß°¡¿¡ µû¶ó facade interface ¸¦ »ó¼Ó/±¸ÇöÇÑ Å¬·¡½ºµéÀÇ 
    Ãß°¡ °¡´ÉÇØÁü
    > ¶ÇÇÑ ÇÏ´Ü¿¡¼­ »ó¼Ó¹ÞÀº ¸Þ¼ÒµåÀÇ »ç¿ëÇÏÁö ¾ÊÀ½À» º°°³·Î °áÁ¤°¡´É
        ex) Statement ÀÇ °æ¿ì setType() À» ºñ·ÔÇÑ ¸Þ¼ÒµåµéÀÇ »ç¿ë ±ÝÁö

    public class JDBCHelperFactory { 
     JDBCHelper createJDBCHelper(){}
    }

    JDBCHelper helper = factory.createJDBCHelper( ip, port, sid, 
        JDBCHelperFactoryIF.HELPER_STATEMENT );
    JDBCHelper helper1 = factory.createJDBCHelper( ip, port, sid, 
        JDBCHelperFactoryIF.HELPER_PREPARED_STATEMENT );


3) Strategy pattern 
    > client ÀÇ ´Ù¾çÇÑ action 󸮸¦ ÇÊ¿ä·Î ÇÏ´Â °æ¿ì
    > º¹ÀâÇÑ switch ¹® À» ÇϳªÀÇ Å¬·¡½º·Î µ¶¸³ -> º¸´Ù readability °¡ Áõ°¡ÇÑ´Ù.
    > óÀ½ application ¼öÇà½Ã Á¾·ù°¡ °áÁ¤µÊ

    - os , dbº°·Î ¼­·Î ´Ù¸¥ 󸮸¦ ÇÏ·Á ÇÒ¶§
        -> ÇÑ±Û converting ÀÛ¾÷À» ¼öÇàÇÏ´Â º°°³ÀÇ Å¬·¡½º µµÀÔ
        -> À̸¦ JDBCHelper Áï facade ¿¡¼­ º¸À¯
        -> Äڵ庯ȯ½Ã ÀûÀýÈ÷ È£Ãâ
        -> ±â´É Ãß°¡, º¯°æÀÌ ¿ëÀÌÇØÁü.
	
5) Cache Management Pattern
	cf) Cache
		> ÀÛÀº ¿ë·®ÀÇ ºü¸¥ ±â¾ïÀåÄ¡¸¦ »ç¿ë, ´ë¿ë·®ÀÇ ´À¸° ±â¾ïÀåÄ¡ÀÇ access ¼Óµµ °³¼±
		> µ¥ÀÌŸº£À̽ºÀÇ °æ¿ì data µéÀÇ ÀϺθ¦ server»ó¿¡ memory cache ±â¹ýÀ» »ç¿ë ÀϺΠ
        º¸°üÇÏ´Â ¹æ¹ýÀ» ¸»ÇÑ´Ù
		

    > Cache ÀÇ ±¸Çö½Ã ÇÊ¿äÇÑ ±â´É
        1) memory repository ±¸Çö
        2) repository management ±â´É ±¸Çö
        3) Kick-off ÀÇ ±¸Çö : ÀúÀå¼Ò size ÃÊ°ú½Ã ÇϳªÀÇ °´Ã¼¸¦ ÀúÀå¼Ò¿¡¼­ ´Ù½Ã Á¦°Å

    > class ±¸¼º
        -> Object Key
        -> CacheManager
        -> ObjectCreator
        -> Cache

6) Producer-Consumer pattern
    - Event ÀÇ ¹ß»ý À» EventQueue ¿¡ ÀúÀå
    - À̸¦ °¢ Event Consumer ¿¡°Ô Àü´ÞÇÏ°í ÀÌ Event object¸¦ ActionManager °¡ ¹Þ¾Æ¼­ ¼öÇàÇÑ´Ù
    - ´ÜÀÏ Producer, Consumer ±¸Á¶°¡ ¾Æ´Ô.

    > class ±¸¼º
        -> Producer
        -> EventQueue
        -> EventListener
        -> Consumer
        -> ActionManager
	
    > java api ¿¡¼­ ±¸Çö ¿¹
        -> java.io.PipedInputStream, PipedOutputStream 
        -> Produer : PipedOutputStream
            -> PipedInputStream À» ³»Àå
            -> write() ¸¦ ÀÌ¿ëÇØ Queue¿¡ µ¥ÀÌŸ produce
            -> À̶§ queue ÀÇ ¿ªÇÒÀÎ PipedInputStream.receive() ¸¦ È£ÃâÇÑ´Ù
        -> Queue + Consumer : PipedInputStream
            -> read() ¸¦ ÀÌ¿ëÇØ queue¿¡ ÀúÀåµÇ¾î ÀÖ´Â µ¥ÀÌŸ¸¦ Àо´Ù
            -> À̶§ blocked i/o À̹ǷΠµ¥ÀÌŸ°¡ ¾øÀ» °æ¿ì °è¼Ó ´ë±âÇÑ´Ù
            -> À̸¦ ÇØ°áÇϱâ À§Çؼ­ size(), available() µîÀÇ ¸Þ¼Òµå¸¦ ±¸ÇöÇÒ °Í



7) Dynamic Connection Pattern (µ¿Àû¿¬°áÆÐÅÏ)
    - ÃʱâÈ­ ½Ã¿¡ ó¸®ÇÒ °¢ µ¿ÀÛ°´Ã¼µéÀ» ÇؽÃÅ×ÀÌºí¿¡ key , value ÀÇ ÇüÅ·ΠÀúÀå
    - ó¸®ÇØ¾ß ÇÒ ½ÃÁ¡¿¡¼­ ÇؽÃÅ×À̺í·ÎºÎÅÍ Ã³¸®°´Ã¼¸¦ ¾ò¾î³½´Ù
    - 󸮰´Ã¼´Â abstract class ¸¦ »ó¼Ó¹Þ¾Æ ¸¸µé°í ½ÇÁ¦ ó¸®ÇÏ´Â ÂÊ(Ŭ¶óÀ̾ðÆ®)¿¡¼­´Â  
    abstract class ³»ÀÇ method¸¦ ÅëÇØ °¢ 󸮰´Ã¼µéÀ» °øÅëÀûÀ¸·Î ¼öÇà½ÃŲ´Ù
    - ¼­¹öÀÇ È®À强 ±¸Ã¼È­
        -> ±â´É Ãß°¡½Ã flexible
        -> actionÀº preprocess, do, postprocess ·Î ³ª´©¾î ó¸®ÇÏ´Â ÆíÀÌ ÁÁ´Ù

    > ±¸¼º
        -> ActionAbstract class
        -> ActionImpl class...
        -> ActionManager : Hashtable º¸À¯

8) Command pattern
    - client/server °£¿¡ ¼öÇàÇØ¾ß ÇÒ ÀÛ¾÷À» Àü´ÞÇÒ¶§ command ¸¦ º°µµ·Î Á¤ÀÇÇÏ°í À̸¦ ó¸®ÇÒ 
    command󸮱⸦ µðÀÚÀÎ
	
    > ±¸¼º
        -> AbstractCommand
        -> ConcreteCommand class
        -> CommandManager

9) Guarded Suspension pattern
    - ½ÇÁ¦ ½ÇÇàÇÏ´Â ºÎºÐÀÇ Ã³¸® ÇÁ·Î¼¼½ºÀÇ °¹¼ö¸¦ Á¦ÇÑ
    - ¾î¶² ÀüÁ¦Á¶°ÇÀÌ ¸¸Á·µÇ±â Àü±îÁö´Â ¼öÇàÀ» °è¼ÓÇÏ°í ¹þ¾î³ª´Â °æ¿ì´Â °è¼Ó ´ë±âÇÏ´Â ÇüÅÂ
    - ÁÖÀÇ»çÇ× ; ÀûÀýÇÑ notify °¡ ¾øÀ» °æ¿ì´Â deadlock ÀÌ ¹ß»ýÇÒ ¼ö ÀÖ´Ù

    > ±¸¼º
        -> CommandQueue
            -> singleton pattern
            -> ó¸®µÉ  command °´Ã¼µéÀ» ´ãÀ» Queue ¸¦ °¡Áü
            -> queue ¿¡¼­ data ¸¦ ²¨³»°í ³Ö´Â µ¿ÀÛ ±¸Çö (push,pop)
            -> À̶§  ¹üÀ§¸¦ ÁöÁ¤ÇÏ°í Á¦¾îÇÑ´Ù

10) Immutable pattern
    - Çѹø ¸¸µé¾îÁø °´Ã¼´Â º¯È­½ÃÅ°Áö ¾Ê´Â´Ù
    - º¯È­°¡ ¹ß»ýÇÒ ¶§´Â »õ·Î¿î °´Ã¼¸¦ »ý¼ºÇؼ­ Àû¿ë½ÃŲ´Ù
    - ´ëÇ¥ÀûÀÎ ¿¹ : java.lang.String

11) Adapter pattern
    - interface + adapter + implementation class 
    - ¿©·¯ °´Ã¼µéÀÌ ÇϳªÀÇ interface¿¡ ÀÇÇØ »ç¿ëµÇ¾îÁø´Ù
    - client¿¡°Ô´Â interface¸¸ ³ëÃâµÇ¸ç ÀÌÀÇ È£ÃâÀÌ adapter¿¡°Ô Àü´ÞµÈ´Ù
    - adapter´Â ³»ºÎÀûÀÎ ¼öÇà ·ÎÁ÷À» °®Áö´Â ¾ÊÀ¸¸ç ·ÎÁ÷À» °®°í ÀÖ´Â ¶Ç´Ù¸¥ Ŭ·¡½ºÀÎ 
    adapter¸¦ È£Ãâ À̸¦ ó¸®ÇÑ´Ù

    - adapterÀÇ role : clientÀÇ interface¿¡ ÀÇÇÑ È£ÃâÀ» ½ÇÁ¦ ±¸Çö°´Ã¼¿¡°Ô Àü´ÞÇÏ´Â ÇüÅÂ
    - adapter¿Í adaptee ÀÇ °ü°è´Â use 
    - ´ëÇ¥ÀûÀÎ ¿¹ : java.awt.event ³»ÀÇ XXXAdapter class  

12) Bridge pattern
    - ¿©·¯°³ÀÇ Ãß»óŬ·¡½ºµéÀ» ¼­·Î °ü°è¸¦ ÁÖ¾î Á¤ÀÇÇÏ°í À̸¦ ±¸ÇöÇÑ Å¬·¡½ºµé ¿ª½Ã µ¿ÀÏÇÑ 
    °ü°è¸¦ °¡Áö´Â ÇüÅÂ
    - AbstractA + AbstractB + AImpl + BImpl
    - AbstractA ¿Í AbstractB´Â »ó¼Ó°ü°è
    - AImpl Àº AbstractA¸¦ BImplÀº AbstractB¸¦ ±¸Çö(use)ÇÑ °´Ã¼
    - AImpl °ú AbstractB¿ÍÀÇ °ü°è ¿ª½Ã ±¸Çö(use) °ü°è

    - ´ëÇ¥ÀûÀÎ ¿¹ : java.awt.Component ¿Í java.awt.peer.ComponentPeer, Button°ú ButtonPeer
        -> ComponentPeer interface 
            -> Button °°Àº ComponentÀÇ ÇÏÀ§ Ŭ·¡½ºµéÀÌ ±¸ÇöµÉ ¶§ ¿ä±¸µÇ´Â »óÈ£ ¿î¿ë ȯ°æ¿¡ 
            ÀÇÁ¸ÀûÀÎ methodµé Á¤ÀÇ
        -> ButtonPear interface
            -> Button ¿¡¼­ ±¸ÇöÇؼ­ »ç¿ë
        -> Component¿Í ComponentPeer ÀÇ °ü°è°¡ Button class¿Í ButtonPeer interface°£¿¡ µ¿ÀÏÇÏ°Ô À¯ÁöµÊ
	
13) FlyWeight Pattern
    - µ¿ÀÏÇÑ Á¤º¸¸¦ °¡Áö´Â °´Ã¼µéÀÇ ÀçÈ°¿ë : pooling
    - Àç»ç¿ë¼º Áõ´ë
    - AbstractA + ImplA1 + ImplA2 + FactoryA
    - client°¡ ImplA1 °´Ã¼ÀÇ ¿äûÀ» Factory ¿¡°Ô Àü´Þ
    - Factory´Â ÀÚ½ÅÀÇ pool³»¿¡ µ¿ÀÏÇÑ Á¤º¸¸¦ °¡Áö´Â °´Ã¼°¡ ÀÖ´ÂÁö üũ
    - ¾øÀ» °æ¿ì »õ·Î »ý¼º, À̸¦ pool¿¡ ³Ö°í ¼­ºñ½º

    - ´ëÇ¥ÀûÀÎ ¿¹ : java.lang.String - string literal Àº Àç»ç¿ëµÈ´Ù.  º°°³ÀÇ Ç®¸µ : À̸¦ ¼öÇàÇÏ´Â 
    ¸Þ¼Òµå String.intern() ÀÓ
        -> ¸Å¹ø String  listeral À» »ý¼ºÇ϶ó´Â ¿äûÀÌ µé¾î¿À¸é intern()ÀÌ È£ÃâµÊ
        -> Ç®¸µÀ» üũ, ¼­ºñ½ºÇÏ´Â ±â´ÉÀÌ native method·Î ±¸ÇöµÇ¾î ÀÖ½¿

        -> ¿öµåÇÁ·Î¼¼¼­¿¡¼­ ¹®ÀÚ °´Ã¼
        -> HTML ÀÇ ±¸¹®Ã³¸®¸¦ À§ÇÑ Element °´Ã¼ µî

    - immutable pattern °ú ¾Æ¿ï·¯¼­ »ç¿ëµÇ´Â °æ¿ì°¡ ¸¹´Ù.

14) Template Pattern
    - °øÅëÀûÀÎ ÇàÀ§¸¦ ÇÏ´Â ¿©·¯ Ŭ·¡½ºµéÀÇ ÁýÇÕÀ» Á¤ÀÇÇÑ ÆÐÅÏ
    - abstract class¸¦ Á¤ÀÇÇÏ°í ³»ºÎ¿¡ °øÅë ÇàÀ§¸¦ abstract method·Î ±â¼úÇÑ´Ù
    - ¿©±â±îÁö´Â »ó¼ÓÀÇ °³³ä°ú µ¿ÀÏÇÏ´Ù
    - ¶ÇÇÑ abstract class³»¿¡´Â Á¤ÀÇµÈ abstract method¸¦ ÀÌ¿ëÇØ Ã³¸®ÇÏ´Â ·ÎÁ÷ ¸Þ¼Òµå¸¦ ´ã´Â´Ù
        -> À̸¦ template mathod¶ó°í ÇÑ´Ù
        -> template method³»¿¡´Â business logic, algorithm ÀÌ Æ÷ÇÔ
        -> concrete class(sub class) ³»¿¡ ±¸ÇöµÇ¾î ÀÖÀ» abstract method¸¦ È£ÃâÇÔÀ¸·Î½á µ¿ÀÛÇÑ´Ù
    - ÀåÁ¡
        -> ÄÚµå Áߺ¹ ¹æÁö
        -> ±â´ÉÀÇ Ãß°¡ ¹× º¯°æÀÌ ½±´Ù
        -> »õ·Î¿î ±â´É Ãß°¡½Ã concrete class ¸¸ »õ·ÎÀÌ Á¤ÀÇÇϸé ok

    - »ç¿ë ¿¹ : java.io.*
        - InputStream , OutputStream class 
            -> public abstract int read() throws IOException ÀÌ abstract methodÀÓ
            -> template method
                -> read(byte[], int, int ) .... ¿©·¯ ¹öÁ¯ÀÇ ¸Þ¼Òµå
                -> skip()
            -> ¾Æ·§´Ü¿¡ À̸¦ »ó¼Ó¹ÞÀº FileInputStream class¿¡¼­ read( byte[], 10, 20 ) À» »ç¿ë
            -> SequenceInputStream, PipedInputStream À» ºñ·ÔÇÑ ¸î°¡Áö Ŭ·¡½º ¸ðµÎ µ¿ÀÏÇÑ ±¸Á¶

15) Proxy pattern

    * Remote proxy
        -> ´Ù¸¥ address space¸¦ Áö´Ñ °´Ã¼¿¡ ´ëÇÑ ·ÎÄà ´ë¸®ÀÚ¸¦ Á¦°ø
        -> rmi, ejb¿¡¼­ »ç¿ë
        -> rmi ÀÇ stub(client) / skeleton(server) ¿¡ ÇØ´ç.


    * Counting proxy
        -> ºÐ»êȯ°æ¿¡¼­ »ç¿ëÇÏ´Â °æ¿ì ÀÖ´Ù. 
        -> request ¸¶´Ù  reference count Áõ°¡ ½ÃÅ°¸é¼­ °ü¸® 
        -> À̸¦ garbage collection ¿¡¼­µµ »ç¿ë °¡´É.
        -> smart reference
            - reference ´ëÄ¡
            - ATL¿¡¼­ smart referenceÀÇ °æ¿ì ½º½º·Î¿¡ ´ëÇÑ ÂüÁ¶ Ä«¿îÆ®¸¦ À¯ÁöÇÏ´Ù°¡ 0ÀÌ µÇ´Â °æ¿ì 
            ÀÚµ¿À¸·Î free

        cf) ATL (Active Template Library)

        C++ ¶Ç´Â ºñÁÖ¾ó C++¸¦ ÀÌ¿ëÇÏ¿© ASP Äڵ峪 ´Ù¸¥ ¾×Ƽºê¿¢½º ÇÁ·Î±×·¥ ÄÄÆ÷³ÍÆ®¸¦ ¸¸µé ¶§ 
        »ç¿ëÇÏ´Â ¸¶ÀÌÅ©·Î¼ÒÇÁÆ®ÀÇ ÇÁ·Î±×·¥ ¶óÀ̺귯¸®ÀÌ´Ù.  ATLÀº ASP ÆäÀÌÁö »óÀÇ ½ºÅ©¸³Æ®¿¡¼­
        È£ÃâÇÒ ¼ö ÀÖ´Â COM °´Ã¼¸¦ ¸¸µé ¼ö ÀÖ°Ô ÇØÁØ´Ù. ¸¶ÀÌÅ©·Î¼ÒÇÁÆ®¿¡ ÀÇÇϸé, ÀÌ·¯ÇÑ °´Ã¼µéÀº 
        ºü¸£°í, ¿©·¯°¡Áö °­Á¡À» °¡Áö°í ÀÖ´Ù°í ÇÑ´Ù. ATLÀ» ÀÌ¿ëÇÏ¿© ¸¸µé°ÔµÇ´Â °´Ã¼µéÀº ¸ðµç ÄÜÆ®·Ñ,
        ÀͽºÇ÷η¯ ÄÜÆ®·Ñ, ÇÁ·ÎÆÛƼ ÆäÀÌÁö ¹× ´ëÈ­»óÀÚ µîÀ» Æ÷ÇÔÇÑ´Ù. 

        * Virtual proxy
            -> ½ÇÁ¦ °´Ã¼ÀÇ »ý¼º ºñ¿ëÀÌ ³ôÀº °æ¿ì virtual proxy¸¦ ¸ÕÀú »ý¼º
                -> ½ÇÁ¦ °´Ã¼ »ç¿ë½ÃÁ¡±îÁö ½ÇÁ¦ °´Ã¼ÀÇ »ý¼ºÀ» ´ÊÃâ ¶§ »ç¿ë
            -> Remote object layer¿¡¼­ »ç¿ë. 
            -> Servant »ý¼º½Ã ºñ¿ë ¼Ò¿ä°¡ Å©´Ù
                -> À̸¦ ÃÖ´ëÇÑ(Ŭ¶óÀ̾ðÆ®°¡ Á÷Á¢ È£ÃâÇÒ¶§±îÁö) º¸·ù½ÃÅ°´Â ¿ªÇÒ
            -> ¸¸¾à ½ÇÁ¦ bean »ý¼ºÇÏ´Â ½Ã°£ÀÌ ³Ê¹« ¿À·¡ °É¸®´Â °æ¿ì ÀÌ¿ë.  
            -> lazy initializing ¹æ½Ä(¿¹. MediaTracker class)
	
        cf)  ejb¿¡¼­ÀÇ proxy : method interposing -> declarative ProgrammingÀ» °¡´ÉÄÉ ÇÑ´Ù.
            deployee tool¿¡ ÀÇÇØ °´Ã¼°¡ »ý¼ºµÇ¾îÁö´Â °úÁ¤¿¡¼­ ¾Æ·¡¿Í °°Àº ÀÛ¾÷ Ãß°¡ °¡´É.
            1) security code »ðÀÔ °¡´É. : ƯÁ¤ À¯ÀúÀÎ °æ¿ì rollÀ» dd¿¡¼­ È®ÀÎÇÑ ÈÄ ÀÛ¾÷
            2) ºÐ»ê Æ®·£Àè¼Ç °ü¸® °¡´É : Æ®·£Àè¼Ç°ú °ü·ÃÀÌ Àִ ƯÁ¤ ¸Þ¼ÒµåÀÎ °æ¿ì DD·ÎºÎÅÍ È®ÀÎÇÏ¿©
            ÄÚµå ¾ÕµÚ¿¡ begin, commit 󸮸¦ Ãß°¡ÇÒ ¼ö ÀÖ´Ù.
	
        * Protection Proxy
            - ½ÇÁ¦ °´Ã¼¿¡ ´ëÇÑ Á÷Á¢ÀûÀÎ Á¢±ÙÀ» Á¦ÇÑÇÏ·Á ÇÒ¶§ ¾Õ´Ü¿¡ ¼³Ä¡

		
		
16) Single Threaded Execution pattern
    - ´ÜÀÏ ¾²·¹µåÀÇ Á¢±Ù¸¸À» Çã¿ëÇÏ´Â ÆÐÅÏ
    - ¿¹ ) java.util.Hashtable, Vector

    - À̸¦ ½ÇÁ¦·Î ±¸ÇöÇϱâ À§Çؼ­´Â synchronized() , synchronized method¸¦ ÀÌ¿ëÇÑ´Ù.


17) Abstract Factory Pattern
    - clientÀÇ interface´Â ConnectionFactory ÀÌ¸ç ½ÇÁ¦·Î À̸¦ ±¸ÇöÇÑ ´Ù¾çÇÑ 
            ConnectionFactoryImpl class Á¤ÀÇ
    - ½ÇÁ¦ client¿¡°Ô ¹ÝȯµÇ´Â °´Ã¼´Â FactoryImpl¿¡ ÀÇÇØ »ý¼ºµÈ ConnectionImpl °´Ã¼ÀÓ

    - JDBCÀÇ Connection, Connector architecture¿¡ Àû¿ë

    // ±¸¼º
    - ConnectionFactory : abstract factory
    - ConnectionFactoryImpl : factory
    - Connection  : abstract product
    - ConnectionA : product



2001-04-08
 
1
References
 
Copyright ¨Ï 2003 www.javapattern.info & www.jlook.com, an jLOOK co.,LTD