A solution that meets technical as well as operational needs while considering issues like security, manageability and performance is defined as software architecture. It is also defined as a set of rules that are needed to understand the system in terms of software elements and the relation between them. Computer science is complex. Choosing the right data structures and algorithms will initially solve the problem. But with increasing complexity in designs, the data structures and algorithms are not sufficient for a software system. Software architecture is required to design a complex system. Some common software architectural styles are pipe and filter, data abstraction and object-oriented organization, event based implicit implication, layered systems, repositories, blackboard, table-driven interpreters, heterogeneous architectures, interpreted program, client-server and peer-to-peer.
Software architecture can be studied based on four key principles which are:
In this kind of architecture each component has a combination of inputs and outputs. The components are called filters. The input data is read and processed to form larger streams. The outputs become the inputs of the next filter in the pipeline. UNIX shell programs are the best example for pipe and filter architecture.
The object-oriented approach is widely in use. Data operations and representations are encapsulated into an abstract data type or object. All the components in this architecture are represented as objects. The objects are invoked by functions and procedures. The representation is preserved by the object and it is hidden from other objects.
In this kind of architecture, the routines or the functions are explicitly invoked for the components to interact with each other. An event can be registered by other components by connecting a procedure with the event. The system invokes all the registered procedures when an event is announced. The invocation of procedures is caused implicitly.
This architecture operates hierarchically. Each layer only communicates with immediate layers “above” and “below” it. A few layered architecture systems have their inner layers hidden from the outer layers. But a few functions may have access to the inner layers. In these types of systems, a virtual machine is implemented at some layer. The protocols define the connectors based on the interaction of the layers.
This architectural style can be classified as having two distinct types of components. The first one is the central data structure representing the present state, the other is the collection of components that are independent and operate on the central data store. Each system can have different interactions between the repository and the external components.
A virtual machine is produced as software in an interpreter organization. The pseudo-program includes the program and the interpreter’s analog (activation record). The interpretation engine has both the definition of the interpretation engine and its current execution state. The interpreter has 4 components: an interpretation engine, a memory that contains the pseudo-code to be interpreted, a representation of the current state of the interpreter program and a representation of the interpretation engine in its control state.
All the different architectural styles can be combined to achieve heterogeneous style of architecture. Hierarchy helps to combine the architecture. The internal structure of a component may be completely different from the organized architectural style.
There are many more architectural styles; some are widely used while some are specific to the domains. The lesser-known architectural patterns can be classified as