This is the most commonly used technology. One big problem, continued dismantling for various small issues are analyzed and then grouped together. In the West, known as Divide and Conquer Principle (principle of divide and rule).In an era of structured programming, promotion of modular (Modularization). First software engineer complexity of component-based software (Component Based Software). Do not know is not got inspired from the LEGO will be split into different components in the system, their implementation, and then assembled together.In the schema design, whether it's C/S style, layering, and N-Tier,SOA, and front component, are broken down, they have more emphasis on combination interaction. Design, function, and interface is defined, it can be developed. Interaction is then limited to the interface layer, you can better control the complexity of the system as a whole.For example using a voice application layer library (Speech Library, a library in the form of modular applications), just don't care about their internal implementation, as long as the API you can learn how to use it.Improved thanks to reduced complexityImproved dependency: -Without relying on the ring -The stable dependencies principle (SDP)Decomposition reduces the level of complexity of the system, but there is also a complexity cannot be resolved, namely, dependency problems. Agile software development: principles, patterns, and practices about dependency discussed in great detail. As the participants increased interaction will become complicated. And the current scale of software, API SDK on your system, the API Framework, various third party libraries more dependency between modules will be more and more complicated.Apparently too many modules or components in the system, need further sorting. But the real problem is bi-directional and circular dependencies. Pictured above is responsible for calculating Computing modules to the UI module, perhaps because the UI layer holds a key parameter required. If the UI changes, it may affect the Computing, unpredictable behavior occurs, and give customers the impression of instability.So the dependencies between modules must be simplified, no circular dependency occurs. A case study of Chromium and its dependence on each module has a strict definition, and DEPS at compile-time to ensure programmers make mistakes. Below is the definition of Chromium Component dependencies and dependencies of the Component within the directory has also defined:When APIs rely on the upper module implementation, through dependency inversion (DIP) to deal with. In simple terms is the underlying module defines an interface that requires upper module and into the underlying modules.Using abstraction to reduce complexityHuman learning process is the most effective way is to classify, the use of which is abstract. Face the vagaries of the weather, human beings through the abstract shapes of clouds, it is possible to predict weather changes. Here's an abstract modeling of process.Abstract object-oriented language is not exclusive, in fact, it and language-independent, is essentially a way of thinking. The biggest difference between it and separated, abstract emphasis on the details hidden, focusing only on core essence. While the latter decomposition and combination of attention to detail.To fixed points of the most efficient routes for example. From the perspective of separation, can be broken down into the following questions:Walking time required?How long does it take public transportation?Taxi in how much time?Combinations above answer, then assess which one is the most efficient way.From an abstract point of view, the solution would be:Loop through all possible means of transport, and takes a minimum of: 1. the walk 2. take public transportation 3. by taxiGiven an abstract idea, details, further implementation. Higher power lies in its abstraction to achieve stability, and most can be used for curing core design. In the process of development, often around the details of the discussion seems to abstract too virtual. But if there is no abstraction to build system design-panoramic, some of the discussion will become inefficient.Agile software development: principles, patterns, and practice, uncle Martin in a simple abstract class in the total number of ratio as a measure of abstraction, combined with the stability of the measure used to evaluate a design. Details can refer to the concept paper on principles of component design (c).Based on common principles to reduce complexityDesign and implementation unnecessarily abstractions or decomposition, is also a kind of complexity. Considering scalability needs to consider that can occur is also determined, otherwise introduce unnecessary complexity. It is also advocated by Agile Design.Some common names often implies the design. For example, Observer, Client, Adapter, and so on. We have to learn these patterns, also to be accurately named. Otherwise it is easy to understand the problem.SummarySoftware design is a balancing process, software complexity of the system maintainability, scalability, and flexibility. We look the previous define software design of three principles: modularity, abstraction, and information hiding. McCabe also had papers devoted to the application of cyclomatic complexity measure the complexity of the design, but has a long history. Now come to rely on to assess the relationship between the complexity of the design will be more effective. Have interest to know the CppDepend. Other Google engineers are based on LLVM IR implemented a tool for dependency analysis (Generateing Precise Dependencies for Large Software).
正在翻譯中..