Vous êtes sur la page 1sur 13

c 

     

?

 

a 
 
 ?

ë   
   
    

 ?

       



 ?

Note :- This is advanced question because anyone who asks to list down all patterns can?

only be crazy for what he is asking. But it is always a win-win situation for the interviewer.?

c   


      
     ?

 ?

Ô

?

Ñ  

  !  
       
 ?

Ñ     !    "


      ?

Ñ 
 #   !  
      
 ?

Ñ r   !  $ 


  
  
 ?

Ñ    !

   

 %?

Note :- The best way to remember Creational pattern is by ABFPS (Abraham Became?

First President of States).?

£
?

Ñ  !#
 
  
 ?

Ñ   !    "


& 
    ?
Ñ    ! 
   
   "
?

Ñ ë
  !      "

 ?

Ñ ' ! 
       ?

Ñ    ! !  


    
  ?

Ñ r % ! "
      "
?

??

Note : To remember structural pattern best is (ABCDFFP)?

u  
?

Ñ #  !ë    


 
   
 ?

Ñ #   !    "


&   ?

Ñ V   ! 


        ?

Ñ V  ! (  

    



 ?

Ñ  )  !  (   


  "
?

Ñ   !*
  
 (  "
?

Ñ  !   "


&    
 ?

Ñ    !*
     
?

Ñ    !  


     
 ?

Ñ c   #   !ë    %
      
?

Ñ · !ë       


 
 ?

Note :- Just remember Music««. 2 MICS On TV (MMIICCSSOTV).?

Note:- No source code is provided for architecture section as much of the things can be clear?

from good UML diagrams.?

½ a  

 
  ?

 ?

Note: ² This is quiet a confusing architect question especially in design pattern section.?

Interviewer can take you for a nice ride. So get the difference in your heart.?

         (       c ?

      


   V    ?

 % 
 "
?

c  
  
  

 
     ?

 
 
 
 "
     

   ?

   
    "
+ 
 

   
 ?

ü ?

   
   

  

       
 ?

 
 ?

c  
          
   
?

        


 r V   ?

 

  !?

Ñ c 
   

   ,r 
-   
?

, 
r 
-?

Ñ c 
  

  , 
   -

 ?

 
,  -?

Ñ        
      ?

   ,r 
- "
.      
   
  ,r 
- "
?

     ,r 


- "
 , 
r 
-?

Ñ 

      , -/   
  ,r 
- "
?
     ,  -

     , 
   -?

 
  
  ,r 
- "
?

ÿ
 !"
## 

?

      



  
   $
 ?

  
   
  
  
  
   ?

, 
   - 
   
   ,  -    ?

 ,  r 
-  
 
 
 V   
  ?


  "

   
    
 & 
?

ü?

  & / 

 
      
  ?

, 

 - V
  "
    
 V  
 ?


  
         V    ?


   *%  
,  -     , 
-?


  V 
  "
          
?

Note :- Just stick up to this definition that Abstract factory classifies factory methods or?

groups logically related factory method together.?

ü?

ÿ
$ %"
#
 ÿ 
?

½a Ô 


?

Twist: ² How can you implement MVC pattern in ASP.NET??

c     #·  


  01V  ëV   ?

           ë#·     "
?

   


  !?

üü?
Ñ #  2c
 
  V
    ?

   
(   

  

  ?

   ?

Ñ ·  2ë              ?

·      /    


?

Ñ   2c     


 

      ?

           /     


?

    
    
  1 ?

 
       
    
 
   ?

                   ?

   ?

 /   3   / 


  r*c 
  ?

#· ë    (      /  ?

    #· "  /     


  r*c?


 #·
  !?

Ñ #  2c
     ë ë c ë ?

  
        
 
 
 ?

        


   1V?

Ñ ·  2r     


 1V /   
  ?

   ?

Ñ   2Vr*c  
  
     ?

    


 
  #   ?

 ?
V  V     r*c    ?

ü?

ÿ
 & #  '"
  
 ?

½  
 


 

 ?

    


        
   "
 ?

*%  


  

       
   ?

 
      /?

Note:- May of developers would jump to a conclusion saying using the ´STATICµ keyword?

we can have a single instance of object. But that·s not the real case there is something more?

that has to be done. But please note we can not define a class as STATIC, so this will not?

serve our actual purpose of implementing singleton pattern.?

             *c !?

ü?

Ñ  
  

  ?

Public class ClsStaticClass?

Private shared objCustomer as clsCustomer?

End class?

c   


          "
    "
?

Ñ 
    

   
?

Note: ² defining a private constructor to class does not allow a client to create objects directly.?

Ñ    


    

     "


?

½     


     

 ?

Twist: ² How to implement cloning in .NET ? What is shallow copy and deep copy ??

 
   V       
V,  -  ?


       
   
      ?

  
V 
 / 
   
  "
?


  
    "
    

   ?

,V  $ - 


      $   "
    $ 
/?

 
   
 
   
   
    ?

   "



 ë 
?

½a  


 a£
 

?

  ?

+ ,+  
-  ,  -

    "  
  ?

,  
-,  -,  
-
 
  
   ?

 *c  +      


   *c
 )  ?

   ,)  - ,+  


- V/ 
 ?



   
   ,+  
-,)  -/  
?

      ?

½ Ô
    

    
 ?

ü ?

'          / 

   


?

    


    '  /  
  ?

  
   ?

ÿ
 (ÿ)  ?

      
  ' 
V      !?

Ñ    ?

Ñ r 
?

ü?
Ñ r ?

Ñ V 
?

             


     c ?

 
        
   
  c 
  ?

        


  
 % 
   ?

 ?

c 4ë*
  
 +    4ë*
 ?

,ë* )ë*)-
            ?

 
  ?

½ 
 
  

 ?

    


     ,ë  -,* -V   ?

         


      ?

½ua    ?

c     



     5667  
     ?

   

 ?

c        /   



 !?

1 V 
   !c       
  +  
?

    1V ?

#  2#    


      
  ?

%
 


       


    577  ?

   

   
 
(  
  %
 ?

 ?

ë

3 2c  
   
,ë3-
  V?
  83  
         " ?

c   

     
    
 9   ?

     


     
   
 % ?

   


    
 %    ?


    ?

ü?

½  !    


u !" 
?

  ?

 
 
/ :·*c
    ·     "
?


     #
 &+    *c 
 ?


r*c+  
 c         
/ ?

 
   
   
 ?


 
 
 
/          ?

        #


/ $$     !?

Ñ 


/?

c ë


/  
  
  ( .  
?

 
    
 

/   #
 ?

83  V  ,


  -     
?

  
 
  
  
 ?

%    *%


 )   ( .  

 
 ?

     ( .  *%


 )  ;  "
?

   ( .  


 (  ?

Ñ *%
   
/?
c *%
 #   
 
/     %  ?

   /   %


 +     
 
  ?

    %
     * 3   % 
?

  
    %
      
  ?

   
  
 
 c *%
 #  ?

 
 
/
       
/  *c?

 
 ?

Note: ² It·s beyond the scope the book to look into details of application block. Best is go to?

www.microsoft.com and search for these application block. Try to compile one or two?

programs using their given classes and documentation.?

½ a £#
  ?

, 
- 
  
 %      
   
?

 
   #3  1  
   / 
  ?

ü?

 
   
   
       
?

    

     $   
?

V*c 

   +  
 
 
  
 

?

   < 


 / 
     
  ?

 / ?

    

  
         3    ?

     
 !?

Ñ c     


          ?


 ?

Ñ c      



   #3+ë3  
 ?
   ?

Ñ  
 1)3   
 
 
   ?

1)3     


?

Ñ  
    
 

 V   
 
  ?

 
     /  +ë3< 
 
     %?

  +ë3   


?

ü?

ÿ
 *+,
  
?

    
   
   
   

   /?

/ c 
       
V    
  ?

   
     ,  - 
  , 
/-?

ü?

  
    
    
   ?

   
  
    

   

/  ?

   V     


      ,  -?

, 
/- 
     ,  - 
     ?

ë3
  

        V& 
  ?

   


  
 *c  

/r?

    =·    


        ?

 
   +  

  
  #3  ?

 
       

 / 4ë*    ?

   
    
     
  
<   V?

    



       

   ?

   
  1V     

     + ?


 
      

    

/  

 ?

 +  
?

Note:- It·s beyond the scope of this book to discuss about SOA. But just to keep you safe?

during interview this book has tried to clear some basics of SOA.?

½a 
 
 
 ?

c   
    !?

Ñ ë         #3 ?

Ñ ë  ?

Ñ   
 ?

Ñ #3?

½ a a
    ?

Note :- If you have worked with classic ASP this question can come to you.?

c + ë      


 

 ë#
 ?

     
         + ë   ?

      V  


      $ ?

ü?

   
     
  r   
  + ?

ë   
        

  $ ?

 %     /      ·>983*)·*) ?

    /       


  # ?

   
   #? /   
   Vë?

  ë?

ÿ
$ -. /  ?
   + ë  
  
#
 ?

       /    / + ë ?

  <         


  "
ë   ?

     ë?


?