Software Architecture Design Patterns in Java
1 DESIGN PATTERNS:
ORIGIN AND HISTORY
ORIGIN AND HISTORY
During the late 1970s, an architect named Christopher Alexander carried out the first known work in the area of patterns. In an attempt to identify and describe the wholeness or aliveness of quality designs, Alexander and his colleagues studied different structures that were designed to solve the same problem. He identified similarities among designs that were of high quality. He used the term pattern in
the following books to refer to these similarities.
WHAT IS A DESIGN PATTERN?
A design pattern is a documented best practice
or core of a solution that has been applied
successfully in multiple environments to solve a
problem that recursin a specific set of situations.
2 .UNIFIED MODELING
LANGUAGE (UML)
UML offers 12 diagrams towards representing an application’s requirements analysis
and solution design.
classification
STRUCTURE DIAGRAMS
1. Class diagrams
2. Object diagrams
3. Component diagrams
4. Deployment diagrams
BEHAVIOR DIAGRAMS
1. Use Case diagrams
2. Sequence diagrams
3. Activity diagrams
4. Collaboration diagrams
5. Statechart diagram
MODEL MANAGEMENT DIAGRAMS
1. Packages
2. Subsystems
3. Models
CLASS DIAGRAMS
Class diagrams are part of the structure diagrams and are used to describe the
static structure of a system.
SEQUENCE DIAGRAMS
Sequence diagrams are used to depict interactions among collaborating objects
in terms of messages exchanged over time for a specific result.
Class Diagram - Sequence Diagram
3. BASIC PATTERNS
INTERFACE
In general, the functionality of an object-oriented system is encapsulated in the form of a set of objects. These objects provide different services either on their own or by interacting with other objects.
Example:
public class MainApp {
public static void main(String [] args)
{ SalaryCalculator c = new
CategoryA(10000, 200);
Employee e = new Employee ("Jennifer”,c);
e.display();
c = new CategoryB(20000, 800);
e = new Employee ("Shania”,c);
e.display();
}
}