Chapter 2 software configuration of the second

Chapter 2: the process of software build processes and tools to build the 2.2 software, systems and tools to
process 2.2 software to build, systems and tools to
outline
the general process  software built: Design ⇒ programming / debugging reconstruction ⇒ ⇒ ⇒ construct ⇒ release test - programming / remodeling - review and static code analysis - debugging (dump and logging) and test - dynamic Code analysis / analyze software build process  narrow sense (to build): verify links ⇒ ⇒ ⇒ compiler package test ⇒ ⇒ ⇒ installation deployment - build system: components and processes - to build and build language variants - building tools: Make, Ant, Maven, Gradle , Eclipse summarize
the process of building the 2.2 software, systems and tools of this seminar targets
 understand the general process of building software ( ⇒ ⇒ debugging program designed to test ⇒ ⇒ construct ⇒ release)  Java using the Eclipse IDE as build environment and tools for understanding  review and static analysis, typical debugging tool (dump records)) and testing, dynamic analysis / analysis  narrow learning software build process (build: verify links ⇒ ⇒ ⇒ compiler package test ⇒ ⇒ ⇒ installation deployment)  the Construction of one (make, Ant, Maven, Gradle ) tools, Eclipse IDE) to build their own Java programs.
Software build
general process of a software build
process 2.2 software to build, the general process of building software systems and tools of
programming (coding)
code review static code analysis
debugging
dynamic code analysis / analytical
reconstruction
establish
verification compile and link test package installation and deployment
software builds
(1) the programming
process 2.2 software to build, construct language systems and tools
 programming languages (eg, C, C ++, Java, Python)  Modeling Language (eg, UML)  configuration language (eg, XML)
  language based on mathematical (formal)  based graphical (visual)
2.2 software build processes, systems and tools (1) programming language
process 2.2 software to build, systems and tools to
process 2.2 software to build, systems and tools
programming tools
 integrated development environment (IDE): provides comprehensive software development tools for programmers . IDE usually include: - intelligent code completion source code editor, code refactoring tools - file management utility - database management tool - Class Browser, the Object Browser, OOP class hierarchy diagram - the graphical user interface (GUI) builder - compiler, interpreter - build automation tool - version control system - ... IDE should be extended by additional external third-party tools. As an example Eclipse IDE
EclipseIDE: open for Java IDE, but not limited to, C / C ++, PHP, Python , etc., as a proprietary IBM product (Smalltalk / Java's Visual age) start - it contains a with region encoding basic work tools, build, run and debug applications, and custom environments for scalable plug-in system. - to provide a plug-in function for a system configuration code and / or data packets. Functions can be code base, platform extensions even in the form of documentation provided. - plug-ins can define extension points, well-defined place, other plug-ins can add functionality.
Eclipse IDE 2.2 software build process components, systems and tools
menu bar drop-down menu and complete the quick access to commonly used features
editor pane This is where we edit the source code
perspective, we can switch here to switch various viewing angles
outline pane This It includes a hierarchical view of the source file
Package Explorer pane which is listed in our project / document where
miscellaneous Pane This pane can display a variety of components - usually, it contains a list of questions and compiler console
task list pane that contains the complete "Task "list
the process of building the 2.2 software, system tools and Eclipse IDE core components
 runtime core - core implementation on platform base platform runtime and dynamically find and run-time engine to run plugins. - Aplug-inis is a structural component that uses OSGi manifest (MANIFEST.MF) file and plug-in manifest (plugin.xml) file describes itself to the system. The platform maintains a registry of their functions provided by the installed plug-ins.  Resource Management - Resource Management plugin defines a common model for resource management tool insert workpiece. Plug-ins can create and modify projects, folders and files to organize and store development artifacts on disk.
2.2 software build processes, systems and tools Eclipse IDE core components
WorkbenchUI Core - This table UI plug-in implementation and defines a number of extension points that allow other plug-ins provide menus and toolbar actions, drag and drop, dialog boxes, and wizards customize views and editors. - Standard Widget Toolkit (SWT) and JFace framework Java development tools (JDT) - by providing edit, view, function compile, debug and run Java code to extend the platform bench.  plug-in development. envelope. (PDE) - automatically create, manipulate, debug and deploy plug-in tools. http://help.eclipse.org/mars/index.jsp
process 2.2 software to build, systems and tools (2) modeling languages and tools
 modeling languages that can be used in a structure expressed by a set of rules defined in the same information or knowledge or any artificial language system, its purpose is to design visualization, reasoning, verification and communicating systems.http://modeling-languages.com
process 2.2 software to build, systems and tools UML modeling languages and tools as examples
UML: Unified Modeling Language
The third year of study at UML 'software processes and tools "in the
2.2 software to build processes, systems and tools as UML modeling language and tools exemplary
UML with the embodiment of FIG.
2.2 Construction of software processes, systems and tools UML modeling language and tools as an example
UML class diagram
process of constructing 2.2 software, systems and tools built as UML mold tools and languages exemplary
UML sequence diagram
during 2.2 software to build the system as UML modeling language and tools and tool example
UML FIG assembly
build process 2.2 software, systems and tools (3) configure the language
 profile configuration program and initial parameter setting. - The application should provide tools to create, modify, and verify the reasonableness of its configuration files; - Some computer program reads its configuration file only at startup. Are others regularly check the configuration file changes.  exemplary purposes: - deployment environment provided - variant application functionality - the connection between the components  variant configuration language Example: - key text (.ini, .properties, .rc etc.) - XML, YAML, JSON isolated stable and unstable part of
the process 2.2 software configuration language structure, systems, tools and
software building
(2) review and static code analysis checks and static analysis / examination
 Code review is a system to check the source code (peer review). - aimed at discovering errors overlooked during the initial stages of development, improve the overall quality of the software. - Reviews accomplished in various forms, such as pair programming, formal and informal walkthrough inspection.
2.2 software build processes, systems and tools
formal code review
 formal code review, for example, Fagan inspection, involving a careful and detailed process that involves multiple participants and multiple stages. - formal code review is a review of the traditional method, in which the software developer through a series of meetings and reviewing code line by line, usually used to print copies of the material. - formal check very thoroughly, and it has been proven to be effective to detect defects in the code review.
2.2 software build processes, systems and tools Lightweight code review
 Lightweight code review typically require less overhead than formal code inspections, but if done correctly, it can be equally effective.  Lightweight comment is usually carried out as part of the normal development process: - When a developer through code, a developer will look at the author's shoulder. - Emailpass-around-source code management system after check code is automatically sent by e-mail to reviewers. - Pairprogramming- authors develop code together on the same workstation, because it is very common in Extreme Programming. - auxiliary code review tool - authors and reviewers use software tools, informal, such as aspastebins and IRC, or tools specifically designed for peer code review and design.
2.2 software build process, systems and tools
static code analysis
 static code analysis is executed by computer software without actually executing the program in the case of analysis (analysis performed is called the execution program dynamic analysis).  The process provides an understanding of the code structure, and helps ensure that the code in line with industry standards.  Automated tools can help programmers and developers to static analysis. - For example, CheckStyle, FindBugs, PMD for Java
software building
(3) Dynamic code analysis / analysis
procedure 2.2 software to build the system dynamic code analysis tools and / Analysis
 dynamic program analysis is the analysis of software execution by executing the program.  target program must be executed with sufficient test input to produce interesting behavior.  Use code coverage and other measures to help ensure that software testing observed a set of possible behavior of a program.
 Performance Analysis ( "Program Analysis", "Software Performance Analysis") is a dynamic program assay format, a space for the measurement procedure (RAM) or the time complexity, frequency and duration of use of a particular instruction or a function call.
2.2 software build process, systems and dynamic code analysis tools / analysis
software building
(4) debugging and testing What is the test?
 software testing is to provide information about the quality of the tested products or services to stakeholders and conduct investigations.  testing techniques, including during the execution of a program or application, the purpose is to find software error (errors or other defects), and verify that the software product is suitable for use.  Software testing involves performing a software component or system components, to evaluate one or more attributes of interest.
2.2 software build processes, systems and tools
What is debugging?
 commissioning is to identify the root cause of the error and correct process.  In contrast with the test, the test is the initial error detection process, commissioning is the result of a successful test. - In some projects, debugging takes up 50% of total development time. - For many programmers, programming, debugging is the hardest part.  with the same test, debug, not a method of improving software quality, but it is a way to diagnose defects. - it must be built-in software quality from the start. The best way to build high-quality products is the careful development needs, design and good use of high-quality coding practices. - Debugging is a last resort.
2.2 software build processes, systems and tools in Eclipse debug perspective
breakpoint list
These buttons allow you to step through the code
Note that the new Debug perspective - Click to restore normal Java
Here are the variables and their current values in the range (click to change the value of a variable in the program is run by right)
is currently a senior position (classes and methods)
This pane displays we break the current line of code
output console just as in normal operating mode
software build
(5) reconstruction
process 2.2 software to build, systems and tools
remodeling
 reconstruction is a process of changing a software system, it does not alter the external behavior of the code, while improving its internal structure. - provide short-term time / cost of the work to achieve long-term benefits and long-term investment in the overall quality of the system.  Reconstruction is: - reconstruction (re-ordering) Code ... - ... in a series of small, preserve the semantics of conversion (i.e., the code holding work) ... - ... in order to make the code easier to maintain and modify the reconstituted just  any old restructuring - you need to keep the code to work - you need to preserve the semantics of small steps - you need unit tests to prove that the code effective
software to build
2 narrow the software build process (build)
software building
(1) build system
2.2 software to build processes, systems and tools to build a typical scene
 written in traditional compiled language software compilations, such as C, C ++, Java and C #.  packaging and test written in interpreted languages such as Perl and Python software.  Compile and package Web-based applications. - These include static HTML pages, Java or C # source code written using JSP (JavaServer Pages), ASP ( Active Server Pages) or PHP (Hypertext Preprocessor) mixed paper prepared grammar, as well as various types of profile. BUILD A typical scene
repementofunittest can verify that the software independently of the rest of all the code portion. repertostaticanalysists source code for identifying errors. This build system output is an error report document instead of an executable program.  generate PDF or HTML document. This type of construction system using a variety of input file formats, but the document as generated human-readable output.
2.2 software build processes, systems and tools
compiled languages
 compiled languages, such as C, C ++, Java and C #. In this model, the source files are compiled into object files, then linked to the code library or executable program.  generated files will be collected to be installed in the distribution package on the target computer.
2.2 software build processes, systems and tools
compiled language
  source version control tool tree and tree of objects: set of source files and compiled object file sets specific developer use.  compiler tools: acquisition tools generate the input file and the output file (e.g., converts the source code and object code files for the executable program). Common examples include C compiler tools or the Java compiler, but they also include documentation and unit test generator.  build machine: a computing device to perform the compilation tools.  publishing package and the target computer: The software is packaged and distributed to end-users, and then an installation on the target computer.
2.2 software build process interpreted languages, systems and tools
 explain the source code is not compiled into object code, so no object tree. Source file itself is collected in a release package, ready to install on the target computer.  compilation tools focused on converting the source file and stores it in the release package.  compiled into machine code will not execute when building, even though it may occur at run time.
2.2 software to build Web-based applications processes, systems and tools
 Web-based application system is constructed compiled code, interpreted code, and a mixture of configuration or data files. As shown in FIG 1.3, some files (e.g., HTML file) directly from the copy source tree to the release package, and the other files (e.g., Java source file) is first compiled into object code.
2.2 software build process Web-based applications, systems and tools
 static HTML file that contains only the marker data to be displayed in a Web browser. These files will be copied directly into the distribution package.  contains the explanation by the end-user's Web browser JavaScript code file. These files will be copied directly into the distribution package.  contains a mixture of HTML and program code JSP, ASP or PHP pages. These files by the Web application server rather than build system to compile and execute. These files will be copied to the distribution package, ready to be installed on the Web server.  The Java source files are compiled into object code and packaged as part of a Web application. Construction of the system to perform this conversion before you package Java class files. Java classes on the Web application server to perform, and even execution (using a Java applet) in a Web browser. Unit testing, static analysis
software building
(2) Construction of System Components
2.2 construction system software build process components, systems and tools
 version control  source tree: storing a program source code into a plurality of disk files. The files are arranged in a different called the source tree. Source tree structure generally reflects the architecture of the software.  object tree: a single hierarchical tree structure for storing object files or executable build any configuration procedure.  compilation tools: converting human-readable source file for a program of machine-readable executable program file. - compiler: Source File Object File ⇒ - Links: Multiple object files related ⇒ executable program image - UML-based code generator: model ⇒ source code files - documentation generator: ⇒ script documents
2.2 software build system process of building components, systems and tools
 build tools: a program that runs on the compilation tools. It must fully understand the relationship between the source and target files, it can coordinate the entire building process. Build tools necessary to call the compiler tools to generate the final build output.  build machine: compile and build the machine tool execution. - native compiler environment: software executing on the same machine and the target machine constructed; - cross compiler environment: the need for two different computers with different operating systems or CPU on the destination computer.
2.2 software build process, systems and tools native compiler cross compiler
process 2.2 construction system software build components, systems and tools
 publishing package and the target computer: generating content may actually installed on the user computer. - extract the relevant file and store objects from the source tree and the tree in the release package. - Release package should be a single disk file should be compressed to reduce the time required to download. - should remove any unnecessary debug information, so as to avoid confusion install the software.  Package Type: - archive files: zip and unzip - package management tools: UNIX style, such as .rpm and .deb - Custom GUI installation tools: Windows style
software building
(3) describe the build process and build
process 2.2 software to build, systems and tools to
build process
 build process: build tool calls each compilation tools to complete the work, which is an end of the sequence of events.
2.2 software build processes, systems and tools
to build description
 build tools need to write a description to build text-based format.  For example, when using the Make, specified correlation information between files in the form of rules, these rules are stored in a file called Makefile's.
2.2 software build process, systems, and how to use the tools to build the system
 developer (or private) building: Developers from the VCS detection of the source code and build software in a private workspace. The release package will be used to generate private developers developers.  release version: to provide a complete package for the test group for validation. When the testers are sure that the software has a high enough quality, we can provide the same packages to customers. Source tree for the release version of the compiler only once, never modified source tree.  build integrity: This is similar to the release version, except that the package is not for customers. In contrast, the current build process determines whether the source code without errors via a set of basic sanity test. This type of building can take place several times a day, and often is fully automated. - Daily Build / nightly builds Nightly builds (4) Java compiler tool
process 2.2 software to build, systems and tools
Java how about?
A major selling point Java language is "write once, run anywhere" concept.  In other words, you should be able to compile Java programs on a Linux machine, but without any modification to run it on a Windows or Solaris machines.  This is achieved by using a set of standard bytecode by a Java virtual machine (JVM) explained.  Since Java's security features can limit the Java program execution environment, thus allowing untrusted program execution without having to worry about damage to the host.
In the process of building software Java 2.2 compilation tools, systems and tools
JavaDevelopment Kit (JDK) GNUJava EclipseJava compiler compiler (ECJ)
process to build the 2.2 software, system tools and
source files in Java
Hello.java
§ Main.java
process 2.2 software to build, systems and tools
in Java object files
Java class object file format called the class file suffix .class.  machine-independent byte codes, the program flow is used to describe, instead of directly compiled to native machine code.  need Java Virtual Machine (JVM) to load and interpret the byte code, although JVM may be the first convert them before actually executing the program to native code.
 Use javaccommand converts Java source files into class files.
2.2 software build processes, systems and tools Java executable
Java programming is dynamic class loading. Generate executable link need to build a step. On the contrary, when the program needs to run, Java classes are loaded into memory alone. No single executable program loaded image. Java program just a collection of dynamic libraries, although a part of the load a class rather than as a larger shared library. Java program needs to perform two operations: - must provide the name of the class containing the main method for the JVM. This serves as a starting point for execution. - the class must also provide a path for the JVM, the path is used to identify the position of other classes.
2.2 software build processes, systems and tools Java executable
process 2.2 software to build, systems and tools
in Java library
 In addition to the specified directory listings can be found .class files, you can also put more Java classes the archive, known as JAR files.  Most Java applications prefer the JAR file format (suffix .jar), because it is easier to operate than the JAR file package and distribute a large number of .class files.  To create JAR files:
 To use the JAR file: Java in the library
JAR files are typically used as a method to distribute the program. You can not just pack their own software in the JAR file, and you can also add other people by getting them to the JAR file to merge third-party software package your own class path.  Due to the dynamic loading system, you can always replace and upgrade JAR file.
Software builds
(5) sub-goals and build variants of
the process of building the 2.2 software, systems and tools to build three different ways
 build sub-goals: build tree only part of developers prefer incremental changes only they are actively rebuilding process the part of the tree.  build different versions of the software: to customize the output to change the behavior of the software. These variants may include support or support for natural language different combinations of product features, such as Home or Professional Edition.  build a different target architecture: To support software products on different target computers, must be for a variety of CPU type and operating system to compile the same set of source files. This includes x86, MIPS and PowerPC CPU, as well as Linux, Windows and Mac OS X and other operating systems.
2.2 software build processes, systems and tools to
build sub-goals
of any large software  can be divided into multiple sub-assemblies, usually in the form of static or dynamic libraries. Each component part of the program provides all of the functions only, and to some extent independently of other components developed.  In order to avoid time-consuming in the construction of the entire source tree to create the final executable program, the best choice to limit the number of subassemblies constructed thereof, rather than always rebuild the entire source tree.
2.2 software build processes, systems and tools to build different versions of the software
 build different versions - Language and Culture, Localization - hardware changes - pricing options  Specifies the build variants:
 change the code: - Progressive variants - each each variant of the build descriptor file - the file variants - each variant Catalog
2.2 software construct different target architecture building processes, systems and tools
when  only C and C ++ programming languages such as native code at compile-oriented, such variants useful.
 the use of a machine-independent virtual machines independent of Java and C #.
Software build
(6) building tools
building tools
 For Java: - Make - Ant - Maven - Gradle - Eclipse
software to build
the
process of building the 2.2 software, systems and tools
Java the make
 Use Makeand makefile building Java projects - https://www.cs.swarthmore.edu/~newhall /unixhelp/howto_makefiles.ht ml - https://www.cs.swarthmore.edu/~newhall/unixhelp/javamakefiles.html - http://www.cnblogs.com/jiqingwu/archive/2012/06/13/java_makefile .html command: - #make new new generation subdirectory (src, bin, res) - #make build compile and generate java classes in the bin - #make clean clean up the build results - #make rebuild cleanup compile the results and recompile (clean + build) - #make run check execution result - #make jar jarfiles generating executable
software build
Apache Ant
process 2.2 software to build, systems and tools
Apache Ant
Antis is the Apache Software Foundation build tool.  Follow Ant activity is to build each package system for advanced tasks. - ant compile: used to compile all source files into Java class files - antjar: used to package the class files into a single Jar file - antpackage: used to create a complete software distribution package that contains the version number - antclean: for deleting All generated build file tree - antjavadoc: for generating API documentation using Javadoc tool - ant: used to execute the default target, which is likely to target the same Buildfile the package: build.xml
process 2.2 software to build, systems and Ant optional task and the built-in tools
 basic file operations, such as mkdir, copy, move and delete  array using different formats (such as .tar, .gz, .zip, .jar and .rpm) to create a file archive of Java compiled code, including compiled JSP and special tools for RMI § Javadoctool generated automatically using the control means to directly access a document version of the API §, such as CVS, Perforce and ClearCase build lifecycle functions, such as updating the build number, e-mail message, play sound represents the build process is completed  check the complete list of tasks: HTTP: //ant.apache.org/manual/tasksoverview.html
2.2 soft The build process, systems and tools
example of an Ant
 detailed help can be found in http://ant.apache.org/manual/index.html
the Apache Ant
 Read the textbook "software build system: Principles and experience" in Chapter 7 Ant.
Software build
Apache Maven
process 2.2 software to build, systems and tools
Maven the Apache
ApacheMaven is a software project management and comprehension tool. - Based on the concept of a project object model (POM) is, Maven can build projects from a central information management, reporting and documentation. IDE integration: The main objective of Eclipse IDE-M2EclipseMaven is to allow developers to understand the complete state of development work in the shortest possible time. - simplifying the build process - to provide a unified build system - providing high-quality project information - develop best practices guide - allows transparent migration to new features in
the process of building the 2.2 software, systems and tools
Apache Maven
process 2.2 software to build, systems and tools
the Apache Maven
 verify - verify that the project is correct and all necessary information available  compile - compile the source code  project using unit testing framework to test the compiled source code. These tests should not require the deployment code  package or packages - Get compiled code to be packaged and distributed format, e.g. JAR.  Verify - run any checks on the integration of test results, to ensure that quality standards are met  Install - install the packages into a local repository, as a dependency  other local projects in the build environment deployment is complete, the final package to the remote copy repository for sharing with other developers and projects.
https://maven.apache.org/index.html
software build
cradle
during 2.2 software to build the system and tool
cradle
 using the Eclipse IDE Gradle building system (Tutorial)
http://www.vogella.com/tutorials/ EclipseGradle / article.html
software builds
Building a Java project in Eclipse
2.2 software build processes, systems and tools for building Java project in Eclipse
EclipseIDE the code editor, compiler, version control, test and task tracking provides a set of development tools. Eclipse construct function only part of a broader set of tools, the compiler behind the scenes, you do not even know it is happening, Eclipse GUI makes building work together seamlessly.  you do not write the build description file (for example makefile): Eclipse already know enough about the structure of the software.  rely on to provide the GUI building capabilities make the system easier to build, but also limits the set of available features.
 Read the textbook "software build system: Principles and experience" in Chapter 10 Eclipse.
Software Build
Abstract This lecture summary
 general software build process: design ⇒ programming / debugging reconstruction ⇒ ⇒ ⇒ construct ⇒ Test Release - Programming / remodeling - review and static code analysis - debugging (dump and logging) and test - dynamic code analysis / analysis  narrow process software build (build): verify ⇒ compile ⇒ links ⇒ test ⇒ packaging ⇒ installation ⇒ deployment - build system: components and processes - to build variants and build language - building tools: Make, Ant, Maven , Gradle, Eclipse
software builds
end

Guess you like

Origin blog.csdn.net/t03010/article/details/93406061