[Enter Post Title Here]
Defining Software Architecture
A common definition …
The software architecture of a program or computing system is the structure or structures of the system, which comprise software elements the externally visible qualities of those elements, and the relationships among them. By analogy the architecture of a building has to take into account the use of the building, what are the people living/working in it expecting and then has to define the size, shape, structure and so forth. The architecture has a set of guiding principles as well as known criteria and constraints that shape the proposed architecture. The designers then have to develop detailed specifications not only for the selection of materials but the placement of wiring, plumbing, lighting and so forth. Finally the building is finished and populated in accordance with the vision outlined prior to the first pen touching the draftsmen’s paper. Architecture strictly from a software engineering point of view. That is, we will explore the value that software architecture brings to a development project in addition to the value returned to the enterprise. The study of software architecture has evolved by observation of the design principles that designer's follow and the actions that they take when working on real systems. It is an attempt to abstract the commonalities inherent in system design, and as such it must account for a wide range of activities, concepts, methods, approaches, and results.
Let's look at some of the implications of this definition in more detail.
First, architecture defines software elements . The architecture embodies information about how the elements relate to each other. This means that it specifically omits certain information about elements that does not pertain to their interaction. Thus, an architecture is foremost an abstraction of a system that suppresses details of elements.
Second, the definition makes clear that systems can and do comprise more than one structure and that no one structure can irrefutably claim to be the architecture. For example, all nontrivial projects are partitioned into implementation units; these units are given specific responsibilities and are frequently the basis of work assignments for programming teams.
Third, the definition implies that every computing system with software has software architecture because every system can be shown to comprise elements and the relations among them.
Fourth, the behavior of each element is part of the architecture in so far as that behavior can be observed or discerned from the point of view of another element. Such behavior is what allows elements to interact with each other, which is clearly part of the architecture.
Finally, the definition is indifferent as to whether the architecture for a system is a good one or a bad one , meaning that it will allow or prevent the system from meeting its behavioral, performance, and life-cycle requirements.
Design Patterns
A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations. Each pattern is a three-part rule, which expresses a relation between a certain context, a problem, and a solution. It also expresses a relation between a certain context, a certain system of forces that occurs repeatedly in that context, and a certain software configuration that allows these forces to resolve themselves. A pattern for software architecture describes a particular recurring design problem that arises in specific design contexts and presents a well-proven generic scheme for its solution.
Design patterns can be classified as follows:
„ Fundamental patterns
„ Creational patterns
„ Structural patterns
„ Behavioral patterns
„ Concurrency patterns
„ Architectural patterns
Documentation
The documentation for a design pattern should contain enough information about the problem that the pattern addresses, the context in which it is used, and the suggested solution.
A commonly used format is the one used by the Gang of Four. It contains the following sections:
Pattern Name and Classification: Every pattern should have a descriptive and unique name that helps in identifying and referring to it. Additionally, the pattern should be classified according to a classification such as the one described earlier. This classification helps in identifying the use of the pattern.
Intent: This section should describe the goal behind the pattern and the reason for using it. It resembles the problem part of the pattern.
Also Known As: A pattern could have more than one name. These names should be documented in this section.
Motivation(Forces): This section provides a scenario consisting of a problem and a context in which this pattern can be used. By relating the problem and the context, this section shows when this pattern is used.
Applicability: This section includes situations in which this pattern is usable. It represents the context part of the pattern.
Structure: A graphical representation of the pattern. Class diagrams and Interaction diagrams can be used for this purpose.
Participants: A listing of the classes and objects used in this pattern and their roles in the design.
Collaboration: Describes how classes and objects used in the pattern interact with each other.
Consequences: This section describes the results, side effects, and trade offs caused by using this pattern.
Implementation: This section describes the implementation of the pattern, and represents the solution part of the pattern. It provides the techniques used in implementing this pattern, and suggests ways for this implementation.
Sample Code: An illustration of how this pattern can be used in a programming language
Known Uses: This section includes examples of real usages of this pattern.
Related Patterns: This section includes other patterns that have some relation with this pattern, so that they can be used along with this pattern, or instead of this pattern. It also includes the differences this pattern has with similar patterns.
