Authoring software requires a set of
rules and methodologies to take your idea to center point without any rework
for future enhancements. In Software Engineering, we have a set of
principles stated by Robert Martin called SOLID principle. SOLID
word has principles as Single Responsibility, Open Close, Liskov’s
Substitution, Interface Segregation and Dependency Inversion. Let me explain
you about SOLID as one word
Single Responsibility Principle – There should be a one
strong reason to change the class.
Open/Close Principle – Entities should open only for
adding new functionality and Close for any updates after testing phase.
Liskov’s Substitution Principle – Functions accessing
base class must be able to access derived class
Interface Segregation Principle – Clients should use
Interface members completely.
Dependency Inversion Principle – High level modules and
Details should depend on abstractions only.
Other Main Principles of Software
design Engineering is
Dry (Don’t Repeat Yourself): Code should occur exactly once in the system.
KISS (Keep it Simple, Stupid!): Unnecessary complex code should avoided.
YAGNI (You ain’t gonna need it): Implement the things when you need them
These principles results to maintain
your software code as manageable, Scalable and reusable code and results in
In point of code reusability Design
Patterns are introduced. Design patterns are introduced by Christopher
Alexander in 1977, Kent Beck and Ward Cunningham in 1987. Design patterns
are considered as reusable solutions for commonly occurring problems in
software designs. Advantages of design patterns are, they provide
solutions for commonly occurring problems in software designs, they can
implement in any language, provide standard terminology and specific to
particular scenario. Design Patterns are categorized into 5 categories.
Model – View – Controller Patterns
Creational Patterns are patterns
deals with object Creations. Creational Patterns are applicable when:
A system should be independent of how its objects and
products are creating.
Two or more objects designed to use each other.
Instance, can be extended without modification.
Sub class of a class wants to access class object.
Reveling interfaces of a product.
Constructing different independent Complex objects.
Single instance can be access all the time.
Structure of these creational
patterns contains creation followed by its concrete creator. Creation Patterns
group contains 7 Design patterns.
Structural Design Patterns are used
to define entity relationships in simple ways. Structural patterns use
inheritance to compose interfaces or implementations. Structural patterns
are useful to develop independent class libraries to work together.
Structural Patterns has 11 Patterns
Pipes and filters
Private Class Data
Behavioral Design Patterns
identifies common communication between objects and realize these
patterns. These patterns increase the flexibility of communication
between the objects.
Behavioral Patterns has 19 patterns.
Chain of responsibility
Externalize the Stack
Model View Controller design pattern
has its own identity which has 3 inter connected parts, Model, View and
Controller. We use this mainly for User Interfaces.
These Patterns mainly deals with
Multi thread Programming. They were associated with Pattern Oriented
Software Architecture. Concurrency Patterns have 11 Patterns.
Double checked locking pattern
Read write lock pattern
Thread pool pattern