Deep understanding of software construction systems: Principles and Best Practices

Source: Internet
Author: User
Deep understanding of software construction systems: Principles and Best Practices
Basic Information
Original Title: software build systems: Principles and experience
Original Publishing House: Pearson Education
Author: (plus) Peter Smith
Translator: Zhong Tian
Series name: Professional developer Series
Press: Machinery Industry Press
ISBN: 9787111382263
Mounting time:
Published on: February 1, June 2012
Start: 16
Page number: 1
Version: 1-1
Category: Computer> Software Engineering and software methodology> comprehensive

For more information, deep understanding of software construction systems: Principles and Best Practices

Introduction
Computer books
The constructor is at the core of the software development process. Its correctness and performance determine the quality of the software development results and the efficiency of the software development process to a certain extent. As an expert in the software construction system, the author summarizes his years of experience in the development and maintenance of the construction system, and analyzes the principles of the software construction system in a simple way, some of the most popular construction tools are compared and analyzed through various practical use cases. In addition, some advanced topics such as performance optimization and scale improvement of the construction system are discussed.
Deep understanding of software construction systems: principles and best practices are divided into four parts. Part 1: Basic knowledge, 1st ~ Chapter 5 introduces the concepts of the Construction System from the following aspects: the high-level concept of the construction system, the Construction System Based on make, the runtime view of the program, the file type and compilation tool, the sub-object and the construction variable. and related topics. Part 2: constructor, 6th ~ Chapter 10 analyzes and compares the five construction tools GNU make, ant, scons, cmake, and Eclipse IDE based on actual scenarios and helps readers understand the current situation of the construction tool, understand the advantages and disadvantages of each tool. Part 3: advanced topics, 11th ~ Chapter 16 discusses dependency, metadata, software packaging and installation, machine construction, tool management, and other high-level topics to help readers understand many advanced topics about building a constructor, learn best practices. Part 4: scale up, 17th ~ Chapter 19 discusses how to reduce complexity, increase the construction speed, and help readers understand how to design a small construction system that can adapt to the scale-up in a large-scale system construction environment, so as to have a better understanding of the software construction system.
The "deep understanding of software construction systems: Principles and Best Practices" is suitable for software developers, including software developers, project managers, and software construction professionals.
Directory
Deep understanding of software construction systems: Principles and Best Practices
Praise for this book
Translator's preface
Preface
Thank you
Introduction
Part 1 Basic Knowledge
Chapter 2 Structure System Overview 2
1.1 What is constructor 2
1.1.1 compiled language 3
1.1.2 interpreted language 3
1.1.3 web application 4
1.1.4 Unit Test 5
1.1.5 static analysis 5
1.1.6 document generation 6
1.2 components of the construction system 6
1.2.1 version control tool 7
1.2.2 source and target trees 7
1.2.3 compilation tool and construction tool 8
1.2.4 construct machine 9

. 1.2.5 release package and target machine 9
1.3 Construction Process and description 11
1.4 How to Use the construction system 12
Build management tool 12
1.5 construction system quality 13
Chapter 14
Chapter 1 make-based constructor 15
2.1 calculator example 15
2.2 create a simple makefile17
2.3 simplify this makefile 19
2.4 additional construction task 20
2.5 framework application 21
Chapter 23
Chapter 4 runtime of a program 24
3.1 executable program 24
3.1.1 native machine code 25
3.1.2 single system image 25
3.1.3 full interpretation of procedures 26
3.1.4 interpreted bytecode 26
3.2 library 28
3.2.1 static link 28
3.2.2 dynamic link 29
3.3 configuration file and data file 30
3.4 distributed program 30
Chapter 31
Chapter 3 File Types and compilation tools 33
4.1 C/C ++ 34
4.1.1 compilation tool 34
4.1.2 source file 35
4.1.3 assembly language document 37
4.1.4 target file 38
4.1.5 executable program 40
4.1.6 static library 40
4.1.7 dynamic library 41
4.1.8 C ++ compilation 42
4.2 java43
4.2.1 compilation tool 43
4.2.2 source file 44
4.2.3 target file 45
4.2.4 executable program 47
4.2.5 library 48
4.3 C #48
4.3.1 compilation tool 49
4.3.2 source file 49
4.3.3 executable program 51
4.3.4 Library 53
4.4 Other file types 55
4.4.1 UML-based code generation 56
4.4.2 image 57
4.4.3 xml configuration file 58
4.4.4 internationalization and resource binding 58
Chapter 59
Chapter 1 subobject and constructor 60
5.1 construct 61 for sub-objects
5.2 construct different versions of the software 62
5.2.1 specify the constructor 63
5.2.2 code customization and adjustment 65
5.3 construct different target system architectures 68
5.3.1 multiple compilers 68
5.3.2 files/functions for the specified platform 69
5.3.3 multiple target trees 69
Chapter 71
Part 2 Constructor
Actual scenario 75
Scenario 1: Put the source code in a single directory 75
Scenario 2: Put the source code in multiple directories 76
Scenario 3: define a new compilation tool 76
Scenario 4: construct multiple variables 77
Scenario 5: Clear the constructor tree 77
Scenario 6: Debug incorrect construction Results 78
Chapter 2 make79
6.1 GNU make programming language 80
6.1.1 makefile rule: used to establish dependency graph 80
6.1.2 makefile rule type 81
6.1.3 makefile variable 82
6.1.4 built-in variables and Rules 84
6.1.5 data structure and function 85
6.1.6 understanding program process 87
6.1.7 further reading 90
6.2 construction system scenarios in the real world 90
6.2.1 scenario 1: Put the source code in a single directory 90
6.2.2 scenario 2 (a): Put the source code in multiple directories 92
6.2.3 scenario 2 (B): iterative make operation on multiple directories 93
6.2.4 scenario 2 (c): Perform the include make operation on multiple directories 96
6.2.5 scenario 3: define a new compilation tool 101
6.2.6 scenario 4: construct multiple variables 102
6.2.7 scenario 5: clear construction tree 104
6.2.8 scenario 6: Debug incorrect construction results 105
6.3 praise and criticism 107
6.3.1 praise 107
6.3.2 criticism 108
6.3.3 comments 109
6.4 other similar tools 110
6.4.1 Berkeley make110
6.4.2 nmake111
6.4.3 electricaccelerator and spark build111
Summary 113
Chapter 2 ant115
7.1 ant programming language 116
7.1.1 A Little More than "Hello World" 116
7.1.2 definition and use of the subject 118
7.1.3 control flow of ant 119
7.1.4 attribute definition 120
7.1.5 built-in and optional task 122
7.1.6 select multiple files and directories 125
7.1.7 condition 126
7.1.8 extended ant language 127
7.1.9 further reading information 128
7.2 construction system scenarios in the real world 129
7.2.1 scenario 1: Put the source code in a single directory 129
7.2.2 scenario 2 (a): Put the source code in multiple directories 130
7.2.3 scenario 2 (B): multiple directories and multiple build. xml files 130
7.2.4 scenario 3: define a new compilation tool 133
7.2.5 scenario 4: construct multiple variables 136
7.2.6 scenario 5: clear construction tree 140
7.2.7 scenario 6: Debug incorrect construction results 141
7.3 praise and criticism 142
7.3.1 praise 143
7.3.2 criticism 143
7.3.3 comments 144
7.4 other similar tools 144
7.4.1 nant144
7.4.2 MS build145
Summary 146
Chapter 2 scons147
8.1 scons programming language 148
8.1.1 Python 148
8.1.2 simple compilation 151
8.1.3 management and constructor 154
8.1.4 Analysis of program processes and dependencies 157
8.1.5 determine when to re-compile 158
8.1.6 extend the language 160
8.1.7 other interesting features 162
8.1.8 further reading 163
8.2 construction system scenarios in the real world 163
8.2.1 scenario 1: Put the source code in a single directory. 163
8.2.2 scenario 2 (a): Put the source code in multiple directories 163
8.2.3 scenario 2 (B): Multiple sconstruct files 164
8.2.4 scenario 3: define a new compilation tool 165
8.2.5 scenario 4: construct multiple variables 167
8.2.6 scenario 5: clear construction tree 168
8.2.7 scenario 6: Debug incorrect construction results 169
8.3 praise and criticism 171
8.3.1 praise 171
8.3.2 criticism 172
8.3.3 rating 173
8.4 other similar tools 173
8.4.1 cons173
8.4.2 rake174
Summary 176
Chapter 2 cmake177
9.1 cmake programming language 178
9.1.1 cmake basics 178
9.1.2 construct executable programs and libraries 179
9.1.3 Flow Control 182
9.1.4 cross-platform 184
9.1.5 generate native constructor 185
9.1.6 other interesting features and further reading 190
9.2 construction system scenarios in the real world 191
9.2.1 scenario 1: Put the source code in a single directory 191
9.2.2 Scenario 2: Put the source code in multiple directories 191
9.2.3 scenario 3: define a new compilation tool 192
9.2.4 scenario 4: construct multiple variables 193
9.2.5 scenario 5: clear construction tree 194
9.2.6 scenario 6: Debug incorrect construction results 194
9.3 praise and criticism 195
9.3.1 praise 195
9.3.2 comments 195
9.3.3 rating 196
9.4 other similar tools 196
9.4.1 automake196
9.4.2 qmake197
Summary 197
Chapter 2 eclipse199
10.1 concepts of eclipse and gui199
10.1.1 Create Project 200
10.1.2 construct project 206
10.1.3 run the project 210
10.1.4 use internal project model 212
10.1.5 other constructor features 213
10.1.6 further reading materials 214
10.2 construction system scenarios in the real world 215
10.2.1 scenario 1: Put the source code in a single directory 215
10.2.2 Scenario 2: Put the source code in multiple directories 216
10.2.3 scenario 3: define a new compilation tool 217
10.2.4 scenario 4: construct multiple variables 217
10.2.5 scenario 5: Clear the construction tree 220
10.2.6 scenario 6: Debug incorrect construction results 220
10.3 praise and criticism 221
10.3.1 praise 221
10.3.2 comments 221
10.3.3 rating 222
10.4 other similar tools 222
Summary 224
Part 3 advanced topics
Chapter 2 dependency 11th
11.1 dependency graph 227
11.1.1 incremental compilation 228
11.1.2 complete, incremental, and sub-Object Construction 228
11.2 problems caused by dependency errors 229
11.2.1 problem: runtime error 229 due to missing dependency
11.2.2 problem: Compilation error 230 due to missing dependency
11.2.3 problem: excessive dependency leads to a large number of unnecessary re-structures 231
11.2.4 problem: dependency analysis failed due to excessive dependency 231
11.2.5 problem: Circular dependency 232
11.2.6 problem: replacing dependency with implicit queue sequence 232
11.2.7 problem: the Clean mark cannot be cleared by 233
11.3 Step 1: Calculate the dependency graph 233
11.3.1 obtain the exact dependency 234
11.3.2 cache the dependency graph 236
11.3.3 update the cache dependency graph 237
11.4 Step 2: Determine which files have expired 239
11.4.1 timestamp-Based Method 240
11.4.2 Method Based on checksum 241
11.4.3 comparison of flag parameters 242
11.4.4 other advanced methods 243
11.5 Step 3: sort the queue order for the compilation step 243
Summary 246
Chapter 1 construction using metadata 12th
12.1 debugging 247
12.2 performance analysis support 249
12.3 code coverage analysis 250
12.4 source code documentation 251
12.5 unit test 253
12.6 static analysis 256
12.7 add metadata to the constructor 257
Summary 258
Chapter 4 software packaging and installation 13th
13.1 archive file 260
13.1.1 packaging script 260
13.1.2 other archive file formats 262
13.1.3 improvement of packaging script 263
13.2 package management tools 265
13.2.1 RPM package management tool 265
13.2.2 RPM build process 266
13.2.3 RPM specification file example 267
13.2.4 create an RPM file 272 Based on the specification file
13.2.5 RPM installation example 274
13.3 customized GUI Installation Tool 275
13.3.1 Nullsoft Scriptable install System (NSIs) 276
13.3.2 install tool script 277
13.3.3 definition installation page 280
13.3.4 license page 281
13.3.5 Select installation directory 282
13.3.6 main component 282
13.3.7 available components 283
13.3.8 custom page 285
13.3.9 installation page and uninstall program 286
Summary 288
Chapter 2 version management 14th
14.1 versioning of things 290
14.1.1 construct the description file 290
14.1.2 tool reference 292
14.1.3 large binary 296
14.1.4 configure the source tree 296
14.2 what should not be put in the source tree 297
14.2.1 the generated file is saved to the source tree 297
14.2.2 files generated are incorporated into version control 299
14.2.3 structure management script 299
14.3 version 300
14.3.1 version number system 300
14.3.2 coordinate and update version 301
14.3.3 save and search version 302
Summary 303
Chapter 2 machine construction 15th
15.1 native compilation and cross-platform compilation 306
15.1.1 native compilation 306
15.1.2 cross-platform compilation 306
15.1.3 Heterogeneous Environment 307
15.2 centralized development environment 307
15.2.1 why is the difference between machines constructed 308
15.2.2 manage multiple construction machines 310
15.3 Open-Source Development Environment 312
15.4 GNU autoconf315
15.4.1 high-level workflow 315
15.4.2 example of Autoconf 317
15.4.3 run autoheader and autoconf319
15.4.4 run configure script 320 on the construction machine.
15.4.5 use configuration 322
Summary 323
Chapter 4 tool management 16th
16.1 rules for tool management 324
16.1.1 Rule 1: take notes 324
16.1.2 Rule 2: Version Control of Source Code 325
16.1.3 Rule 3: Regular tool upgrade 326
16.1.4 Rule 4: Version Control of tool binary files 327
16.1.5 damage to rules 329
16.2 compile Your Own compilation tool 329
Compile custom tools with Lex and YACC 330
Summary 332
Part 4 scale up
Chapter 4 Complexity Reduction for end users 17th
17.1 construction framework 334
17.1.1 developer-oriented structure description 335
17.1.2 framework-oriented structure description 336
17.1.3 Convention takes precedence over configuration 336
17.1.4 sample constructor: maven337
17.2 avoid supporting multiple constructor variables 338
17.2.1 test more constructor variables 338
17.2.2 code will get messy 339
17.2.3 the construction time will increase by 340
17.2.4 more disk space 340
17.3 various technical methods to reduce complexity 340
17.3.1 use modern construction tools 340
17.3.2 automatic dependency detection 341
17.3.3 place the generated file 341 out of the source tree
17.3.4 make sure that the constructor 341 is correctly cleared
17.3.5 abort the constructor 342 when the first error is encountered
17.3.6 provide meaningful error message 343
17.3.7 check input parameter 343
17.3.8 do not make the construction script too complicated 344
17.3.9 avoid using obscure language features 344
17.3.10 do not use environment variables to control the construction process 345
17.3.11 ensure that the constructed release version is similar to the debug version 345
17.3.12 accurately display the command in progress 346
17.3.13 incorporate tool references into version control 347
17.3.14 incorporate construction instructions into version control 347
17.3.15 automatic detection of changes to the compilation flag parameters 347
17.3.16 do not call version control tool 347 in the Construction System
17.3.17 continuous integration 348 as frequently as possible
17.3.18 use a unified construction machine 348
17.3.19 unified use of a compiler 348
17.3.20 avoid legacy # ifdefs spam code 348
17.3.21 Use meaningful symbol name 349
17.3.22 Delete junk code 349
17.3.23 do not copy source file 350
17.3.24 use a unified constructor 350
17.4 fully planned and labor-intensive improvement of the construction system 351
Summary 352
Chapter 4 Management Structure scale: 18th
18.1 problems with the construction of a single model 354
18.2 component software 355
18.2.1 advantages of using components 357
18.2.2 what is the component 358
18.2.3 integrate multiple components into a single product 361
18.3 personnel and process management 364
18.3.1 development team structure 365
18.3.2 component version queue management 367
18.3.3 manage the component cache 368
18.3.4 coordinate the development of new software features 370
18.4 Apache ivy372
Summary 373
Chapter 1 faster construction 19th
19.1 measurement Construction System Performance 375
19.1.1 performance measurement in the startup phase 375
19.1.2 performance measurement in the compilation phase 382
19.1.3 performance measurement tool 386
19.1.4 problem fixed: improved performance 388
19.2 structure reduction: eliminate unnecessary reconstruction 389
19.2.1 target file caching 389
19.2.2 smart dependency 391
19.2.3 other technical methods for constructing relief 395
19.3 parallel 396
19.3.1 cluster/cloud 396
19.3.2 parallel build tool 397
19.3.3 limit scalability 398
19.4 reduce disk usage by 398
Summary 400
References 401

Source of this book: China Interactive publishing network

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.