Fundamentals of Software Engineering
Basic Principles of Software Engineering
From the art of software architecture: Design Methods and Techniques
Http://as.wiley.com/WileyCDA/WileyTitle/productCd-0471228869.html
Translated by Liu Jianwen (http://blog.csdn.net/keminlau)
The main task of engineers, according to Pahl (Pahl, 1996), "is to apply their scientific and engineering knowledge to the solution of technical problems, and then to optimize those solutions within the requirements and constraints set by material, logical, economical, legal, environmental, and human-related considerations. "We can extend this definition to define the main task of software engineers. informally, the main task of software engineers is to apply their logic and programming knowledge to the solution of technical and business problems. then they optimize those solutions within the requirements and constraints set by logic (the material of Software Engineering); software technology; and economy mical, legal, environmental, and safety considerations.
According to Pahl's engineering design: a systematic approach, the engineer's main job is to apply their scientific engineering knowledge to solve technical problems, and optimize solutions based on various needs and restrictions, including raw materials, technical, economic, legality, environmental and human-related considerations. We can extend this definition to define the main work of software engineers. In other words, the main task of software engineers is to use their logic and programming knowledge to solve business and technical problems. These solutions must meet various business needs and restrictions, such as logical restrictions, software technical restrictions, economic costs, legitimacy, environmental restrictions and security considerations.
The term engineering, as applied to software, is not always entirely appropriate. I think it assumes too broad of a specialty. I think of software development as involving implements Subdisciplines. these include specialties like database design and implementation, Structured Query Language (SQL), Java, and C ++ programming, and Extensible Stylesheet Language Transformations (XSLT) coding. the specialties can even be finer grained than this. each of these technologies needs specialists just as there are specialists in established engineering disciplines such as electronic and mechanical engineering. in each of these fields there are further specializations. yet we treat software development as if it were a single engineering discipline. it is, in fact, several related disciplines. imagine that a competent developer of XSLT is given very clear specifications, to which a given transformation, or stylesheet, must conform, including well-defined inputs and outputs. the XSLT designer can produce a stylesheet using available tools and methods and possibly reuse parts from an existing library of XSLT. this assumes that we can provide well-defined specifications.
The concept of engineering is not suitable for software development. I think it is too broad. Software development involves many sub-disciplines, including database design and implementation, SQL, Java, C ++ programming, and XSLT. Each sub-discipline has many contents and is also an engineering science. Now we regard software engineering as a single engineering discipline. In fact, software engineering is a mixture of many related engineering disciplines.
I think that the division of software engineering is probably necessary with some combination of technology (databases, Java) and problem domains. of course, having specialties with individual techniques, tools, and methods still poses a problem of engineering sophisticated systems that involve integrating these technologies. this is where the software architect comes in. the software architect cocould be considered a type of software engineer that may not necessarily be a specialist in all of the participating Software Engineering domains. the software specialist is a specialist in architecture design, and understands the varieties of technology well enough to integrate them into a cohesive solution to a complex problem.
I think it is necessary to break down the technical and problem fields of software engineering. Of course, this decomposition comes at a cost, because various independent technologies, tools, and methods need to be integrated together to solve software engineering problems. This is also the responsibility of the software architect. A software architect can be understood as an engineer who does not have to fully master all sub-fields of software engineering. They are dedicated to Architecture Design and understand the differences between various engineering technologies, so as to integrate these technologies to solve complex engineering problems.
It is not uncommon in practice today to divide labor along technology lines. it is common to separate user interface (UI) or presentation development from middle-tier development or back-end development. but without architecture, even this separation of engineering specialties will not necessarily help produce high-quality systems. some authors argue that this separation (called horizontal slicing) is not necessarily valid tive and advocates a vertical slicing where each developer owns a set of functional requirements and implements them front to back. both approaches can be used partition tively. it's more a matter of the skills of the individuals together with the technical leadership and project management techniques.
The decomposition of technical work has become quite common. The UI, middle layer, and backend of the image separation system. Without the decomposition of the architecture, the quality of the system is not guaranteed. Some people think that the efficiency of horizontal sharding is not high. They advocate vertical sharding, which means that each developer is responsible for implementing part of the functional code of the system and further collaborating. Both methods are valid. Either way, there is something very definite, that is, the technical guidance and management of large projects are put on the agenda.
The two primary problems in software development that have yet to be solved satisfactorily are making systems cost valid tive and of higher quality. improving the productivity of software engineers is an important part of making systems cost valid tive. improving the quality of systems is important in order to make them safer and more effective in accomplishing business goals and objectives. improving the quality of the design of a system also aids in achieving cost-effectiveness. A major obstacle to solving these two problems is the complexity inherent in developing software. this is a result of the complexity of the problems being solved, the wide variety of technologies that may be applied, and the fact that software development is almost purely a design activity. (as opposed to other engineering disciplines of which manufacturing is a major time and cost element of the process, in software even writing code is a design activity and cannot be managed like a manufacturing process .)
The two basic problems of software development-cost effectiveness and high quality of the system have been well controlled. The main obstacle to solving these two problems is the inherent complexity of software development. The root cause of complexity is: first, the complexity of the problem to be solved; second, various technologies available for choice; and third, software development is a pure design activity (relative to other engineering disciplines, there is a relatively fixed production time and production costs, writing code for software is also a design task that cannot be controlled by the production process ).
Using current methods, technologies, and programming languages, we are able to solve problems to a certain level of complexity. however, to break through the barriers established by the complexity of the problem to build larger systems, we need to evolve our methods and tools. as systems grow in complexity, certain other quality attributes become more relevant; as the size of a system grows, the number of dimensions of the system also grows. in small systems, we can focus on functional correctness and performance. in large systems, we need to address attributes such as portability, security, reliability, and Modifiability.
Using current technologies, methods, and programming languages, we can solve the complexity of the problem at a certain level. However, to solve the problems faced by a large system, you need to use all the methods and tools together. When the system begins to become complex, these system quality-related attributes become very heavy. In small systems, we can focus on the correctness and performance of system functions. In large systems, we have to consider the flexibility, security, reliability, and maintainability of the system.
There are several fundamental software engineering techniques that can help improve the quality and cost-synchronized tiveness of software:
- Reusable assets
- General-purpose programming versions
- Special-purpose programming versions
- Modeling languages ages and notations
There are four basic technologies that provide software quality and cost efficiency:
- Reusable resources
- General Programming Language
- Dedicated Programming Language
- Modeling Language and graphics
Reusable assets
Code reuse improves the productiunt of the programmer by shortening the amount of time required to implement some functionality. of course, there is a trade-off of time spent discovering, learning, and integrating the reusable code, so reusable code needs to be easy to find, quick to learn, and straightforward to integrate. code reuse manifests itself in the following:
Source code that can be copied and modified to suit or be used as is (for example, C ++ algorithms from a previous ware repository or copied from a book ).
Inclucial off-the-shelf (COTS) components that are available in binary (Compiled) form and that can be imported or linked to other components or applications. This includes:
Binary Code "Libraries" that can be linked into a program at compile time or loaded and bound at run time (for example, a sockets library ).
Operating environments and platforms (for example, operating systems, databases, application servers ).
Code reuse improves the development efficiency of functional modules of programmers. Of course, some trade-offs are used to learn, discover, and integrate these reusable codes. Therefore, reusable codes must be easy to use, easy to learn, and easy to integrate. Code reuse methods include:
- Source code, direct source code that can be copied and modified (such as the C ++ algorithm)
- Commercial (finished) components are binary components that can be introduced and linked in the form:
- The binary code "library" can be linked to a new application or a dynamically bound "library" during the compilation period ";
- Operating environment or platform (such as operating system, database, and Application Server)
Reusable components, especially ones that address large problem spaces, provide a huge boost in productiinstances. imagine if you had to write your own middleware, application server, and database in order to develop a distributed business application. of course, all of those Reusable technologies contain more features than any single application needs but even to develop the subset required by an application is a formidable and time-consuming task.
Reusable components provide great help in development efficiency, especially for locating big problems. Imagine that in order to develop a distributed business application without reusable components, You have to develop middleware, application servers, and databases on your own.
In order to upgrade tively reuse components, we must be able to express our solution in terms of the specified actions of the component. there are times when a participating role action, such as relational entities, doesn' t suit all of our needs, just as a natural language may not have words to express certain concepts. so we invent new technologies just as we invent new words. object-oriented databases are an example of such an exception. when object-oriented programming started to supplant existing structured versions like C and Pascal, a semantic gap was introduced between the representation of information in the programming language and the representation of information in the database. extends papers and books have addressed the object-relational mapping problem. today we have specified ented patterns for object-relational mapping that assist us in overcoming this obstacle.
To use reusable components more effectively, we must be able to express our solutions using abstract words of components. However, sometimes I have to use some unexpected abstract words, such as relational objects. relational objects cannot be completely mixed into the abstract level of OO. It seems that natural language sometimes cannot have some words to express a certain concept, so I use new words to express unknown concepts to solve the problem that relational objects cannot be completely mixed into oo, this is object-oriented database. When object-oriented languages start to crowd out structured languages, such as C and Pascal, the forms of information expressed in programming languages and the forms of information expressed in databases produce semantic faults. Many papers and books have discussed this object-link ing problem. Now we have a detailed mode for dealing with object-link ing.
General-purpose programming versions
Powerful general-purpose programming versions like C ++ and Java provide expressive power for creating solutions to compute complex problems by allowing the programmer to focus on the problem at hand worry less about specific hardware capabilities. general-purpose object-oriented versions don't solve the problem of complexity alone; they must be used in conjunction with guidelines and design patt Erns. How often have you seen a class that was really just a big collection of structured subroutines, such as the god class (riel, 1996 )?
General programming languages, such as C ++ and Java, are powerful in providing powerful expression capabilities for developing complex applications. The general object-oriented language itself is limited in dealing with the complexity of the problem and must be used in conjunction with various modes.
Special-purpose programming versions
Some COTS components have specialized programming ages for creating applications or parts of an application. the versions can be easier to use than general-purpose programming versions for specific problems. for example, when using a relational database component a programmer uses data definition versions (DDL) and SQL to implement a data storage and access solution. SQL is specialized for the domain of relational databases. specialized deployments ages improve productipartition by allowing the developer to think in terms of the specified actions of a specific technology (which is a simpler domain to comprehend) rather than by using the same general-purpose language for all programming problems. if a programmer had to understand how the data was stored in files and how the files were indexed, the problem wocould become much more complex. of course, specialized versions ages introduce complexities of their own. the industry addresses this by developing guidelines and design patterns for the specified tive use of a particle technology. in relational databases, the theory of normal forms was developed to help programmers design databases with certain quality attributes. other examples of specialized versions are WEB presentation technologies such as Active Server Pages (ASP), Java Server Pages (JSP), and Hypertext Preprocessor (PHP ), and Data Representation and transformation syntax ages such as hypertext markup language (HTML), Extensible Markup Language (XML), and Extensible Stylesheet Language Transformations (XSLT ).
Some commercial components use specialized languages to develop applications or applications. For some specific problems, specialized languages are more effective than general languages. For example, when using relational database components, programmers can use Data Definition Language (DDL) and Structured Query Language (SQL) to store and access data. SQL is a special language in the relational database field. Specialized languages can effectively improve development efficiency because they provide programmers with specific language vocabulary to solve specific problems. Unlike general languages, if programmers have to understand how data is stored as files and indexed to use databases, the problem becomes complicated. Of course, specialized languages also have their own complexity. The industry has developed development guidance and design patterns for effective use of dedicated technologies. For example, in relational databases, the paradigm theory provides guidance for developers to design databases.
Modeling languages ages and notations
Modeling versions ages and design notations emerged as methods for improving software design quality. it is argued that an expressive Modeling Notation can expand our capability to design software much like mathematics allows us to reason about more complex things than our minds wocould normally be capable of without such language. the entity relationship digoal (ERD), for example, is a powerful modeling language and notation that allows a software engineer to design and communicate expressive data models. without such a language, it wocould be difficult to think about the information design of a system, and without a notation to represent the diagrams, it wocould be difficult to communicate those designs to others. the formality of the language allows different people to interpret a model in a precise way.
The UML is a rich collection of modeling notations for representing processing aspects or views of a software system, including the information and information flow, class structure, and object interactions. the UML and other modeling versions improve a software engineer's individual capacity to create complex solutions. some UML tools today allow for partial code generation from UML models. it is possible that a language like UML may become a true programming language (either special-purpose or general-purpose) as we have seen in the brief history above, what begins as a notation for representing software design can become the next-generation programming language.