The Prerequisite of Software Architecture I Learned from Code Complete

Contents

Software Architecture

  • Describe in single document
  • Close to the requirement
  • Design constraints that apply systemwide
  • Change of the architecture is expensive during the construction

Typical Architectural Components

  • If you are building the whole system yourself, your work on the architecture will overlap your work on the more detailed design
  • If the architecture is designed by someone, you should be able to find the important components by yourself
  • The architecture provides the rationale for the system organization and show that each class has been carefully considered
  • The architecture should define the major building blocks in a program
    • single class
    • subsystem consisting of many class
    • routine work together on high level function
  • Building block should have one area of responsibility
  • Minimizing what each building block knows about other building blocks
  • The communication rules for each building block should be well defined
  • Identify the responsibilities of each major class
  • Specify the 20 percent of the class that make up 80 percent of the system behavior
  • Data should normally be accessed directly by only one subsystem or class
  • It should describe alternatives that were considered and justify the choices that were made.
  • If the architecture depends on the specific business rule, the impact to the system from it should be described
  • Should be specified in the software architecture
  • The architecture should be modularized so that a new user interface can be substituted without effect the business rules and output of the program
  • Memory constraint
  • Network connections
  • Rules for handling untrusted data
    • user input
    • cookies
    • configuration
  • Encryption
  • Level of detail contained in error messages
  • Protect secrete data in memory
  • Speed vs memory
  • Space and time budgets for each class or object
  • Ability of a system to grow to meet future of the demands
    • Number of user
    • Number of server
    • Size of database record
    • Number of network nodes
  • If the system is not expected to grow and scalability is not the issue
  • Share data or resource with other software or hardware should be described
  • program to support multiple locales
  • One of the thorniest problem
  • Handle them consistently should be spelled out in the architecture
  • Is error corrective or merely detective?
  • How does the program propagate error?
    • Immediately discard the data that caused the error and enter the error processing state
    • Wait until all the process complete
  • What are the conventions for handling error messages?
  • Level of responsibility of each class
    • Each class validate their own data
    • Group of class responsible for validate the data
    • Can class at any level assume that the data received are clean?
  • The architecture should indicate the kind of fault tolerance expected
  • If infeasible in any area could render the project unworkable, the architecture should indicate how those issues have been investigate through PoC or research
  • These risk should be resolved before full-scale construction begin
  • An architecture specifies a more robust system than that specified by the requirement
  • The most radical solution to build software is not to build it at all
    • buy it instead
    • use open-source
  • If the architecture isn’t using off the shelf components, it should explain how self built component surpass ready make libraries and components
  • Making the architecture flexible enough to accommodate likely changes
  • The strategy for handling change should be described
  • The problem with large system is to maintain the conceptual integrity and consistency
  • Good software architecture is largely machine and language independent
  • Identify the risk