Difference between revisions of "Chapter 3: Software Construction"

From SWEBOK
Jump to: navigation, search
(Reuse)
(Standards in Construction)
Line 26: Line 26:
  
 
===Standards in Construction===
 
===Standards in Construction===
 +
[1*]
  
 
+
Applying external or internal development standards during construction helps achieve a project’s objectives for efficiency, quality, and cost. Specifically, the choices of allowable programming language subsets and usage standards are important aids in achieving higher security. Standards that directly affect construction issues include
 
+
*communication methods (for example, standards for document formats and contents)
 
+
*programming languages (for example, language standards for languages like Java and C++)*coding standards (for example, standards for naming conventions, layout, and indentation)
 
+
*platforms (for example, interface standards for operating system calls)
1.5.
+
*tools (for example, diagrammatic standards for notations like UML (Unified Modeling Language)).  
Standards
+
''Use of external standards''. Construction depends on the use of external standards for construction languages, construction tools, technical interfaces, and interactions between the Software Construction KA and other KAs. Standards come from numerous sources, including hardware and software  interface  specifications  (such  as  the Object Management Group (OMG)) and international organizations (such as the IEEE or ISO). Use of internal standards. Standards may also be created on an organizational basis at the corporate level or for use on specific projects. These standards support coordination of group activities, minimizing complexity, anticipating change, and constructing for verification.
in
+
Construction
+
[1*]
+
Applying external or internal development stan
+
-
+
dards during construction helps achieve a proj
+
-
+
ect’s objectives for efficiency, quality, and cost.  
+
Specifically, the choices of allowable program
+
-
+
ming language subsets and usage standards are  
+
important aids in achieving higher security.
+
Standards that directly affect construction  
+
issues include
+
+
communication methods (for example, stan
+
-
+
dards for document formats and contents)
+
+
programming languages (for example, lan
+
-
+
guage standards for languages like Java and  
+
C++)
+
+
coding standards (for example, standards for  
+
naming conventions, layout, and indentation)
+
+
platforms (for example, interface standards  
+
for operating system calls)
+
3-4
+
SWEBOK® Guide
+
V3.0
+
+
tools (for example, diagrammatic standards  
+
for notations like UML (Unified Modeling  
+
Language)).
+
Use
+
of
+
external
+
standards.
+
Construction  
+
depends on the use of external standards for con
+
-
+
struction languages, construction tools, technical  
+
interfaces, and interactions between the Software  
+
Construction KA and other KAs. Standards come  
+
from numerous sources, including hardware and  
+
software  interface  specifications  (such  as  the  
+
Object Management Group (OMG)) and interna
+
-
+
tional organizations (such as the IEEE or ISO).
+
Use
+
of
+
internal
+
standards.
+
Standards may also  
+
be created on an organizational basis at the cor
+
-
+
porate level or for use on specific projects. These  
+
standards support coordination of group activi
+
-
+
ties, minimizing complexity, anticipating change,  
+
and constructing for verification.
+
  
 
==Managing Construction==
 
==Managing Construction==

Revision as of 18:04, 22 August 2015

1 Software Construction Fundamentals

1.1 Minimizing Complexity

[1*]

Most people are limited in their ability to hold complex structures and information in their working memories, especially over long periods of time. This proves to be a major factor influencing how people convey intent to computers and leads to one of the strongest drives in software construction: minimizing complexity. The need to reduce complexity applies to essentially every aspect of software construction and is particularly critical to testing of software constructions. In software construction, reduced complexity is achieved through emphasizing code creation that is simple and readable rather than clever. It is accomplished through making use of standards (see section 1.5, Standards in Construction), modular design (see section 3.1, Construction Design), and numerous other specific techniques (see section 3.3, Coding). It is also supported by construction-focused quality techniques (see section 3.7, Construction Quality).

1.2 Anticipating Change

[1*]

Most software will change over time, and the anticipation of change drives many aspects of software construction; changes in the environments in which software operates also affect software in diverse ways. Anticipating change helps software engineers build extensible software, which means they can enhance a software product without disrupting the underlying structure. Anticipating change is supported by many specific techniques (see section 3.3, Coding).

1.3 Constructing for Verification

[1*]

Constructing for verification means building software in such a way that faults can be readily found by the software engineers writing the software as well as by the testers and users during independent testing and operational activities. Specific techniques that support constructing for verification include following coding standards to support code reviews and unit testing, organizing code to support automated testing, and restricting the use of complex or hard-to-understand language structures, among others.

1.4 Reuse

[2*]

Reuse refers to using existing assets in solving different problems. In software construction, typical assets that are reused include libraries, modules, components, source code, and commercial off-the-shelf (COTS) assets. Reuse is best practiced systematically, according to a well-defined, repeatable process. Systematic reuse can enable significant software productivity, quality, and cost improvements. Reuse has two closely related facets:"construction for reuse" and "construction with reuse." The former means to create reusable software assets, while the latter means to reuse software assets in the construction of a new solution. Reuse often transcends the boundary of projects, which means reused assets can be constructed in other projects or organizations.

1.5 Standards in Construction

[1*]

Applying external or internal development standards during construction helps achieve a project’s objectives for efficiency, quality, and cost. Specifically, the choices of allowable programming language subsets and usage standards are important aids in achieving higher security. Standards that directly affect construction issues include

  • communication methods (for example, standards for document formats and contents)
  • programming languages (for example, language standards for languages like Java and C++)*coding standards (for example, standards for naming conventions, layout, and indentation)
  • platforms (for example, interface standards for operating system calls)
  • tools (for example, diagrammatic standards for notations like UML (Unified Modeling Language)).

Use of external standards. Construction depends on the use of external standards for construction languages, construction tools, technical interfaces, and interactions between the Software Construction KA and other KAs. Standards come from numerous sources, including hardware and software interface specifications (such as the Object Management Group (OMG)) and international organizations (such as the IEEE or ISO). Use of internal standards. Standards may also be created on an organizational basis at the corporate level or for use on specific projects. These standards support coordination of group activities, minimizing complexity, anticipating change, and constructing for verification.

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.