Chapter 3: Software Construction
Contents
- 1 Software Construction Fundamentals
- 2 Managing Construction
- 3 Practical Considerations
- 4 Construction Technologies
- 4.1 API Design and Use
- 4.2 Object-Oriented Runtime Issues
- 4.3 Parameterization and Generics
- 4.4 Assertions, Design by Contract, and Defensive Programming
- 4.5 Error Handling, Exception Handling, and Fault Tolerance
- 4.6 Executable Models
- 4.7 State-Based and Table-Driven Construction Techniques
- 4.8 Runtime Configuration and Internationalization
- 4.9 Grammar-Based Input Processing
- 4.10 Concurrency Primitives
- 4.11 Middleware
- 4.12 Construction Methods for DistributedSoftware Constructing Heterogeneous Systems
- 4.13 Performance Analysis and Tuning
- 4.14 Platform Standards
- 4.15 Test-First Programming
- 5 Software Construction Tools
1 Software Construction Fundamentals
1.1 Minimizing Complexity
1.2 Anticipating Change
1.3 Constructing for Verification
1.4 Reuse
1.5 Standards in Construction
2 Managing Construction
2.1 Construction in Life Cycle Models
[1*]
Numerous models have been created to develop software; some emphasize construction more than others. Some models are more linear from the construction point of view—such as the waterfall and staged-delivery life cycle models. These models treat construction as an activity that occurs only after significant prerequisite work has been completed—including detailed requirements work, extensive design work, and detailed planning. The more linear approaches tend to emphasize the activities that precede construction (requirements and design) and to create more distinct separations between activities. In these models, the main emphasis of construction may be coding. Other models are more iterative—such as evolutionary prototyping and agile development. These approaches tend to treat construction as an activity that occurs concurrently with other software development activities (including requirements, design, and planning) or that overlaps them. These approaches tend to mix design, coding, and testing activities, and they often treat the combination of activities as construction (see the Software Management and Software Process KAs). Consequently, what is considered to be “construction” depends to some degree on the life cycle model used. In general, software construction is mostly coding and debugging, but it also involves construction planning, detailed design, unit testing, integration testing, and other activities.
2.2 Construction Planning
[1*]
The choice of construction method is a key aspect of the construction-planning activity. The choice of construction method affects the extent to which construction prerequisites are performed, the order in which they are performed, and the degree to which they should be completed before construction work begins. The approach to construction affects the project team’s ability to reduce complexity, anticipate change, and construct for verification. Each of these objectives may also be addressed at the process, requirements, and design levels—but they will be influenced by the choice of construction method. Construction planning also defines the order in which components are created and integrated, the integration strategy (for example, phased or incremental integration), the software quality management processes, the allocation of task assignments to specific software engineers, and other tasks, according to the chosen method.
2.3 Construction Measurement
[1*]
Numerous construction activities and artifacts can be measured—including code developed, code modified, code reused, code destroyed, code complexity, code inspection statistics, fault-fix and fault-find rates, effort, and scheduling. These measurements can be useful for purposes of managing construction, ensuring quality during construction, and improving the construction process, among other uses (see the Software Engineering Process (KA for more on measurement).
3 Practical Considerations
3.1 Construction Design
3.2 Construction
3.3 Coding
3.4 Construction Testing
3.5 Construction for Reuse
3.6 Construction with Reuse
3.7 Construction Quality
3.8 Integration
4 Construction Technologies
4.1 API Design and Use
4.2 Object-Oriented Runtime Issues
4.3 Parameterization and Generics
4.4 Assertions, Design by Contract, and Defensive Programming
4.5 Error Handling, Exception Handling, and Fault Tolerance
4.6 Executable Models
4.7 State-Based and Table-Driven Construction Techniques
4.8 Runtime Configuration and Internationalization
4.9 Grammar-Based Input Processing
4.10 Concurrency Primitives
4.11 Middleware
4.12 Construction Methods for DistributedSoftware Constructing Heterogeneous Systems
4.13 Performance Analysis and Tuning
4.14 Platform Standards
4.15 Test-First Programming
5 Software Construction Tools
5.1 Development Environments
[1*]
A development environment, or integrated development environment (IDE), provides comprehensive facilities to programmers for software construction by integrating a set of development tools. The choices of development environments can affect the efficiency and quality of software construction. In additional to basic code editing functions, modern IDEs often offer other features like compilation and error detection from within the editor, integration with source code control, build/test/debugging tools, compressed or outline views of programs, automated code transforms, and support for refactoring.
5.2 GUI Builders
[1*]
A GUI (Graphical User Interface) builder is a software development tool that enables the developer to create and maintain GUIs in a WYSIWYG (what you see is what you get) mode. A GUI builder usually includes a visual editor for the developer to design forms and windows and manage the layout of the widgets by dragging, dropping, and parameter setting. Some GUI builders can automatically generate the source code corresponding to the visual GUI design. Because current GUI applications usually follow the event-driven style (in which the flow of the program is determined by events and event handling), GUI builder tools usually provide code generation assistants, which automate the most repetitive tasks required for event handling. The supporting code connects widgets with the outgoing and incoming events that trigger the functions providing the application logic. Some modern IDEs provide integrated GUI builders or GUI builder plug-ins. There are also many standalone GUI builders.
5.3 Unit Testing Tools
[1*] [2*]
Unit testing verifies the functioning of software modules in isolation from other software elements that are separately testable (for example, classes, routines, components). Unit testing is often automated. Developers can use unit testing tools and frameworks to extend and create automated testing environment. With unit testing tools and frameworks, the developer can code criteria into the test to verify the unit’s correctness under various data sets. each individual test is implemented as an object, and a test runner runs all of the tests. During the test execution, those failed test cases will be automatically flagged and reported.
5.4 Profiling, Performance Analysis, and Slicing Tools
[1*]
Performance analysis tools are usually used to support code tuning. The most common performance analysis tools are profiling tools. An execution profiling tool monitors the code while it runs and records how many times each statement is executed or how much time the program spends on each statement or execution path. Profiling the code while it is running gives insight into how the program works, where the hot spots are, and where the developers should focus the code tuning efforts.Program slicing involves computation of the set of program statements (i.e., the program slice) that may affect the values of specified variables at some point of interest, which is referred to as a slicing criterion. Program slicing can be used for locating the source of errors, program understanding, and optimization analysis. Program slicing tools compute program slices for various programming languages using static or dynamic analysis methods.