





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






Architecture plays a central role in building construction. A building’s architecture is described using a set of plans that, taken together, represent all aspects of the building. It describes the building from such viewpoints as electricity, plumbing, structure, etc.
The architect is the person in charge of the whole project. He or she has the responsibility to make sure that the building will be solid, cost-effective and satisfactory to the client. Software architecture is similar. It plays a central role in software engineering, and involves the development of a variety of high-level views of the system. Furthermore, individuals called software architects often lead a team of other software engineers.
The term ‘software architecture’ is also applied to the documentation produced as a result of the process. For clarity, this documentation is often also called the architectural model.
Definition: software architecture is the process of designing the global organization of a software system, including dividing software into subsystems, deciding how these will interact, and determining their interfaces.
Software engineers discuss all aspects of a system’s design in terms of the architectural model. Decisions made while this model is being developed therefore have a profound impact on the rest of the design process. The architectural model is the core of the design; therefore all software engineers need to understand it.
The architectural model will often constrain the overall efficiency, reusability and maintainability of the system. Poor decisions made while creating this model will constrain subsequent design.
There are four main reasons why you need to develop an architectural model: ■ To enable everyone to better understand the system. As a system becomes more and more complex, making it understandable is an increasing challenge. This is especially true for large, distributed systems that use sophisticated technology. ■ To allow people to work on individual pieces of the system in isolation. The work of developing a complex software system must be distributed among a large number of people. The architecture allows the planning and coordination of this distributed work. The architecture should provide sufficient information so that the work of the individual people or teams can later on be integrated to form the final system
■ To prepare for extension of the system. With a complete architectural model,it becomes easier to plan the evolution of the system. Subsystems that are envisioned to be part of a future release can be included in the architecture, even though they are not to be developed immediately. It is then possible to see how the new elements will be integrated, and where they will be connected to the system.
■ To facilitate reuse and reusability. The architectural model makes each system component visible. This is an important benefit since it encourages reuse. By analyzing the architecture, you can discover those components that can be obtained from past projects or from third parties.
A system’s architecture will often be expressed in terms of several different views. These can include:
■ The logical breakdown into subsystems. This is often shown using package diagrams, which we will describe later. The interfaces among the subsystems must also be carefully described. ■ The dynamics of the interaction among components at run time, perhaps expressed using interaction or activity diagrams. ■ The data that will be shared among the subsystems, typically expressed using class diagrams. ■ The components that will exist at run time, and the machines or devices on which they will be located. This information can be expressed using
The system’s architecture must take its overall shape very early in the design process, although it will continue to mature as iterative development proceeds. The basis for the architectural model will be the system domain model and the use cases. The first draft of the architectural model should be created at the same time as these. These give the architect an idea about which components will be needed and how they will interact. At the same time, the early architecture will give use case modelers guidance about the steps the user will need to perform.
The following are some steps that you can use iteratively as you refine the architecture.
A deployment diagram describes the hardware where various instances of components reside at run time. An example is shown in Figure. A node in a deployment diagram represents a computational unit such as a computer, a processing card, a sensor or a device. It appears as a three-dimensional box. The links between nodes show how communication takes place. Each node of a deployment diagram can include one or several run-time software components. Various artifacts such as files can also be shown inside nodes.
The notion of patterns can be applied to software architecture. In this chapter we present several of the most important architectural patterns , which are also often called architectural styles. Each allows you to design flexible systems using components that are as independent of each other as possible.
Building software in layers is a classical architectural pattern that is used in many systems. It is so important that layer cohesion was one of the types of cohesion we presented earlier when discussing Design Principle 2. As we discussed, in layered systems each layer communicates only with the layers below it – in many cases, only the layer immediately below it. Each layer has a well-defined API, defining the services it provides. A complex system can be built by superimposing layers at increasing levels of abstraction. The Multi-Layer architectural pattern makes it possible to replace a layer by an improved version, or one with a different set of capabilities. It is particularly important to have a separate layer at the very top to handle the user interface. Independence of the UI layer allows the application to have several different UIs. These could be UIs running on different platforms, UIs for ‘professional’ versus ‘standard’ versions of the application, or UIs designed
for different locales (discussed in Chapter 7). We will look at the UI layer in more detail below when we discuss the Model–View–Controller architectural pattern. Layers immediately below the UI layer provide the application functions determined by the use cases. Layers at the bottom provide services such as data storage and transmission. This is illustrated in Figure.
Most operating systems are built according to the Multi-Layer architectural pattern, as shown in Figure. A low-level kernel layer deals with such functions as process creation, swapping, and scheduling. Higherlevel layers deal with such functions as user account management, screen display, etc. The layers are often further subdivided into smaller subsystems.
Most communications systems exhibit a layered architecture. A simplified illustration of this is shown in Figure. At the bottom level, there are facilities for transmitting and receiving signals. Above this is a layer that deals with splitting messages into packets and reconstructing messages that are received. Still higher is a layer that deals with handling ongoing connections with a remote host (e.g. using sockets). At the top is a layer that handles various protocols, such as http, used by application programs.
The Multi-Layer architectural pattern helps you adhere to many of the design principles discussed earlier, in particular:
look up the addresses of clients
Distributed architectures help you adhere to design principles such as the following:
The idea of the Broker architectural pattern is to distribute aspects of the software system transparently to different nodes. This is illustrated in Figure.
Using the Broker architecture, an object can call methods of another object without knowing that this object is remotely located. The use of the Proxy design pattern can help achieve this goal. A Proxy object calls the broker, which determines where the remote object can be found. CORBA is a well-known open standard that allows you to build this kind of architecture – it stands for Common Object Request Broker Architecture. Java has many classes that allow you to use CORBA facilities. There are also several other commercial architectures that also provide broker capabilities.
The Broker architectural pattern
The Broker pattern is particularly useful in helping you follow these design principles:
The Pipe-and-Filter architectural pattern is also often called the transformational architectural pattern. It works as follows. A stream of data, in a relatively simple format, is passed through a series of processes, each of which transforms it in some way. The series of processes is called a pipeline. Data is constantly fed into the pipeline; the processes work concurrently (conceptually at least) so that data is also constantly emerging from the pipeline. The strength of this pattern is that the system can be modified easily by adding or changing the transformational processes. This is easiest if, at most stages of the pipeline, the data has the same general form.
A pipe-and-filter architecture for sound processing
The Pipe-and-Filter architectural pattern allows us to adhere to the following design principles: