Friday, February 28, 2014

Principles of Software Architecture

Key Design Principles
When getting started with application design, keep in mind the key principles that will help to create an architecture that adheres to proven principles, minimizes costs and maintenance requirements, and promotes usability and extendability. The key principles are:
  • Separation of concerns. Divide application into distinct features with as little overlap in functionality as possible. The important factor is minimization of interaction points to achieve high cohesion and low coupling. However, separating functionality at the wrong boundaries can result in high coupling and complexity between features even though the contained functionality within a feature does not significantly overlap.
  • Single Responsibility principle. Each component or module should be responsible for only a specific feature or functionality, or aggregation of cohesive functionality.
  • Principle of Least Knowledge (also known as the Law of Demeter or LoD). A component or object should not know about internal details of other components or objects.
  • Don’t repeat yourself (DRY). In terms of application design, specific functionality should be implemented in only one component; the functionality should not be duplicated in any other component.
  • Minimize upfront design. Only design what is necessary. In some cases, it might require upfront comprehensive design and testing if the cost of development or a failure in the design is very high. In other cases, especially for agile development, big design upfront (BDUF) can be avoid. If  application requirements are unclear, or if there is a possibility of the design evolving over time, avoid making a large design effort prematurely. This principle is sometimes known as YAGNI ("You ain’t gonna need it").
Key Design Considerations
The major design considerration listed as follow:
  • Determine the Application Type
  • Determine the Deployment Strategy
  • Determine the Appropriate Technologies
  • Determine the Quality Attributes
  • Determine the Crosscutting Concerns
Below figure illustrates common application architecture with components grouped by different areas of concern.