14
Design Patterns, UML, Estimation and Project
Management
Note: We have released an exclusive book on 'Architecture lnterview quesfions' which covers
architecture in detail. P/ease e-mail [email protected] for details.
Explain SOLID principles.
SOLID (Single responsibility, Open-closed, Liskow substitution, lnterface segregation and Dependendy
inversion) are five basic principles which help to create good software architecture. SOLID is an acronym
where:
o S stands for SRP {Single Responsibility Principle}: A class should take care of only one
responsibility.
. O stands for OCP (Open Closed Principle): Extension should be preferred over rnodification.
. L stands for LSP (Liskov Substitution Principle): A pai'ent class object should be able to refer
child objects seamlessly during runtime polymorphism.
a I stands for ISP (lnterface Segregation Frineiplo): Client should not be forced to use an
interface if it does not need it.
e D stands for DIP (Dependency Inversion Principle): High-levei modules should not depend
on low-level modules but should depend on abstraction.
What are design patterns?
Design patterns are recurring solution to recurring problems in software architecture.
Which design patterns have you used in your project?
This question is very subjecti're as every developer has his own experience. So we will pick up three
design patterns, i.e., factory, singleton and fagade and discuss the same in rnore depth. ln case you
are using some other design pattern below is the lisi with classificaiion, go and pick your best three.
There are three basic classifications of patterns Creational, Struct,;ra!. *nd Behavioral patterns.
Creational Patterns
o Abstract Factory: Cre-ate an instance of several families of classes
o Builder: Separate object construction from its representation
o Factory Method: Create an instance of several derived classes
a Prototype: A fuliy initializecj instance to be copied or cloned