Software Architecture Notes
Software Architecture Notes
Unit -1
Software Development:
The development of software is usually a planned initiative with a number of steps and stages that result in the
creation of operational software. Hence a good definition is: “a process with a set of activities that create
computer software products, including their design, development, testing, and deployment.” Software itself is
a set of instructions or programs that tell a computer what to do. It is independent of hardware and makes
computers programmable.
Software is developed using computer programming, carried out by a software developer. A software
developer definition is “a person that creates software, either by themselves or in conjunction with others.”
What do software developers do day-to-day? They use processes and techniques to create working software,
including requirements definition, data flow design, code design, process flow design, flowcharting, code
creation, software development testing, and debugging. The end-to-end process is sometimes referred to as the
software development life cycle (SDLC). The term ‘full stack software developer’ is someone that develops
both user-facing software and server software, including database development and the development of
application interfaces.
Different Types of Software Development
There are several different types. They can be grouped into four basic categories:
● Application development that provides functionality for users to perform tasks. Examples include
office productivity suites, media players, social media tools, and booking systems. Applications can
run on the user’s own personal computing equipment or on servers hosted in the cloud or by an internal
IT department. Media streaming development is one example of application development for the
cloud.
● System software development to provide the core functions such as operating systems, storage
systems, databases, networks, and hardware management.
● Development tools that provide software developers with the tools to do their job, including code
editors, compilers, linkers, debuggers, and test harnesses.
● Embedded software development that creates the software used to control machines and devices,
including automobiles, phones, and robots.
2. V-Model
4. RAD Model
6. Iterative Model
The Spiral Model combines elements of both the Iterative and Waterfall development models, in efforts to
combine advantages of top-down and bottom-up production. The Spiral Model has four phases –
Identification, Design, Construct/Build, Evaluation and Risk Analysis. The software project repeatedly passes
through these phases in iterations called spirals.
Advantages and Disadvantages of Spiral Model
Advantages: The Spiral Model can be advantageous as it manages risks and divides development into phases.
It also helps with more accurate estimates for budget and schedule as roadblocks are discovered earlier.
Disadvantages: Since this model is highly customized, repurposing the process can be confusing. It also
requires team members that are well-versed in risk evaluation.
8. Prototype Model
Product revision The product revision perspective identifies quality factors that influence the ability to
change the software product, these factors are:- Maintainability, the ability to find and fix a defect. Flexibility,
the ability to make changes required as dictated by the business. Testability, the ability to Validate the software
requirements.
Product transition The product transition perspective identifies quality factors that influence the ability to
adapt the software to new environments:- Portability, the ability to transfer the software from one environment
to another. Reusability, the ease of using existing software components in a different context. Interoperability,
the extent, or ease, to which software components work together.
Product operations The product operations perspective identifies quality factors that influence the extent to
which the software fulfils its specification:- Correctness, the functionality matches the specification.
Reliability, the extent to which the system fails. Efficiency, system resource (including cpu, disk, memory,
network) usage. Integrity, protection from unauthorized access. Usability, ease of use.
In total McCall identified the 11 quality factors broken down by the 3 perspectives, as listed above. For each
quality factor McCall defined one or more quality criteria (a way of measurement), in this way an overall
quality assessment could be made of a given software product by evaluating the criteria for each factor. For
example the Maintainability quality factor would have criteria of simplicity, conciseness and modularity.
Boehm's Quality Model
Barry W. Boehm also defined a hierarchical model of software quality characteristics, in trying to qualitatively
define software quality as a set of attributes and metrics (measurements). At the highest level of his model,
Boehm defined three primary uses (or basic software requirements), these three primary uses are:-
As-is utility, the extent to which the as-is software can be used (i.e. ease of use, reliability and efficiency).
Maintainability, ease of identifying what needs to be changed as well as ease of modification and retesting.
Portability, ease of changing software to accommodate a new environment.
These three primary uses had quality factors associated with them , representing the next level of Boehm's
hierarchical model.
Boehm identified seven quality factors, namely:-
Portability: the extent to which the software will work under different computer configurations (i.e. operating
systems, databases etc.).
Reliability: the extent to which the software performs as required, i.e. the absence of defects.
Efficiency: optimum use of system resources during correct execution.
Usability: ease of use.
Testability: ease of validation, that the software meets the requirements.
Notes Prepared By : Sarvagya Jain
Understandability: the extent to which the software is easily comprehended with regard to purpose and
structure.
Flexibility: the ease of changing the software to meet revised requirements.
These quality factors are further broken down into Primitive constructs that can be measured, for example
Testability is broken down into:- accessibility, communicativeness, structure and self descriptiveness. As with
McCall's Quality Model, the intention is to be able to measure the lowest level of the model.
9 ISO 9000 certification
ISO (International Standards Organization) is a consortium of 63 countries established to formulate and foster
standardization. ISO published its 9000 series of standards in 1987. The ISO 9000 standard specifies the
guidelines for maintaining a quality system. The ISO standard mainly addresses operational aspects and
organizational aspects such as responsibilities, reporting, etc.
ISO 9000 specifies a set of guidelines for repeatable and high quality product development. ISO 9000 is a
series of three standards: ISO 9001, ISO 9002, and ISO The ISO 9000 series of standards is based on the
premise that if a proper process is followed for production, then good quality products are bound to follow
automatically. The types of industries to which the different ISO standards apply are as follows.
ISO 9001 applies to the organizations engaged in design, development, production, and servicing of goods.
This is the standard that is applicable to most software development organizations.
ISO 9002 applies to those organizations which do not design products but are only involved in production.
Examples of these category industries include steel and car manufacturing industries.
ISO 9003 applies to organizations that are involved only in installation and testing of the products.
The main requirements of ISO 9001 as:
1) Management Responsibility 2) Quality System 3) Contract Reviews
4) Design Control 5) Document Control 6) Purchasing 7) Purchaser Supplied Product 8) Product Identification
9) Process Control 10) Inspection and Testing 11) Inspection, Measuring and Test Equipment 12) Inspection
and Test Status 13) Control of Nonconforming Product 14) Corrective Action 15) Handling, 16) Quality
records 17) Quality Audits 18) Training
Capability Maturity Model
SEI Capability Maturity Model (SEI CMM) helped organizations to improve the quality of the software.
SEI CMM can be used two ways capability evaluation and software process assessment
The capability evaluation indicates the likely contractor performance if the contractor is awarded a work.
Therefore, we can select a contractor based on its performance.
software process assessment is used by an organization with the objective to improve its process capability.
SEI CMM classifies software development industries into the following five maturity levels.Different levels of
the model have been designed to slowly build its quality system starting from scratch.
Level 1: Initial. A software development organization at this level is characterized by ad hoc activities.
Very few or no processes are defined and followed. Since software production processes are not defined,
different engineers follow their own process and as a result development efforts become chaotic.
Therefore, it is also called chaotic level. The success is only due to some individuals, and when they leave the
organization the people left behind feel great difficulty to understand what has been done and what is to be
done due to lack of processes. This leads to low quality.
Level 2: Repeatable. At this level, the basic project management practices such as tracking cost and schedule
are established.
cost estimation techniques like function point analysis, COCOMO, etc. Are used
The necessary process discipline is in place to repeat earlier success on projects with similar applications.
Hence the existing process is repeated, it is helpful only if we are working on same kind of problems.
Level 3: Defined. At this level the processes for both management and development activities are defined and
documented.
There is a common organization-wide understanding of activities, roles, and responsibilities.
The processes though defined, the process and product qualities are not measured. ISO 9000 aims at achieving
this level.
Level 4: Managed. At this level, the focus is on software metrics. Two types of metrics are collected.
Notes Prepared By : Sarvagya Jain
Product metrics (measures size, reliability, time complexity, understandability) Process metrics (measures
average defect correction time, productivity, average number of defects found per hour inspection)
Quantitative quality goals are set for the products.
The process metrics are used to check if a project performed satisfactorily. Thus, the results of process
measurements are used to evaluate project performance rather than improve the process.
Level 5: Optimizing. At this stage, process and product metrics are collected.
For example, if from an analysis of the process measurement results, it was found that the code reviews were
not very effective and a large number of errors were detected only during the unit testing, then the process
may be fine tuned to make the review more effective. Also lessons learned from specific projects are
incorporated into the process.
Continuous process improvement is achieved both by analyzing the quantitative feedback from the process
measurements and from application of innovative ideas and technologies.
Such an organization identifies the best software engineering practices and innovations which may be tools,
methods, or processes.
Key process areas (KPA) of a software organization: Key Process Areas (KPAs) that includes the areas an
organization should focus to improve its software process to the next level. It provides a way for gradual
quality improvement over several stages.
Two-Tier Architecture
Web Servers
2. Client-server pattern
This pattern consists of two parties; a server and multiple clients. The server
component will provide services to multiple client components. Clients request
services from the server and the server provides relevant services to those clients.
Furthermore, the server continues to listen to client requests.
Usage
● Online applications such as email, document sharing and banking.
Client-server pattern
3. Master-slave pattern
4. Pipe-filter pattern
This pattern can be used to structure systems which produce and process a stream of data. Each processing
step is enclosed within a filter component. Data to be processed is passed through pipes. These pipes can be
used for buffering or for synchronization purposes.
Usage
● Compilers. The consecutive filters perform lexical analysis, parsing, semantic analysis, and code
generation.
● Workflows in bioinformatics.
5. Broker pattern
This pattern is used to structure distributed systems with
decoupled components. These components can interact
with each other by remote service invocations. A broker
component is responsible for the coordination of
communication among components.
Servers publish their capabilities (services and
characteristics) to a broker. Clients request a service from
the broker, and the broker then redirects the client to a
suitable service from its registry.
Usage
● Message broker software such as Apache
ActiveMQ, Apache Kafka, RabbitMQ and JBoss
Messaging.
6. Peer-to-peer pattern
In this pattern, individual components are known as peers. Peers may
function both as a client, requesting services from other peers, and as a
server, providing services to other peers. A peer may act as a client or as a
server or as both, and it can change its role dynamically with time.
Usage
● File-sharing networks such as Gnutella and G2)
● Multimedia protocols such as P2PTV and PDTP.
● Cryptocurrency-based products such as Bitcoin and Blockchain
7. Event-bus pattern
This pattern primarily deals with events and has 4 major
components; event source, event listener, channel and event bus.
Sources publish messages to particular channels on an event bus.
Listeners subscribe to particular channels. Listeners are notified of
Notes Prepared By : Sarvagya Jain
messages that are published to a channel to which they have subscribed before.
Usage
● Android development
● Notification services
8. Model-view-controller pattern
9. Blackboard pattern
This pattern is useful for problems for which no
deterministic solution strategies are known. The
blackboard pattern consists of 3 main components.
● blackboard — a structured global memory
containing objects from the solution space
● knowledge source — specialized modules
with their own representation
● control component — selects, configures and
executes modules.
All the components have access to the blackboard.
Components may produce new data objects that are
added to the blackboard. Components look for
particular kinds of data on the blackboard, and may
find these by pattern matching with the existing knowledge source.
Usage
● Speech recognition
● Vehicle identification and tracking
● Protein structure identification
● Sonar signals interpretation.
10. Interpreter pattern
This pattern is used for designing a component that interprets programs written in a dedicated language. It
mainly specifies how to evaluate lines of programs, known as sentences or expressions written in a particular
language. The basic idea is to have a class for each symbol of the language.
Usage
● Database query languages such as SQL.
● Languages used to describe communication protocols.
Notes Prepared By : Sarvagya Jain
ii. Methods to assess an architecture before any system is built from it, so as to mitigate the risks associated
with launching unprecedented designs. iii.Techniques for incremental architecture-based development, so as to
uncover design flaws before it is too late to correct them.
How the ABC Works :
1. The architecture affects the structure of the developing organization. An architecture prescribes a structure
for a system; as we will see, it particularly prescribes the units of software that must be implemented (or
otherwise obtained) and integrated to form the system. These units are the basis for the development project's
structure. Teams are formed for individual software units; and the development, test, and integration activities
all revolve around the units. Likewise, schedules and budgets allocate resources in chunks corresponding to
the units. If a company becomes adept at building families of similar systems, it will tend to invest in each
team by nurturing each area of expertise. Teams become embedded in the organization's structure. This is
feedback from the architecture to the developing organization.
In the software product line case study, separate groups were given responsibility for building and
maintaining individual portions of the organization's architecture for a family of products. In any design
Notes Prepared By : Sarvagya Jain
undertaken by the organization at large, these groups have a strong voice in the system's decomposition,
pressuring for the continued existence of the portions they control.
2. The architecture can affect the goals of the developing organization. A successful system built from it can
enable a company to establish a foothold in a particular market area. The architecture can provide
opportunities for the efficient
production and deployment of similar systems, and the organization may adjust its goals to take advantage of
its newfound expertise to plumb the market. This is feedback from the system to the developing organization
and the systems it builds.
3. The architecture can affect customer requirements for the next system by giving the customer the
opportunity to receive a system (based on the same architecture) in a more reliable, timely, and economical
manner than if the subsequent system were to be built from scratch. The customer may be willing to relax
some requirements to gain these economies. Shrink-wrapped software has clearly affected people's
requirements by providing solutions that are not tailored to their precise needs but are instead inexpensive and
(in the best of all possible worlds) of high quality. Product lines have the same effect on customers who cannot
be so flexible with their requirements. A Case Study in Product Line Development will show how a product
line architecture caused customers to happily compromise their requirements because they could get
high-quality software that fit their basic needs quickly, reliably, and at lower cost.
4. The process of system building will affect the architect's experience with subsequent systems by adding to
the corporate experience base. A system that was successfully built around a tool bus or .NET or encapsulated
finite-state machines will engender similar systems built the same way in the future. On the other hand,
architectures that fail are less likely to be chosen for future projects.
5. A few systems will influence and actually change the software engineering culture, that is, the technical
environment in which system builders operate and learn. The first relational databases, compiler generators,
and table-driven operating systems had this effect in the 1960s and early 1970s; the first spreadsheets and
windowing systems, in the 1980s. The World Wide Web is the example for the 1990s. J2EE may be the
example for the first decade of the twenty-first century. When such pathfinder systems are constructed,
subsequent systems are affected by their legacy.
These and other feedback mechanisms form what we call the ABC, illustrated in Figure , which depicts the
influences of the culture and business of the development organization on the software architecture. That
architecture is, in turn, a primary determinant of the properties of the developed system or systems. But the
ABC is also based on a recognition that shrewd organizations can take advantage of the organizational and
experiential effects of developing an architecture and can use those effects to position their business
strategically for future projects.
Reference model :
According to OASIS (Organization for the Advancement of Structured Information Standards) a reference
model is "an abstract framework for understanding significant relationships among the entities of some
environment, and for the development of consistent standards or specifications supporting that environment. A
reference model is based on a small number of unifying concepts and may be used as a basis for education and
explaining standards to a non-specialist. A reference model is not directly tied to any standards, technologies
or other concrete implementation details, but it does seek to provide a common semantics that can be used
unambiguously across and between different implementations.
here are a number of concepts rolled up into that of a 'reference model.' Each of these concepts is important:
1. Abstract: a reference model is abstract. It provides information about environments of a certain kind. A
reference model describes the type or kind of entities that may occur in such an environment, not the
particular entities that actually do occur in a specific environment. For example, when describing the
architecture of a particular house (which is a specific environment of a certain kind), an actual exterior
wall may have dimensions and materials, but the concept of a wall (type of entity) is part of the
reference model. One must understand the concept of a wall in order to build a house that has walls.
Notes Prepared By : Sarvagya Jain
2. Entities and relationships: A reference model describes both types of entities (things that exist) and
their relationships (how they connect, interact with one another, and exhibit joint properties). A list of
entity types, by itself, doesn't provide enough information to serve as a reference model.
3. Within an environment: A reference model does not attempt to describe "all things." A reference
model is used to clarify "things within an environment" or a problem space. To be useful, a reference
model should include a clear description of the problem that it solves, and the concerns of the
stakeholders who need to see the problem get solved.
4. Technology agnostic: A reference model's usefulness is limited if it makes assumptions about the
technology or platforms in place in a particular computing environment. A reference model typically is
intended to promote understanding a class of problems, not specific solutions for those problems. As
such, it must assist the practitioner by aiding the process of imagining and evaluating a variety of
potential solutions. That does not preclude the development of a reference model that describes a set of
software applications, because the problem space may be "how to manage a set of software
applications."
The uses of a reference model
There are many uses for a reference model. One use is to create standards for both the objects that inhabit the
model and their relationships to one another.
Another use of a reference model is to educate.
A third use of a reference model is to improve communication between people.
A fourth use of a reference model is to create clear roles and responsibilities.
A fifth use of a reference model is to allow the comparison of different things.
Architectural Patterns, Reference Models, and Reference Architectures
Between box-and-line sketches that are the barest of starting points and full-fledged architectures, with all of
the appropriate information about a system filled in, lie a host of intermediate stages. Each stage represents the
outcome of a set of architectural decisions, the binding of architectural choices. Some of these intermediate
stages are very useful in their own right. Before discussing architectural structures, we define three of them.
1. An architectural pattern is a description of element and relation types together with a set of constraints on
how they may be used. A pattern can be thought of as a set of constraints on an architecture-on the element
types and their patterns of interaction-and these constraints define a set or family of architectures that satisfy
them. For example, client-server is a common architectural pattern. Client and server are two element types,
and their coordination is described in terms of the protocol that the server uses to communicate with each of
its clients. Use of the term client-server implies only that multiple clients exist; the clients themselves are not
identified, and there is no discussion of what functionality, other than implementation of the protocols, has
been assigned to any of the clients or to the server. Countless architectures are of the client-server pattern
under this (informal) definition, but they are different from each other. An architectural pattern is not an
architecture, then, but it still conveys a useful image of the system-it imposes useful constraints on the
architecture and, in turn, on the system.
2. A reference model is a division of functionality together with data flow between the pieces. A reference
model is a standard decomposition of a known problem into parts that cooperatively solve the problem.
Arising from experience, reference models are a characteristic of mature domains. Can you name the standard
parts of a compiler or a database management system? Can you explain in broad terms how the parts work
together to accomplish their collective purpose? If so, it is because you have been taught a reference model of
these applications.
3. A reference architecture is a reference model mapped onto software elements (that cooperatively implement
the functionality defined in the reference model) and the data flows between them. Whereas a reference model
divides the functionality, a reference architecture is the mapping of that functionality onto a system
decomposition. The mapping may be, but by no means necessarily is, one to one. A software element may
implement part of a function or several functions.
Notes Prepared By : Sarvagya Jain
Notes Prepared By : Sarvagya Jain
Unit -2
Software Architecture Model:
Software architecture involves the high level structure of software system abstraction, by using
decomposition and composition, with architectural style and quality attributes. A software architecture
design must conform to the major functionality and performance requirements of the system, as well as
satisfy the non-functional requirements such as reliability, scalability, portability, and availability.
A software architecture must describe its group of components, their connections, interactions among them
and deployment configuration of all components.
A software architecture can be defined in many ways −
● UML (Unified Modeling Language) − UML is one of object-oriented solutions used in software
modeling and design.
● Architecture View Model (4+1 view model) − Architecture view model represents the functional and
non-functional requirements of software application.
● ADL (Architecture Description Language) − ADL defines the software architecture formally and
semantically.
Structural models
Structural models of software display the organization of a system in terms of the components that make up
that system and their relationships. Structural models may be static models, which show the structure of the
system design, or dynamic models, which show the organization of the system when it is executing. You
create structural models of a system when you are discussing and designing the system architecture.
UML class diagrams are used when developing an object-oriented system model to show the classes in a
system and the associations between these classes. An object class can be thought of as a general definition
of one kind of system object. An association is a link between classes that indicates that there is some
relationship between these classes. When you are developing models during the early stages of the software
engineering process, objects represent something in the real world, such as a patient, a prescription, doctor,
etc.
Generalization is an everyday technique that we use to manage complexity. In modeling systems, it is often
useful to examine the classes in a system to see if there is scope for generalization. In object-oriented
languages, such as Java, generalization is implemented using the class inheritance mechanisms built into the
language. In a generalization, the attributes and operations associated with higher-level classes are also
associated with the lower-level classes. The lower-level classes are subclasses that inherit the attributes and
Notes Prepared By : Sarvagya Jain
operations from their superclasses. These lower-level classes then add more specific attributes and
operations.
An aggregation model shows how classes that are collections are composed of other classes. Aggregation
models are similar to the part-of relationship in semantic data models.
Dynamic Model: The dynamic model is used to express and model the behaviour of the system over time.
It includes support for activity diagrams, state diagrams, sequence diagrams and extensions including
business process modelling.
Sequence Diagrams
Sequence diagrams are used to display the interaction between users, screens, objects and entities within the
system. It provides a sequential map of message passing between objects over time. Frequently these
diagrams are placed under Use Cases in the model to illustrate the use case scenario - how a user will
interact with the system and what happens internally to get the work done. Often, the objects are represented
using special stereotyped icons, as in the example below. The object labelled Login Screen is shown using
the User Interface icon. The object labelled SecurityManager is shown using the Controller icon. The Object
labelled users is shown using the Entity icon.
Notes Prepared By : Sarvagya Jain
Activity Diagrams
Activity diagrams are used to show how different workflows in the system are constructed, how they start
and the possibly many decision paths that can be taken from start to finish. They may also illustrate where
parallel processing may occur in the execution of some activities.
Notes Prepared By : Sarvagya Jain
State Charts
State charts are used to detail the transitions or changes of state an object can go through in the system. They
show how an object moves from one state to another and the rules that govern that change. State charts
typically have a start and end condition.
Process Model
A process model is a UML extension of an activity diagram used to model a business process - this diagram
shows what goal the process has, the inputs, outputs, events and information that are involved in the process.
Notes Prepared By : Sarvagya Jain
Framework Model:
An architecture framework is an encapsulation of a minimum set of practices and requirements for artifacts
that describe a system's architecture. Models are representations of how objects in a system fit structurally in
and behave as part of the system. Views are a partial expression of the system from a particular perspective.
A viewpoint is a set of representations (views and models) of an architecture that covers a stakeholder's
issues.
Architectural Styles:
The architectural styles that are used while designing the software as follows:
1. Data-centered architecture
● The data store in the file or database is occupying at the center of the architecture.
● Store data is access continuously by the other components like an update, delete, add, modify from
the data store.
● Data-centered architecture helps integrity.
● Pass data between clients using the blackboard mechanism.
● The processes are independently executed by the client components.
Notes Prepared By : Sarvagya Jain
2. Data-flow architecture
● This architecture is applied when the input data is converted into a series of manipulative
components into output data.
● A pipe and filter pattern is a set of components called as filters.
● Filters are connected through pipes and transfer data from one component to the next component.
● The flow of data degenerates into a single line of transform then it is known as batch sequential.
4. Layered architectures
● The different layers are defined in the architecture. It consists of outer and inner layer.
● The components of outer layer manage the user interface operations.
● Components execute the operating system interfacing at the inner layer.
● The inner layers are application layer, utility layer and the core layer.
● In many cases, It is possible that more than one pattern is suitable and the alternate architectural style
can be designed and evaluated.
Microservice Architecture:
Microservices architecture (often shortened to microservices) refers to an architectural style for developing
applications. Microservices allow a large application to be separated into smaller independent parts, with
each part having its own realm of responsibility. To serve a single user request, a microservices-based
application can call on many internal microservices to compose its response.
Containers are a well-suited microservices architecture example, since they let you focus on developing the
services without worrying about the dependencies. Modern cloud-native applications are usually built as
microservices using containers.
A microservices architecture is a type of application architecture where the application is developed as a
collection of services. It provides the framework to develop, deploy, and maintain microservices architecture
diagrams and services independently.
microservices architecture consists of a collection of small, autonomous services. Each service is
self-contained and should implement a single business capability within a bounded context. A bounded
context is a natural division within a business and provides an explicit boundary within which a domain
model exists.
Notes Prepared By : Sarvagya Jain
Reactive Architecture
Reactive systems architecture is a computer systems paradigm that takes advantage of the responsiveness,
flexibility and resiliency offered in reactive programming so that various components (e.g., software
applications, databases and servers) can continue to function and even thrive if one of the components is
compromised.
The reactive programming on which reactive systems architecture allows -- at its simplest expression -- data
to automatically change when related data changes. So, for example, in the expression a = b + c, if either b
or c changes, then the value of a will change automatically when a notification of the change to b or c to is
sent. The change represented by b or c might be a change in availability, while a might be the price.
Elements of ADL
• Components
– Primitive building blocks
• Connectors
– Mechanisms of combining components
• Abstraction
– Rules for referring to the combination of components and connectors
Important Properties of ADL
● Composition – composition of independent components and connections
● Abstraction – need to describe design elements clearly and explicitly
● Reusability – ability to reuse components, connectors in different architectural
descriptions
● Configuration – ability to understand and change the architectural structure
● Heterogeneity – ability to combine multiple, heterogeneous architectural descriptions
● Analysis - possible to perform rich and varied analysis of architectural description
Struts Framework:
Struts is an open source framework that extends the Java Servlet API and employs a
Model, View, Controller (MVC) architecture. It enables you to create maintainable,
extensible, and flexible web applications based on standard technologies, such as JSP
pages, JavaBeans, resource bundles, and XML.
When you use Struts, the framework provides you with a controller servlet,
ActionServlet, which is defined in the Struts libraries that are included in the IDE, and
which is automatically registered in the web.xml deployment descriptor.
The controller servlet uses a struts-config.xml file to map incoming requests to Struts
Action objects, and instantiate any ActionForm objects associated with the action to
temporarily store form data. The Action object processes requests using its execute
method, while making use of any data stored in the form bean. Once the Action object
Notes Prepared By : Sarvagya Jain
processes a request, it stores any new data (i.e., in the form bean, or in a separate result
bean), and forwards the results to the appropriate view.
public MessageStore() {
message = "Hello Struts User";
}
HelloWorldAction.java
package org.apache.struts.helloworld.action;
import org.apache.struts.helloworld.model.MessageStore;
import com.opensymphony.xwork2.ActionSupport;
public class HelloWorldAction extends ActionSupport {
private MessageStore messageStore;
public String execute() {
messageStore = new MessageStore() ;
return SUCCESS;
}
public MessageStore getMessageStore() {
Notes Prepared By : Sarvagya Jain
return messageStore;
}
}
Hibernate Framework
Hibernate is a Java framework that simplifies the development of Java application to interact
with the database. It is an open source, lightweight, ORM (Object Relational Mapping) tool.
Hibernate implements the specifications of JPA (Java Persistence API) for data persistence.
ORM Tool
An ORM tool simplifies the data creation, data manipulation and data access. It is a
programming technique that maps the object to the data stored in the database.
The ORM tool internally uses the JDBC API to interact with the database.
Java Persistence API (JPA) is a Java specification that provides certain functionality and
standard to ORM tools. The javax.persistence package contains the JPA classes and
interfaces.
The Hibernate architecture includes many objects such as persistent object, session factory,
transaction factory, connection factory, session, transaction etc.
The Hibernate architecture is categorized in four layers.
● Java application layer
● Hibernate framework layer
● Backhand api layer
● Database layer
Let's see the diagram of hibernate
architecture:
This is the high level architecture of
Hibernate with mapping file and
configuration file.
Notes Prepared By : Sarvagya Jain
Hibernate framework uses many objects such as session factory, session, transaction etc.
alongwith existing Java API such as JDBC (Java Database Connectivity), JTA (Java
Transaction API) and JNDI (Java Naming Directory Interface).
Elements of Hibernate Architecture
For creating the first hibernate application, we must know the elements of Hibernate
architecture. They are as follows:
SessionFactory
The SessionFactory is a factory of session and client of ConnectionProvider. It holds a second
level cache (optional) of data. The org.hibernate.SessionFactory interface provides a factory
method to get the object of Session.
Session
The session object provides an interface between the application and data stored in the
database. It is a short-lived object and wraps the JDBC connection. It is factory of
Transaction, Query and Criteria. It holds a first-level cache (mandatory) of data. The
org.hibernate.Session interface provides methods to insert, update and delete the object. It
also provides factory methods for Transaction, Query and Criteria.
Transaction
The transaction object specifies the atomic unit of work. It is optional. The
org.hibernate.Transaction interface provides methods for transaction management.
ConnectionProvider
It is a factory of JDBC connections. It abstracts the application from DriverManager or
DataSource. It is optional.
TransactionFactory
It is a factory of Transactions. It is optional.
First Hibernate Example without IDE
Steps to create first Hibernate Application
1. Create the Persistent class
2. Create the mapping file for Persistent class
3. Create the Configuration file
4. Create the class that retrieves or stores the persistent object
Notes Prepared By : Sarvagya Jain
5. Load the jar file
6. Run the first hibernate application without IDE
Here, we are going to create the first hibernate application without IDE. For creating the first
hibernate application, we need to follow the following steps:
1. Create the Persistent class
2. Create the mapping file for Persistent class
3. Create the Configuration file
4. Create the class that retrieves or stores the persistent object
5. Load the jar file
6. Run the first hibernate application by using command prompt
1) Create the Persistent class
A simple Persistent class should follow some rules:
● A no-arg constructor: It is recommended that you have a default constructor at least
package visibility so that hibernate can create the instance of the Persistent class by
newInstance() method.
● Provide an identifier property: It is better to assign an attribute as id. This attribute
behaves as a primary key in database.
● Declare getter and setter methods: The Hibernate recognizes the method by getter
and setter method names by default.
● Prefer non-final class: Hibernate uses the concept of proxies, that depends on the
persistent class. The application programmer will not be able to use proxies for lazy
association fetching.
Let's create the simple Persistent class:
Employee.java
package com.javatpoint.mypackage;
public class Employee {
private int id;
private String firstName,lastName;
Node.js
Node.js is a very powerful JavaScript-based platform built on Google Chrome's JavaScript
V8 Engine. It is used to develop I/O intensive web applications like video streaming sites,
single-page applications, and other web applications. Node.js is open source, completely free,
and used by thousands of developers around the world.Node.js is an open source,
cross-platform runtime environment for developing server-side and networking applications.
Node.js applications are written in JavaScript, and can be run within the Node.js runtime on
OS X, Microsoft Windows, and Linux.Node.js also provides a rich library of various
JavaScript modules which simplifies the development of web applications using Node.js to a
great extent.
Node.js = Runtime Environment + JavaScript Library
The following diagram depicts some important parts of Node.js
AngularJS
AngularJS is a very powerful JavaScript Framework. It is used in Single Page Application
(SPA) projects. It extends HTML DOM with additional attributes and makes it more
responsive to user actions. AngularJS is open source, completely free, and used by thousands
of developers around the world. It is licensed under the Apache license version 2.0.AngularJS
is a MVC based framework.
An AngularJS application consists of following three important parts −
● ng-app − This directive defines and links an AngularJS application to HTML.
● ng-model − This directive binds the values of AngularJS application data to HTML
input controls.
● ng-bind − This directive binds the AngularJS Application data to HTML tags.
Creating AngularJS Application
Step 1: Load framework
Being a pure JavaScript framework, it can be added using <Script> tag.
<script
src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js">
</script>
Elements of JSP
The elements of JSP have been described below −
The Scriptlet
A scriptlet can contain any number of JAVA language statements, variable or method
declarations, or expressions that are valid in the page scripting language.
Following is the syntax of Scriptlet −
<% code fragment %>
You can write the XML equivalent of the above syntax as follows −
<jsp:scriptlet>
code fragment
Notes Prepared By : Sarvagya Jain
</jsp:scriptlet>
Any text, HTML tags, or JSP elements you write must be outside the scriptlet. Following is
the simple and first example for JSP −
<html>
<head><title>Hello World</title></head>
<body>
Hello World!<br/>
<%
out.println("Your IP address is " + request.getRemoteAddr());
%>
</body>
</html>
NOTE − Assuming that Apache Tomcat is installed in C:\apache-tomcat-7.0.2 and your
environment is setup as per environment setup tutorial.
Let us keep the above code in JSP file hello.jsp and put this file in
C:\apache-tomcat7.0.2\webapps\ROOT directory. Browse through the same using URL
http://localhost:8080/hello.jsp. The above code will generate the following result −
Servlet :
Servlet can be described in many ways, depending on the context.
● Servlet is a technology which is used to create a web application.
● Servlet is an API that provides many interfaces and classes including documentation.
● Servlet is an interface that must be implemented for creating any Servlet.
● Servlet is a class that extends the capabilities of the servers and responds to the
incoming requests. It can respond to any requests.
● Servlet is a web component that is deployed on the server to create a dynamic web
page.
Servlets are the Java programs that run on the Java-enabled web server or application server.
They are used to handle the request obtained from the webserver, process the request, produce
the response, then send a response back to the webserver.
Servlet Architecture is can be depicted from the image itself as provided below as follows:
Notes Prepared By : Sarvagya Jain
○ show it from the menu bar, Window / Show View / Project Explorer. It should
look like that:
○ JSP, CSS files, images… etc will be placed in the "WebContent" folder. Java
files (Servlets) will be placed in the "Java Resources: src" folder.
2. Create the JSP file
○ In the "Project Explorer" view, R-click "WebContent" / New / JSP.
○ Name your JSP - to be consistent with the example, name it "Home.jsp"
place the JSP the following code:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> My first JSP </title>
</head>
<body>
<form action="HelloServlet">
Please enter a color <br>
<input type="text" name="color"size="20px">
<input type="submit" value="submit">
</form>
</body>
</html>
In the above diagram, the logical representation of how EJBs are invoked and deployed by
using RMI(Remote Method Invocation) is defined. The containers of the EJB cannot be
self-deployed. In order to deploy the containers, it requires the Application server.
Application Server
In the EJB architecture, the Application server is the outermost layer that holds or contains
the Container to be deployed. The application layer plays an important role in executing the
application developed using the beans. It provides the necessary environment to execute those
applications. Some most popular application servers are Web-logic, Tomcat, JBoss,
Web-sphere, Wildfly, and Glass-finish. The main tasks of the application server are:
1. Manage Interfaces
2. Execution of the processes
3. Connecting to the database
4. Manage other resources.
Container
In EJB architecture, the Container is the second outermost layer. It is a very important layer
for enterprise beans that are contained in it. For the enterprise bean, the Container provides
various supporting services, which are as follows:
● It provides support for transactional services such as registering the objects, assign
remote interfaces, purge the instances.
● It provides support for monitoring the object's activities and coordinating distributed
components.
● It provides support for security services.
● It provides support for the pooling of resources.
● It provides support for managing the Life-cycle of beans and their concurrency.
Notes Prepared By : Sarvagya Jain
● It provides support to concentrate on business logic.
Beans:
Java beans of the enterprise are installed in the Container in the same way as a Plain old java
object (POJO) is installed and registered to the Container. For developing secured, large scale
and robust business applications, beans provide business logic.
Middleware:
Middleware is software that bridges gaps between other applications, tools, and databases in
order to provide unified services to users.
It enables one or more kinds of communication or connectivity between two or more
applications or application components in a distributed network.
types of middleware
There are 14 specific types of middleware software that can be used to solve various
problems for either enterprise or platform purposes, including:
1. Application Programming Interface (API): A toolset for building applications such as
an API for developing mobile apps on a particular operating system.
2. Application Server: A software framework used to create and run enterprise
applications.
3. Application Integration: Enterprise application integration is an integration framework
composed of a collection of technologies and services which form a middleware or
“middleware framework” to enable integration of systems and applications across an
enterprise.
4. Content-Centric Middleware: Similar to publish/subscribe middleware,
content-centric middleware utilizes provider-consumer abstraction to obtain specific
content.
5. Data Integration: Tools for data integration, such as an enterprise service bus.
6. Device Middleware: A toolset for developing hardware environment-specific
applications.
7. Embedded Middleware: Serving as an intermediary, embedded middleware enables
communication between and an integration interface for embedded applications,
operating systems, and applications.
8. Games Engines: A framework that enables graphics, physics, scripting, or networking.
9. Message-Oriented Middleware (MOM): Infrastructure that supports the transaction of
messages between distributed systems or elements.
10. Object Request Broker (ORB): Object middleware enables the sending of objects and
request services by way of an object oriented system
11. Portals: In reference to enterprise portal servers, this piece of software facilitates
front-end integration as well as interactions between a device and its back-end system.
12. Remote Procedure Call (RPC): A Remote Procedure Call is used synchronously or
asynchronously to call on services from remote systems.
13. Robotic Middleware: Robotic middleware is used to manage the complexity involved
when building a robot, such as robot control and simulation.
14. Transaction Processing (TP): Transcation processing middleware is used in
transaction processing monitors to provide an environment for developing and
deploying disparate applications.
JDBC:
JDBC stands for Java Database Connectivity. JDBC is a Java API to connect and execute the
query with the database. It is a part of JavaSE (Java Standard Edition). JDBC API uses JDBC
drivers to connect with the database. There are four types of JDBC drivers:
JDBC-ODBC Bridge Driver: The JDBC-ODBC bridge driver uses ODBC driver to connect
to the database. The JDBC-ODBC bridge driver converts JDBC method calls into the ODBC
function calls.
Notes Prepared By : Sarvagya Jain
Native Driver:The Native API driver uses the client-side libraries of the database. The driver
converts JDBC method calls into native calls of the database API.
Network Protocol Driver:The Network Protocol driver uses middleware (application server)
that converts JDBC calls directly or indirectly into the vendor-specific database protocol. It is
fully written in java.
Thin Driver:The thin driver converts JDBC calls directly into the vendor-specific database
protocol. That is why it is known as thin driver. It is fully written in Java language.
We can use JDBC API to access tabular data stored in any relational database. By the help of
JDBC API, we can save, update, delete and fetch data from the database. It is like Open
Database Connectivity (ODBC) provided by Microsoft.
Click on the JMS Resource -> Destination Resources -> New, now write the JNDI name and
physical destination name then click on ok button.
}
File: MyListener.java
import javax.jms.*;
public class MyListener implements MessageListener {
RMI Example
In this example, we have followed all the 6 steps to create and run the rmi application. The
client application need only two files, remote interface and client application. In the rmi
Notes Prepared By : Sarvagya Jain
application, both client and server interacts with the remote interface. The client application
invokes methods on the proxy object, RMI sends the request to the remote JVM. The return
value is sent back to the proxy
object and then to the client
application.
3) create the stub and skeleton objects using the rmic tool.
Next step is to create stub and skeleton objects using the rmi compiler. The rmic tool invokes
the RMI compiler and creates stub and skeleton objects.
1. rmic AdderRemote
catch (Exception e) {
System.err.println("ERROR: " + e);
e.printStackTrace(System.out);
}
The life-cycle model shows the design of the architecture as iterating with preliminary requirements analysis.
Clearly, you cannot begin the design until you have some idea of the system requirements. On the other hand, it
does not take many requirements in order for design to begin.
An architecture is "shaped" by some collection of functional, quality, and business requirements. We call these
shaping requirements architectural drivers and we see examples of them in our case studies. The architecture of
the A-7E is shaped by its modifiability and performance requirements. The architecture for the air traffic control
system is shaped by its availability requirements. In the flight simulator software, we will see an architecture
shaped by performance and modifiability requirements. And so on.
To determine the architectural drivers, identify the highest priority business goals. There should be relatively
few of these. Turn these business goals into quality scenarios or use cases. From this list, choose the ones that
will have the most impact on the architecture. These are the architectural drivers, and there should be fewer than
ten. The Architecture Tradeoff Analysis Method uses a utility tree to help turn the business drivers into quality
scenarios.
Once the architectural drivers are known, the architectural design can begin. The requirements analysis process
will then be influenced by the questions generated during architectural design-one of the reverse-direction
arrows
Economics Based Architecture Analysis:
Cost-Benefit Analysis Method:
A cost-benefit analysis is a systematic process that businesses use to analyze which decisions to make and
which to forgo. The cost-benefit analyst sums the potential rewards expected from a situation or action and then
subtracts the total costs associated with taking that action. Some consultants or analysts also build models to
assign a dollar value on intangible items, such as the benefits and costs associated with living in a certain town.
● A cost-benefit analysis (CBA) is the process used to measure the benefits of a decision or taking action
minus the costs associated with taking that action.
Notes Prepared By : Sarvagya Jain
● A CBA involves measurable financial metrics such as revenue earned or costs saved as a result of the
decision to pursue a project.
● A CBA can also include intangible benefits and costs or effects from a decision such as employees
morale and customer satisfaction.
Understanding Cost-Benefit Analysis (CBA)
Before building a new plant or taking on a new project, prudent managers conduct a cost-benefit analysis to
evaluate all the potential costs and revenues that a company might generate from the project. The outcome of
the analysis will determine whether the project is financially feasible or if the company should pursue another
project.
In many models, a cost-benefit analysis will also factor the opportunity cost into the decision-making process.
Opportunity costs are alternative benefits that could have been realized when choosing one alternative over
another. In other words, the opportunity cost is the forgone or missed opportunity as a result of a choice or
decision. Factoring in opportunity costs allows project managers to weigh the benefits from alternative courses
of action and not merely the current path or choice being considered in the cost-benefit analysis.
By considering all options and the potential missed opportunities, the cost-benefit analysis is more thorough and
allows for better decision-making.
The Cost-Benefit Analysis Process
A cost-benefit analysis should begin with compiling a comprehensive list of all the costs and benefits associated
with the project or decision.
The costs involved in a CBA might include the following:
● Direct costs would be direct labor involved in manufacturing, inventory, raw materials, manufacturing
expenses.
● Indirect costs might include electricity, overhead costs from management, rent, utilities.
● Intangible costs of a decision, such as the impact on customers, employees, or delivery times.
● Opportunity costs such as alternative investments, or buying a plant versus building one.
● Cost of potential risks such as regulatory risks, competition, and environmental impacts.
ATAM Process
Steps of ATAM Process :
There are nine steps in the ATAM process as follows.
1. Present ATAM –
Present the concept of the process to all the stakeholders of the process and answer the questions asked
by the participants. This step makes the participants familiar with the process.
Notes Prepared By : Sarvagya Jain
2. Present Business Drivers –
All the participants involved in the presentation are expected to present, understand, and evaluate the
business drivers for the system.
3. Present Architecture –
A brief overview of the architecture is presented by the architect with an appropriate level of detail, i.e.
at least modules and C&C views are discussed.
4. Identify Architectural Approaches –
The architect presents some specific architectural approaches to the team and then the proposed
architecture is discussed.
5. Generate Quality Attribute Utility Tree –
In this step, the core business and technical requirements of the system are defined and then mapped into
an appropriate architectural property. Put all these parts of evaluations, designs, and requirement
elicitation into a tree.
6. Analyze architectural approaches –
Each and every scenario is compared and rated by priority, and then highly rated scenario is mapped
onto the architecture.
7. Brainstorm Scenarios –
The larger stakeholders group present and contribute current scenarios and their concerns.
8. Analyze architectural approaches –
Step 6 is repeated again with added knowledge from larger stakeholders in step.
9. Present results –
At the end of the evaluation, the team reviews the existing and newly discovered risks, non-risks,
sensitivities, and tradeoffs. The team discusses whether any new risk themes have arisen. Then the team
provides all the documentation to the stakeholders.
Phases of ATAM :
The ATAM consists of four phases as follows.
1. Phase 0 –
Preparation, planning, stakeholder recruitment, and team formation takes place in this phase.
Participants are evaluation team key project decision-makers.
2. Phase 1 –
This phase consists of steps 1-6 of the evaluation process. Participants are evaluation team key project
decision-makers. Its typical duration is 1 day followed by a hiatus of 2 to 3 weeks.
3. Phase 2 –
This phase consists of steps 7-9 of the evaluation process. Participants are evaluation team key project
decision-makers and stakeholders. The duration of this phase is 2 days.
4. Phase 3 –
This phase is a follow-up phase. Report generation and delivery of the report is done in this phase. Any
scope of improvement in the process is also looked upon. Participants are the Evaluation team and
evaluation clients. Duration is 1 week.
Outputs of ATAM :
1. A concise presentation of the architecture. The architecture is presented in one hour.
2. Articulation of business goals. This helps the new participants in understanding the business goals.
3. Prioritized quality attribute requirements expressed as quality attribute scenarios.
4. A set of risks and non-risks as follows –
○ A risk is defined as an architectural decision that may lead to undesirable consequences in light
of quality attribute requirements.
○ A non-risk is an architectural decision that may lead to undesirable consequences in light of
quality attributes.
5. A set of risk themes. This set helps the evaluation team to examine all the discovered risk themes that
identify systematic weakness in the architecture, process, and team.
6. Mapping of architectural decisions to quality requirements. For each quality attribute scenario examined
during an ATAM, those architectural decisions that help to achieve it are determined and captured.
Notes Prepared By : Sarvagya Jain
Active Reviews for Intermediate Designs (ARID):
Both Active Design Reviews and ATAM are used to evaluate preliminary designs. In the active design review,
stakeholders receive detailed documentation and then complete exercise questionnaires on their own. ATAM is
used to evaluate whole architecture and not a portion of it.
Both ATAM and ADR’s have strong qualities for evaluating software architectures and designs, but still,
something was needed which could provide an early insight into design strategies. Thus, ARID was born by
combining stakeholder-centric, scenario-based, architecture evaluation method like ATAM and an ARD of
design specifications.
ARID is an easy, lightweight evaluation approach that is made by combining ADR’s and evaluation strategies
like ATAM, which focuses on suitability and does not require complete architectural documentation.
ARID Participants :
The main participants in ARID process are ARID review team (facilitator, scribe, and questioners), software
architect/lead designer, and reviewers.
1. ARID review team : It consists of three roles :
○ Facilitator –
The facilitator works with the software architect to prepare for the review meeting and facilitates
it when it takes place.
○ Scribe –
The scribe captures the issues and results in the review meeting.
○ Questioners –
One or more questioners raise issues, ask questions, and assist with creating scenarios during the
review meeting.
2. Software architect/Lead designer :
The software architect(or designer) is the spokesperson for design and is responsible for preparing and
presenting the design as well as participating in it.
3. The reviewers :
The reviewers are drawn from the community of stakeholders of the design, people who have an interest
in its adequacy and usability, and the software engineers who are expected to use the design.
ARID Steps :
An ARID process progresses across two phases that comprise of nine steps :
Notes Prepared By : Sarvagya Jain
ARID Steps
Phase-1 of ARID is carried out as a meeting between the lead designer and the review facilitator.
○ Step-1 : Identify Reviewers –
The lead designer and facilitator work together to identify the set of people who should be
present at the review.
○ Step-2 : Prepare the design presentation –
Designer prepares a brief explanation of design. Goal of this step is to present design in
sufficient detail so that a knowledgeable audience could use design. Here, during Phase One, the
designer gives a dry run of presentation to review facilitator.
○ Step-3 : Prepare seed scenarios –
Designer and review facilitator prepare a set of seed scenarios. Like seed scenarios in ATAM,
these are designed to illustrate concept of a scenario to reviewers, who have opportunity to see a
sample set.
○ Step-4 : Prepare for the review meeting –
Copies of presentation, seed scenarios, and review agenda are produced for distribution to the
reviewers during main review meeting.
4. During Phase-2, the reviewers assemble and the meeting commences.
5. Step-5 : Present ARID method –
The review facilitator spends 30 minutes explaining the steps of the ARID to the participants.
6. Step-6 : Present design –
The lead designer presents two – hour overview presentation and walks through examples. During this
time, a ground rule is that no questions concerning implementation or rationale are allowed, nor are
suggestions about alternate designs. Goal is to see if design is usable, not to find out why things are
done in a certain way, or to learn about implementation secrets behind interfaces. Questions of factual
clarification are allowed and encouraged. Facilitator enforces this rule during presentation.
During this time, the scribe captures each question, or each instance where designer indicated that sort
of resource (usually a kind of documentation) was on its way nut not yet available. Resulting list is
Notes Prepared By : Sarvagya Jain
summarized to show potential issues that the designer should address before design could be considered
complete and ready for production.
7. Step-7 : Brainstorm and prioritize scenarios –
Just as in ATAM, participants suggests scenarios for using design to solve problems they expect to face.
During brainstorming, all scenarios are given a fair chance. Then seed scenarios are also kept in the
pool. Then, scenarios getting the most votes will be used to test design for usability.
8. Step-8 : Perform review –
Considering highest voted scenario, facilitator asks reviewers to jointly craft code that uses design
services to solve problem posed by scenario. After review of considered scenarios team reach up to a
conclusion.
9. Step-9 : Present conclusion –
At the end, list of issues is recounted, participants are polled for their opinions regarding efficacy of the
review exercise.
Attribute-driven design
Attribute-driven design(also called ADD or Attribute-driven design method) is a methodology to create
software architectures that takes into account the quality attributes of the software. It was previously known as
the Architecture Based Design Method (or ABD), but due to trademark issues the name was changed to
Attribute-driven design around 2001.
ADD as an iterative method that, at each iteration, helps the architect to do the following steps:
● Choose a part of the system to design.
● Marshal all the architecturally significant requirements for the selected part. This means that you select
all quality attributes and business goals that could affect the architecture of this phase.
● Create an architecture for the selected part that meets the selected architecturally significant
requirements and test this design.
Required input
ADD can only be started successfully when the following resources are already available:
● functional requirements
● quality requirements
● constraints
Of course, we cannot wait until all these requirements are finalized since this can take a while. The ADD
process can start once a set of ASRs (architecturally significant requirements, which are the three resources
listed above) are available.
Process steps
1. Choose an element of the system to design
○ Select an element of the system that is not yet designed. In the first iteration this will be the
system itself. Later on, a choice will need to be made between several elements. This choice can
be based on personnel availability, input resources availability, risk mitigation, etc. In case you
do not have any of these limitations, it is suggested to go for a breadth-first strategy.
2. Identify the Architecturally Significant Requirements (ASR) for the chosen element
○ Identify the ASRs that are most important for this selected element. You should prioritize these
requirements to make sure that your design reflects the most important ASRs.
3. Generate a design solution for the chosen element
○ This step is the heart of ADD since the architecture will be created in this step. The architecture
you create should reflect the selected ASRs. You can do this by making use of architectural
patterns or tactics. Most of the times you will have to make a trade-off between several tactics
and ASRs.
4. Inventory remaining requirements and select the input for the next iteration
○ Take a look at the listed ASRs and see whether they are already fulfilled with the design you
have at the moment. For each ASR you will have to check whether it is satisfied, delegated to
one of the children, distributed among the children or whether it can not be satisfied. In the last
case you will need to change your architecture.
Notes Prepared By : Sarvagya Jain
5. Repeat steps 1-4 until all the ASRs have been satisfied
○ Repeat!
Output
A set of sketches of architectural views, not a full-blown detailed architecture.
Architecture Reuse:
A major goal of the software architecture discipline is to develop an environment that promotes the reuse of
components across separate software projects. One of the areas that would most benefit from this reuse is in
product families of similar software products. Many organizations are in the business of creating several closely
related products, whether it be a line of cell phones, cameras, printers, or a banking software suite, each product
will need very similar software, with only slight modifications based on the version being produced. In this
case, two aspects are needed in order to improve the production of such organizations. First, a common
architecture foundation should be shared by each of the products. Second, there should be at least some small
amount of basic code at the core of each product that can be reused without modification.
Identifying a reusable component and its functionality is important to heighten productivity of
component-based software. A component repository is required to facilitate storing and maintaining reusable
software components efficiently. We describe the component repository, which supports facilitating reuse of
software components in component-based software development. Our component repository provides
functionality for component reuse processes such as specification viewing, adapting, testing, and deploying.
Through the component repository with these functions, components can be efficiently reused in component
reuse process
1 Application Layer
This application layer has all the boundary classes that represent the application screens that the user sees.
This layer depends upon the Process Objects layer; that straddles the separation of the client from mid-tier.
2 Business Services layer
The Business Services process layer has all the controller classes that represent the use case managers
that drive the application behavior. This layer represents the client-to-mid-tier border. The Business
Services layer depends upon the Process Objects layer; that straddles the separation of the client from
mid-tier.
3 Middleware layer
The Middleware layer supports access to Relational DBMS and OODBMS.
4 Base Reuse
The Base Reuse package includes classes to support list functions and patterns.
Process View
A description of the process view of the architecture. Describes the tasks (processes and threads) involved in
the system's execution, their interactions and configurations. Also describes the allocation of objects and
classes to tasks.
The Process Model illustrates the course registration classes organized as executable processes. Processes
exist to support student registration, professor functions, registration closing, and access to the external
Billing System and Course Catalog System.
Processes
Notes Prepared By : Sarvagya Jain
Deployment View
A description of the deployment view of the architecture Describes the various physical nodes for the most
typical platform configurations. Also describes the allocation of tasks (from the Process View) to the
physical nodes.
This section is organized by physical network configuration; each such configuration is illustrated by a
deployment diagram, followed by a mapping of processes to each processor.
Notes Prepared By : Sarvagya Jain
Refinement can be seen as the complement of abstraction. Abstraction is concerned with hiding lower levels
of detail; it moves from lower to higher levels. Refinement is the movement from higher levels of detail to
lower levels. Both concepts are necessary in developing software.
Context diagrams
The context diagram is used to establish the context and boundaries of the system to be modelled: which
things are inside and outside of the system being modelled, and what is the relationship of the system with
these external entities.
Notes Prepared By : Sarvagya Jain
A context diagram, sometimes called a level 0 data-flow diagram, is drawn in order to define and clarify the
boundaries of the software system. It identifies the flows of information between the system and external
entities. The entire software system is shown as a single process.
A possible context diagram for the Video-Rental LTD case study is shown below.
The process of establishing the analysis framework by drawing and reviewing the context diagram inevitably
involves some initial discussions with users regarding problems with the existing system and the specific
requirements for the new system. These are formally documented along with any specific system
requirements identified in previous studies.
Having agreed on the framework, the detailed investigation of the current system must be planned. This
involves identifying how each of the areas included within the scope will be investigated. This could be by
interviewing users, providing questionnaires to users or clients, studying existing system documentation and
procedures, observation and so on. Key users are identified and their specific roles in the investigation are
agreed upon.
In order to produce the context diagram and agree on system scope, the following must be identified:
external entities data-flows
You may find the following steps useful:
Identify data-flows by listing the major documents and information flows associated with the system,
including forms, documents, reference material, and other structured and unstructured information (emails,
telephone conversations, information from external systems, etc.).
Identify external entities by identifying sources and recipients of the data-flows, which lie outside of the
system under investigation. The actors an any use case models you have created may often be external
entities.
Draw and label the external entities around the outside of the process box.
Notes Prepared By : Sarvagya Jain
Add the data-flows between the external entities and the system box. Where documents and other packets of
information flow entirely within the system, these should be ignored from the point of view of the context
diagram – at this stage they are hidden within the process box.
This system boundary and details depicted in the context diagram should then be discussed (and updated if
necessary) in consultation with your customers until an agreement is reached.
Having defined the system boundary and scope, the areas for investigation will be determined, and
appropriate techniques for investigating each area will need to be decided.
Variability
Variability is a fundamental aspect of software. It is the ability to create system variants for different market
segments or contexts of use. Variability has been most extensively studied in software product lines , but is
also relevant in other areas, including software ecosystems and context-aware software . Virtually any
successful software eventually faces the need to exist in multiple variants.A software product line is a means
to develop a set of products in which variability is a central phenomenon captured in variability models.
1. Primary presentation shows the elements and the relationships among them that populate the view. The
primary presentation should contain the information you wish to convey about the system (in the
vocabulary of that view) first. It should certainly include the primary elements and relations of the view,
but under some circumstances it might not include all of them. For example, you may wish to show the
elements and relations that come into play during normal operation, but relegate error handling or
exceptional processing to the supporting documentation.
The primary presentation is usually graphical. In fact, most graphical notations make their contributions
in the form of the primary presentation and little else. If the primary presentation is graphical, it must be
accompanied by a key that explains, or that points to an explanation of, the notation or symbology used.
Sometimes the primary presentation can be tabular; tables are often a superb way to convey a large
amount of information compactly. An example of a textual primary presentation is the A-7E module
decomposition view illustrated in. A textual presentation still carries the obligation to present a terse
summary of the most important information in the view.
2. Element catalog details at least those elements and relations depicted in the primary presentation, and
perhaps others. Producing the primary presentation is often what architects concentrate on, but without
backup information that explains the picture, it is of little value.[1] For instance, if a diagram shows
elements A, B, and C, there had better be documentation that explains in sufficient detail what A, B, and
C are, and their purposes or the roles they play, rendered in the vocabulary of the view. For example, a
module decomposition view has elements that are modules, relations that are a form of "is part of," and
properties that define the responsibilities of each module. A process view has elements that are
processes, relations that define synchronization or other process-related interaction, and properties that
Notes Prepared By : Sarvagya Jain
include timing parameters.
To emphasize that it is but a sketch of the complete picture, we call a primary presentation by itself an
architectural cartoon.
In addition, if there are elements or relations relevant to the view that were omitted from the primary
presentation, the catalog is where those are introduced and explained.
The behavior and interfaces of elements are two other aspects of an element catalog; these will be
discussed shortly.
3. Context diagram shows how the system depicted in the view relates to its environment in the vocabulary
of the view. For example, in a component-and-connector view you show which component and
connectors interact with external components and connectors, via which interfaces and protocols.
4. Variability guide shows how to exercise any variation points that are a part of the architecture shown in
this view. In some architectures, decisions are left unbound until a later stage of the development
process, and yet the architecture must still be documented. An example of variability is found in
software product lines where the product line architecture is suitable for multiple particular systems. A
variability guide should include documentation about each point of variation in the architecture,
including
- the options among which a choice is to be made. In a module view, the options are the various versions
or parameterizations of modules. In a component-and-connector view, they might include constraints on
replication, scheduling, or choice of protocol. In an allocation view, they might include the conditions
under which a software element would be allocated to a particular processor.
- the binding time of the option. Some choices are made at design time, some at build time, and others at
runtime.
5. The Architectural background explains why the design reflected in the view came to be. The goal of this
section is to explain to someone why the design is as it is and to provide a convincing argument that it is
sound. An architecture background includes
- rationale, explaining why the decisions reflected in the view were made and why alternatives were
rejected.
- analysis results, which justify the design or explain what would have to change in the face of a
modification.
- assumptions reflected in the design.
6. Glossary of terms used in the views, with a brief description of each.
7. Other information. The precise contents of this section will vary according to the standard practices of
your organization. They might include management information such as authorship, configuration
control data, and change histories. Or the architect might record references to specific sections of a
requirements document to establish traceability. Strictly speaking, information such as this is not
architectural. Nevertheless, it is convenient to record it alongside the architecture, and this section is
provided for that purpose. In any case, the first part of this section must detail its specific contents.
Figure. Documenting a view packet consists of documenting seven parts: (1) the primary presentation; (2)
the element catalog; (3) a context diagram; (4) a variability guide; (5) architecture background, including
rationale, results of analysis, and assumptions made; (6) organization- or project-specific information; and
(7) pointers to the view packet's siblings, parent(s), or children. If the primary presentation is graphical, we
call it a cartoon. A cartoon must be accompanied by a key that explains the notational symbology used or
that points to the place where the notation is explained.
Notes Prepared By : Sarvagya Jain
DOCUMENTING BEHAVIOR
Views present structural information about the system. However, structural information is not sufficient to
allow reasoning about some system properties. Reasoning about deadlock, for example, depends on
understanding the sequence of interactions among the elements, and structural information alone does not
present this sequencing information. Behavior descriptions add information that reveals the ordering of
interactions among the elements, opportunities for concurrency, and time dependencies of interactions (at a
specific time or after a period of time).
Notes Prepared By : Sarvagya Jain
Behavior can be documented either about an element or about an ensemble of elements working in concert.
Exactly what to model will depend on the type of system being designed. For example, if it is a real-time
embedded system, you will need to say a lot about timing properties and the time of events. In a banking
system, the sequence of events (e.g., atomic transactions and rollback procedures) is more important than the
actual time of events being considered. Different modeling techniques and notations are used depending on
the type of analysis to be performed. In UML, sequence diagrams and statecharts are examples of behavioral
descriptions. These notations are widely used.
Statecharts are a formalism developed in the 1980s for describing reactive systems. They add a number of
useful extensions to traditional state diagrams such as nesting of state and "and" states, which provide the
expressive power to model abstraction and concurrency. Statecharts allow reasoning about the totality of the
system. All of the states are assumed to be represented and the analysis techniques are general with respect
to the system. That is, it is possible to answer a question such as Will the response time to this stimulus
always be less than 0.5 seconds?
A sequence diagram documents a sequence of stimuli exchanges. It presents a collaboration in terms of
component instances and their interactions and shows the interaction arranged in time sequence. The vertical
dimension represents time and the horizontal dimension represents different components. Sequence diagrams
allow reasoning based on a particular usage scenario. They show how the system reacts to a particular
stimulus and represent a choice of paths through the system. They make it possible to answer a question such
as What parallel activities occur when the system is responding to these specific stimuli under these specific
conditions?
DOCUMENTING INTERFACES
An interface is a boundary across which two independent entities meet and interact or communicate with
each other. Our definition of software architecture made it clear that elements' interfaces-carriers of the
properties externally visible to other elements-are architectural. Since you cannot perform analyses or system
building without them, documenting interfaces is an important part of documenting architecture.
Documenting an interface consists of naming and identifying it and documenting its syntactic and semantic
information. The first two parts constitute an interface's "signature." When an interface's resources are
invokable programs, the signature names the programs and defines their parameters. Parameters are defined
by their order, data type, and (sometimes) whether or not their value is changed by the program. A signature
is the information that you would find about the program, for instance, in an element's C or C++ header file
or in a Java interface.
Signatures are useful (for example, they can enable automatic build checking), but are only part of the story.
Signature matching will guarantee that a system will compile and/or link successfully. However, it
guarantees nothing about whether the system will operate successfully, which is after all the ultimate goal.
That information is bound up in the semantics to the interface, or what happens when resources are brought
into play.
An interface is documented with an interface specification, which is a statement of element properties the
architect chooses to make known. The architect should expose only what is needed to interact with the
interface. Put another way, the architect chooses what information is permissible and appropriate for people
to assume about the element, and what is unlikely to change. Documenting an interface is a matter of striking
a balance between disclosing too little information and disclosing too much. Too little information will
Notes Prepared By : Sarvagya Jain
prevent developers from successfully interacting with the element. Too much will make future changes to the
system more difficult and widespread and make the interface too complicated for people to understand. A
rule of thumb is to focus on how elements interact with their operational environments, not on how they are
implemented. Restrict the documentation to phenomena that are externally visible.
Elements that occur as modules often correspond directly to one or more elements in a
component-and-connector view. The module and component-and-connector elements are likely to have
similar, if not identical, interfaces and documenting them in both places would produce needless duplication.
To avoid that, the interface specification in the component-and-connector view can point to the interface
specification in the module view, and only contain the information specific to its view. Similarly, a module
may appear in more than one module view-such as the module decomposition or uses view. Again, choose
one view to hold the interface specification and refer to it in the others.