SlideShare a Scribd company logo
1 of 25
The way how Experts do things…

Prepared & Presented by :-
    Prageeth Sandakalum, Microsoft Student Champ,
    Faculty of IT, University of Moratuwa.
What are Design Patterns
     Development Issues and introduction of Design Patterns
     A brief history on design patters
     What are design patterns?
     Types of Design Patterns
     Has your code been improved ?

Implementing Design Patterns in C#
     Singleton Pattern
     Prototype Pattern
     Façade Pattern
     Decorator pattern
What are Design Patterns ?
              Lets begin with it…
 “Designing object-oriented software is hard and designing
  reusable object-oriented software is even harder.”
                                              – Erich Gamma -

 Dependency Handling - Open and Close method…
   Open for Extension and Closed for Modification

 Immobility of the existing libraries.

 Knowledge of the patterns that have worked in the past, makes
  the developers lives much easier in designing newer systems.
1987 - Cunningham and Beck used Alexander’s ideas to develop
        a small pattern language for Smalltalk
1990 - The Gang of Four (Gamma, Helm, Johnson and Vlissides)
        begin work compiling a catalog of design patterns
1991 - Bruce Anderson gives first Patterns Workshop at OOPSLA
1993 - Kent Beck and Grady Booch sponsor the first meeting of
        what is now known as the Hillside Group
1994 - First Pattern Languages of Programs (PLoP) conference
1995 - The Gang of Four (GoF) publish the Design Patterns book
“A design pattern is a general and reusable solution to a commonly
occurring problem in software.”
                                - Microsoft Developer Network (MSDN) -

 It is not a code that can be directly use in your application thus
  We can call a pattern a template to design classes or objects in a
  way that is proven to be optimized in the past

 Design patterns help to develop the high-level Solutions and to
  implement the Object Oriented principals
    Open Close Principal :- Open for extension and closed for modifications
    Dependency Inversion Principle :- Depend upon Abstractions, Not
                                          On concretions.
OO Design Patterns


        Creational             Structural           Behavioral

Behavioral Patterns
  Abstract Factory Creates an instance of several families of classes
  Builder Separates object construction from its representation
  Factory Method Creates an instance of several derived classes
  Prototype A fully initialized instance to be copied or cloned
  Singleton A class of which only a single instance can exist
Structural Patterns
  Adapter Match interfaces of different classes
  Bridge Separates an object’s interface from its implementation
  Composite A tree structure of simple and composite objects
  Decorator Add responsibilities to objects dynamically
  Facade A single class that represents an entire subsystem
  Flyweight A fine-grained instance used for efficient sharing
  Proxy An object representing another object
Behavioral Patterns
  Chain of Responsibility passing a request between a set of objects
  Command Encapsulate a command request as an object
  Interpreter A way to include language elements in a program
  Iterator Sequentially access the elements of a collection
  Mediator Defines simplified communication between classes
  Memento Capture and restore an object's internal state
  Observer A way of notifying change to a number of classes
  State Alter an object's behavior when its state changes
  Strategy Encapsulates an algorithm inside a class
  Template Method Defer the steps of an algorithm to a subclass
  Visitor Defines a new operation to a class without change
These are some of the Common advantages in Design patterns.
   Capture expertise and make it more accessible to non-experts in
    a standard form
   Facilitate communication among the developers by providing a
    common language
   Make it easier to reuse successful designs and avoid alternatives
    that diminish reusability
   Facilitate design modifications
   Improve design documentation
   Improve design understandability
Design Pattern..!!
Easier said than done hah?




            Implementing Design Patterns
                             How to make better codes…
◦ Concept
              Ensures that a particular class has only one object
              provide a central access point to invoke that object

            ◦ Motivation and Problem addresses
              Make sure that the client is not allowed to create
               additional objects
                 The “User” Object
UML Class     Try out Microsoft Windows basic applications
 Diagram         The Calculator and the Run window
Implementation Steps…
  Create the class with public modifier
  Make the constructor private… So that no body outside, can create
   objects
  Define a static method GetInstance() to retrieve the Object
  Inside the method, use conditional statements to check whether the
   object exists
  If not create an object and return it
  Otherwise just return the object
  Then instantiate the object (make it static)
Some hints for advanced development

  Make the GetInstance() method thread safe
     Use locks, Double check the instances
        Create a “readonly” object to use as the locking variable

  Initialize the object on 1st declaration
      private static Singleton instance=new Singleton();

  Avoid sub-classing by using sealed class
    public sealed class Singleton
◦ Concept
  Avoid repeatedly assigning same value to the
   similar objects.
  Allow independent behavior after the cloning ???

◦ Motivation and Problem addresses
  When creating objects (i.e. employee), we need to
   specify the same value repeatedly for objects
      employeeObj1.CompanyName = “IFS”;
      employeeObj1.CompanyPhone = “011-2845564”;
      EmployeeObj2.CompanyName = “IFS”;
      employeeObj2.CompanyPhone = “011-2845564”;
Implementation Steps…
  Created an object from the given class, i.e. firstEmp : Employee
  Now create the second object , i.e. secondEmp : Employee
  Set the values of the old object, i.e. firstEmp.Company = “IFS”;
     you can interchange the second and third steps…
  Implement the GetClone() method in the referring class.
  Return the cloned version of the referring object (Use appropriate
   cloning methods)
  Assign the returned value to the second object or vise versa., i.e.
   secondEmp = firstEmp.GetClone();
◦ Concept
              •   Wrap complicated subsystems with simpler interfaces
              •   Delegates client requests to appropriate subsystems

             ◦ Motivation and Problem addresses
               The Client code become complicated with so many
                objects
How Façade     The client need not to know the complex architecture
  Works         of the sub system
                     Banking Applications
Implementation Steps…
  Create the Façade class with public modifier
  Define object references of all the types in the sub system
  Initialize all the objects “On Demand”
  Create simple methods and handle multiple subsystem methods
   inside that method
        Withdraw() in Façade class handles DailyWithdrowalLimitExceeded(),
         GetBalance(), IssueReceipt() etc.. Methods
Some hints for advanced development

  Encapsulate the subsystem, So that it can only be accessed through
   Façade interface.
     Use internal modifiers

  Make the Façade Object SINGLETON ???
     Most of the time only one façade object is needed

  Use multiple Sub Systems within the same dll.
     If the sub system is too complex… use multiple facades.
See the Restaurant Problem explained here
  You create a beverage super class and all the beverages inherit from it
  But it will have too much sub classes implementing the same cost
   method in the super class.
    Tea, PlainTea, TeaWithoutSugar, IcedTea, VanilaTea, ChocoTea etc
  But each of them have very little difference on Ingredients…
     Adding Milk, Adding Sugar, Adding Chocolate
  To avoid unwanted sub-classing create methods in the super class for
   the extra changes
    AddMilk(), AddSugar(), AddChocolate()

              Has the problem been Solved?
Still we got some problems

  OCP… Open for Extension, Closed for Modification… Then how to
   handle the price changes ?
  More methods needed, more problems created.
  What if the new ingredients were introduced ?

Concept of Decorator Pattern

  Take the initial Object and decorate it in the Run time
    Take the Tea Object and decorate it with Sugar Object, then the
      Choco / Vanilla Objects…
Implementation Steps…
 Create the abstract class for the Main Classes, i.e. class Main
 Create the abstract class for the Decorator Classes extending the
   above class, i.e. class Decorator : Main
 Create the sub classes of the Main class
 Create the Decorator sub classes and let the Constructor to receive
   a “Main” type object
 Do the operation with the received object
 When ever creating an object in the client code, Use the “Main”
   class as the reference
Thank You !!!
References
  Notes from Aruna Wickrama, Teamwork @ Asharp Power Camp
  Head First Design Patterns By Eric Freeman, Elisabeth Robson,
   Kathy Sierra, Bert Bates.
  Design Principles and Design Patterns Robert C. Martin
  Software Architecture Interview Questions By Shivprasad Koirala,
   Sham Sheikh
  Articles from GoF (Gang of Four)

More Related Content

What's hot

P Training Presentation
P Training PresentationP Training Presentation
P Training PresentationGaurav Tyagi
 
Lecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design PatternsLecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design Patternsop205
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design patternMindfire Solutions
 
Design patterns difference between interview questions
Design patterns   difference between interview questionsDesign patterns   difference between interview questions
Design patterns difference between interview questionsUmar Ali
 
Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan GoleChetan Gole
 
Design Patterns & JDK Examples
Design Patterns & JDK ExamplesDesign Patterns & JDK Examples
Design Patterns & JDK ExamplesEnder Aydin Orak
 
Design Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The WorldDesign Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The WorldSaurabh Moody
 
GOF Design pattern with java
GOF Design pattern with javaGOF Design pattern with java
GOF Design pattern with javaRajiv Gupta
 
OOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingOOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingPurvik Rana
 
Jump Start To Ooad And Design Patterns
Jump Start To Ooad And Design PatternsJump Start To Ooad And Design Patterns
Jump Start To Ooad And Design PatternsLalit Kale
 
Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questionsjinaldesailive
 

What's hot (20)

P Training Presentation
P Training PresentationP Training Presentation
P Training Presentation
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Lecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design PatternsLecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design Patterns
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design pattern
 
Design pattern
Design patternDesign pattern
Design pattern
 
Design patterns tutorials
Design patterns tutorialsDesign patterns tutorials
Design patterns tutorials
 
Design patterns difference between interview questions
Design patterns   difference between interview questionsDesign patterns   difference between interview questions
Design patterns difference between interview questions
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan Gole
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Class 1 blog
Class 1 blogClass 1 blog
Class 1 blog
 
Design Patterns & JDK Examples
Design Patterns & JDK ExamplesDesign Patterns & JDK Examples
Design Patterns & JDK Examples
 
Go f designpatterns 130116024923-phpapp02
Go f designpatterns 130116024923-phpapp02Go f designpatterns 130116024923-phpapp02
Go f designpatterns 130116024923-phpapp02
 
Design Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The WorldDesign Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The World
 
Creational Design Patterns
Creational Design PatternsCreational Design Patterns
Creational Design Patterns
 
Ch05lect2 ud
Ch05lect2 udCh05lect2 ud
Ch05lect2 ud
 
GOF Design pattern with java
GOF Design pattern with javaGOF Design pattern with java
GOF Design pattern with java
 
OOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingOOPs Concepts - Android Programming
OOPs Concepts - Android Programming
 
Jump Start To Ooad And Design Patterns
Jump Start To Ooad And Design PatternsJump Start To Ooad And Design Patterns
Jump Start To Ooad And Design Patterns
 
Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questions
 

Similar to Introduction to Design Patterns

Patterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docxPatterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docxdanhaley45372
 
C#.net, C Sharp.Net Online Training Course Content
C#.net, C Sharp.Net Online Training Course ContentC#.net, C Sharp.Net Online Training Course Content
C#.net, C Sharp.Net Online Training Course ContentSVRTechnologies
 
Creational Design Patterns.pptx
Creational Design Patterns.pptxCreational Design Patterns.pptx
Creational Design Patterns.pptxSachin Patidar
 
UNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxUNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxanguraju1
 
Design Pattern lecture 2
Design Pattern lecture 2Design Pattern lecture 2
Design Pattern lecture 2Julie Iskander
 
Introduction To Design Patterns
Introduction To Design PatternsIntroduction To Design Patterns
Introduction To Design Patternssukumarraju6
 
Design Patterns
Design PatternsDesign Patterns
Design Patternsimedo.de
 
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...Luis Valencia
 
Why Design Patterns Are Important In Software Engineering
Why Design Patterns Are Important In Software EngineeringWhy Design Patterns Are Important In Software Engineering
Why Design Patterns Are Important In Software EngineeringProtelo, Inc.
 
Software Patterns
Software PatternsSoftware Patterns
Software Patternsbonej010
 
Sofwear deasign and need of design pattern
Sofwear deasign and need of design patternSofwear deasign and need of design pattern
Sofwear deasign and need of design patternchetankane
 
Design patterns in javascript
Design patterns in javascriptDesign patterns in javascript
Design patterns in javascriptAyush Sharma
 
The View object orientated programming in Lotuscript
The View object orientated programming in LotuscriptThe View object orientated programming in Lotuscript
The View object orientated programming in LotuscriptBill Buchan
 
1. Mini seminar intro
1. Mini seminar intro1. Mini seminar intro
1. Mini seminar introLeonid Maslov
 

Similar to Introduction to Design Patterns (20)

Patterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docxPatterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docx
 
C#.net, C Sharp.Net Online Training Course Content
C#.net, C Sharp.Net Online Training Course ContentC#.net, C Sharp.Net Online Training Course Content
C#.net, C Sharp.Net Online Training Course Content
 
Design pattern-presentation
Design pattern-presentationDesign pattern-presentation
Design pattern-presentation
 
Creational Design Patterns.pptx
Creational Design Patterns.pptxCreational Design Patterns.pptx
Creational Design Patterns.pptx
 
UNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxUNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptx
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Design Pattern lecture 2
Design Pattern lecture 2Design Pattern lecture 2
Design Pattern lecture 2
 
What is design pattern
What is design patternWhat is design pattern
What is design pattern
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Introduction To Design Patterns
Introduction To Design PatternsIntroduction To Design Patterns
Introduction To Design Patterns
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
Typescript design patterns applied to sharepoint framework - Sharepoint Satur...
 
Why Design Patterns Are Important In Software Engineering
Why Design Patterns Are Important In Software EngineeringWhy Design Patterns Are Important In Software Engineering
Why Design Patterns Are Important In Software Engineering
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Software Patterns
Software PatternsSoftware Patterns
Software Patterns
 
Sofwear deasign and need of design pattern
Sofwear deasign and need of design patternSofwear deasign and need of design pattern
Sofwear deasign and need of design pattern
 
Design patterns in javascript
Design patterns in javascriptDesign patterns in javascript
Design patterns in javascript
 
The View object orientated programming in Lotuscript
The View object orientated programming in LotuscriptThe View object orientated programming in Lotuscript
The View object orientated programming in Lotuscript
 
1. Mini seminar intro
1. Mini seminar intro1. Mini seminar intro
1. Mini seminar intro
 

Introduction to Design Patterns

  • 1. The way how Experts do things… Prepared & Presented by :- Prageeth Sandakalum, Microsoft Student Champ, Faculty of IT, University of Moratuwa.
  • 2. What are Design Patterns  Development Issues and introduction of Design Patterns  A brief history on design patters  What are design patterns?  Types of Design Patterns  Has your code been improved ? Implementing Design Patterns in C#  Singleton Pattern  Prototype Pattern  Façade Pattern  Decorator pattern
  • 3. What are Design Patterns ? Lets begin with it…
  • 4.  “Designing object-oriented software is hard and designing reusable object-oriented software is even harder.” – Erich Gamma -  Dependency Handling - Open and Close method… Open for Extension and Closed for Modification  Immobility of the existing libraries.  Knowledge of the patterns that have worked in the past, makes the developers lives much easier in designing newer systems.
  • 5. 1987 - Cunningham and Beck used Alexander’s ideas to develop a small pattern language for Smalltalk 1990 - The Gang of Four (Gamma, Helm, Johnson and Vlissides) begin work compiling a catalog of design patterns 1991 - Bruce Anderson gives first Patterns Workshop at OOPSLA 1993 - Kent Beck and Grady Booch sponsor the first meeting of what is now known as the Hillside Group 1994 - First Pattern Languages of Programs (PLoP) conference 1995 - The Gang of Four (GoF) publish the Design Patterns book
  • 6. “A design pattern is a general and reusable solution to a commonly occurring problem in software.” - Microsoft Developer Network (MSDN) -  It is not a code that can be directly use in your application thus We can call a pattern a template to design classes or objects in a way that is proven to be optimized in the past  Design patterns help to develop the high-level Solutions and to implement the Object Oriented principals  Open Close Principal :- Open for extension and closed for modifications  Dependency Inversion Principle :- Depend upon Abstractions, Not On concretions.
  • 7. OO Design Patterns Creational Structural Behavioral Behavioral Patterns  Abstract Factory Creates an instance of several families of classes  Builder Separates object construction from its representation  Factory Method Creates an instance of several derived classes  Prototype A fully initialized instance to be copied or cloned  Singleton A class of which only a single instance can exist
  • 8. Structural Patterns  Adapter Match interfaces of different classes  Bridge Separates an object’s interface from its implementation  Composite A tree structure of simple and composite objects  Decorator Add responsibilities to objects dynamically  Facade A single class that represents an entire subsystem  Flyweight A fine-grained instance used for efficient sharing  Proxy An object representing another object
  • 9. Behavioral Patterns  Chain of Responsibility passing a request between a set of objects  Command Encapsulate a command request as an object  Interpreter A way to include language elements in a program  Iterator Sequentially access the elements of a collection  Mediator Defines simplified communication between classes  Memento Capture and restore an object's internal state  Observer A way of notifying change to a number of classes  State Alter an object's behavior when its state changes  Strategy Encapsulates an algorithm inside a class  Template Method Defer the steps of an algorithm to a subclass  Visitor Defines a new operation to a class without change
  • 10. These are some of the Common advantages in Design patterns.  Capture expertise and make it more accessible to non-experts in a standard form  Facilitate communication among the developers by providing a common language  Make it easier to reuse successful designs and avoid alternatives that diminish reusability  Facilitate design modifications  Improve design documentation  Improve design understandability
  • 11. Design Pattern..!! Easier said than done hah? Implementing Design Patterns How to make better codes…
  • 12. ◦ Concept  Ensures that a particular class has only one object  provide a central access point to invoke that object ◦ Motivation and Problem addresses  Make sure that the client is not allowed to create additional objects   The “User” Object UML Class  Try out Microsoft Windows basic applications Diagram   The Calculator and the Run window
  • 13. Implementation Steps…  Create the class with public modifier  Make the constructor private… So that no body outside, can create objects  Define a static method GetInstance() to retrieve the Object  Inside the method, use conditional statements to check whether the object exists  If not create an object and return it  Otherwise just return the object  Then instantiate the object (make it static)
  • 14. Some hints for advanced development  Make the GetInstance() method thread safe  Use locks, Double check the instances  Create a “readonly” object to use as the locking variable  Initialize the object on 1st declaration  private static Singleton instance=new Singleton();  Avoid sub-classing by using sealed class public sealed class Singleton
  • 15. ◦ Concept  Avoid repeatedly assigning same value to the similar objects.  Allow independent behavior after the cloning ??? ◦ Motivation and Problem addresses  When creating objects (i.e. employee), we need to specify the same value repeatedly for objects  employeeObj1.CompanyName = “IFS”;  employeeObj1.CompanyPhone = “011-2845564”;  EmployeeObj2.CompanyName = “IFS”;  employeeObj2.CompanyPhone = “011-2845564”;
  • 16. Implementation Steps…  Created an object from the given class, i.e. firstEmp : Employee  Now create the second object , i.e. secondEmp : Employee  Set the values of the old object, i.e. firstEmp.Company = “IFS”;  you can interchange the second and third steps…  Implement the GetClone() method in the referring class.  Return the cloned version of the referring object (Use appropriate cloning methods)  Assign the returned value to the second object or vise versa., i.e. secondEmp = firstEmp.GetClone();
  • 17. ◦ Concept • Wrap complicated subsystems with simpler interfaces • Delegates client requests to appropriate subsystems ◦ Motivation and Problem addresses  The Client code become complicated with so many objects How Façade  The client need not to know the complex architecture Works of the sub system  Banking Applications
  • 18. Implementation Steps…  Create the Façade class with public modifier  Define object references of all the types in the sub system  Initialize all the objects “On Demand”  Create simple methods and handle multiple subsystem methods inside that method  Withdraw() in Façade class handles DailyWithdrowalLimitExceeded(), GetBalance(), IssueReceipt() etc.. Methods
  • 19. Some hints for advanced development  Encapsulate the subsystem, So that it can only be accessed through Façade interface.  Use internal modifiers  Make the Façade Object SINGLETON ???  Most of the time only one façade object is needed  Use multiple Sub Systems within the same dll.  If the sub system is too complex… use multiple facades.
  • 20.
  • 21.
  • 22. See the Restaurant Problem explained here  You create a beverage super class and all the beverages inherit from it  But it will have too much sub classes implementing the same cost method in the super class.  Tea, PlainTea, TeaWithoutSugar, IcedTea, VanilaTea, ChocoTea etc  But each of them have very little difference on Ingredients…  Adding Milk, Adding Sugar, Adding Chocolate  To avoid unwanted sub-classing create methods in the super class for the extra changes  AddMilk(), AddSugar(), AddChocolate()  Has the problem been Solved?
  • 23. Still we got some problems  OCP… Open for Extension, Closed for Modification… Then how to handle the price changes ?  More methods needed, more problems created.  What if the new ingredients were introduced ? Concept of Decorator Pattern  Take the initial Object and decorate it in the Run time  Take the Tea Object and decorate it with Sugar Object, then the Choco / Vanilla Objects…
  • 24. Implementation Steps…  Create the abstract class for the Main Classes, i.e. class Main  Create the abstract class for the Decorator Classes extending the above class, i.e. class Decorator : Main  Create the sub classes of the Main class  Create the Decorator sub classes and let the Constructor to receive a “Main” type object  Do the operation with the received object  When ever creating an object in the client code, Use the “Main” class as the reference
  • 25. Thank You !!! References  Notes from Aruna Wickrama, Teamwork @ Asharp Power Camp  Head First Design Patterns By Eric Freeman, Elisabeth Robson, Kathy Sierra, Bert Bates.  Design Principles and Design Patterns Robert C. Martin  Software Architecture Interview Questions By Shivprasad Koirala, Sham Sheikh  Articles from GoF (Gang of Four)