What is Extreme Programming (Extreme Programming, Abbreviation XP) Source: chinaxp http://www.xpchina.org Waltson
Extreme Programming (Extreme Programming, Abbreviation XP) is proposed by Kent Beck in 1996. In the 1990s, the Kent Beck has been jointly explored the new software development method, hoping that software development is simpler.
effect. Kent carefully observes and analyzes the prerequisites, possibilities and difficulties of simplified software development. March 1996,
Kent finally introduced new software development concepts in a project made for Daimlerchrysler.
XP is a lightweight, smart software development method; it is also a very strict and careful way. Its foundation and values
It is communication, simple, feedback and courage; that is, any software project can be improved from four aspects: strengthen communication;
Single; seek feedback; courage to seek truth from facts. XP is an near-spiral development method that decomposes complex development process into one by one.
Relatively simple small cycle; developers and customers can be very clear through active communication, feedback, and other series of methods, developers and customers can be very clear
Develop progress, changes, problems and potential difficulties to be solved, etc., and adjust the development process in time according to the actual situation.
What is software development
Software development is: demand, design, programming, and test!
Demand: Not only is user needs, it should be all the needs encountered in the development. For example, you first have to know that this project is for understanding
What is the problem? What should I enter in the test case ... In order to clearly know these needs, you often want to be with our customers, project managers.
Wait for communication.
Design: Before the encoding, there must be a plan to tell you what to do, how the structure is equal. You must do it according to this, otherwise it may
A mess.
Programming: If you are on the project's deadline, your program can't run or don't reach the customer's request, you can't get money.
Test: The purpose is to let you know, when it is completed. If you are smart, you should write test first, so you can know you in time.
Whether it is really done. Otherwise, you often don't know, what functions have been true to do, how far is it left from expected.
In software development, customers and developers have their own basic rights and obligations.
client:
• Define business priorities for each user's needs;
• Develop an overall plan, including how much investment, how long it takes, what is the purpose of achieving
• Each working week during the project development will make your investment to get the biggest benefit;
• Accurately master the project progress by repeatedly running the function test you specify;
• You can change your needs, functionality, or priority at any time while avoiding expensive reinvestment; can adjust the project plan in a variety of changes;
• Can be canceled at any time; when the project is canceled, the previous development work is not a bunch of garbage, and the function has been developed.
Work on or unfinished should be not difficult to take over.
Developer:
• I know what to do, and what to do;
• Work efficient;
• When there is a problem or difficult, you can get the answer or help from customers, colleagues, superiors;
• Evaluate work and re-evaluate according to changes in the surrounding situation;
• Actively bear your work, not negative acceptance; • Working system for 40 hours a week, not overtime.
This is software development, in addition to this, there are other problems that should be concerned!
Smart lightweight software development method
A software development method is a series of regulations, norms, and practices related to development. The development method of heavyweight is strictly defined by many regulations.
The processes and related documents are working. Smart lightweight development method, its rules and documents are relatively small, the process is more flexible, implemented
It is relatively easy.
Programmers develop software in the way they like in software engineering concepts. The quality of the program is difficult to control, the debugger is very
It is also difficult to read the code written by the other party between programmers. In 1968, Edsger Dijkstra wrote a topic for cacm.
STATEMENT CONSIDERED HARMFUL's letter, the concept of software engineering is born. The programmers began to abandon the previous practice.
Use more systematic and stricter development methods. In order to develop and control other products as strict, people have been developed
Many rules and practices have invented a lot of software engineering methods, and software quality has been greatly improved. With more problems encountered,
Rules and processes are getting finer and complex.
Today, in the actual development process, many rules have been difficult to follow, many processes are complicated and difficult to understand, many projects
The production process is losing control. People try to make more comprehensive and better package, or hopes more complex, more powerful
Case Tools, but always can't succeed, and development specifications and processes become more complex and difficult to implement.
In order to catch progress, programmers often skip some specified processes, and few people can comply with those heavyweight development methods.
The reason for failure is very simple, and there is no universal medicine in this world. Therefore, some people put forward, carry out rules and processes in heavyweight development methods
Delete, reorganize, and optimize, which has produced a lot of lightweight processes that adapt to different needs. In these processes, the actual needs
The rule is retained, and unnecessary complicated regulations are abandoned. Moreover, compared with traditional development methods, lightweight processes are no longer like flow
Water production line, but more flexible.
Extreme Programming (XP) is such a smart lightweight software development method.
Why is it called "extreme" (limit)
"Extreme" means that contrast the traditional project development method, XP emphasizes the limit of each method and idea it listed.
It is best to do it; other XPs are not advocated, then ignore (such as the overall design of the previous period). A project that strictly implements XP,
The development process should be smooth, efficient and fast, can do a 40-hour work system for a week without delay project progress.
What is XP software development?
1 limit work environment
In order to maximize the basic rights and obligations of customers and developers in software development, XP requires the working environment
Do the best. Everyone who participates in project development will be a role (project manager, project supervisor, etc.) and fulfill the rights
And obligations. All people work in the same open development environment, it is best to work in the same big house, and refreshments
Supply; 40 hours a week, do not advocate overtime; every morning, everyone stands with a short meeting; there are some big whiteboard on the wall, all
The Story Card, the CRC card, etc., you can write paintings above when discussing problems; you can play computer travel together after get off work.
play…….
2 extreme demand
Customers should be one member of the project development team, rather than dividing developers; because of the program's plan to final acceptance, customers have always played a very important role. Developers with customers, turn various demands into a small demand module (User Story), example
Such as "the total number of calculation grades is accumulated in all the number of all classes of this grade." These modules will be combined according to the actual situation. "
Or being decomposed into smaller modules; they are all recorded on some small cards, and then they are each in each of the programs
Small cycle development (Iteration, usually no more than 3 weeks); customers specify them according to the business value of each module
The priority; developers must do is to determine the development risk of each demand module, high risk (usually because of lack of similar experience)
The demand module will be prioritized, explore and develop; after developers and customers evaluate each module from different angles, they are
Arranged in different development cycles, customers will get as accurate development plans as possible; customers specify an acceptance test for each demand module
(function test).
Every time you release a developed software (after a development cycle), users can get a system that can start using, this system is comprehensive
Really realized all the needs of the plan. In some traditional development modes, no matter what function, users have to wait until all developments
Be will start using it.
3 extreme design
From a specific development perspective, the process of the inner layer of the XP is a Test Driven Development week based on test drive.
The processes such as plans and design are all deployed. There are many corresponding unit tests for each development cycle.
Unit test. Just start, because everything is not implemented, all unit tests have failed; with a small need
The completion of the module, and more and more unit tests are passed. In this way, customers and developers are easy to test, whether to perform
The commitment to the customer. XP promotes Simple Design, which use the easiest way to make each simple
The program written out can be tested through all related units. XP emphasizes to abandon the detailed design of the package (BIG
Design Up Front, because there are many contents in this design that you are now or recently. XP also strongly advocates design
Review, code review, reforming and optimization, all these processes are actually optimized
Cheng; constantly run unit testing and functional testing during these processes, ensuring that the reforming and optimization system still meets all the needs
begging.
4 limit programming
Since programming is very important, XP advocates two people to write the same program (pair programming, and the code ownership is attributed to the whole
Collective Code Ownership. The programmer must strictly abide by writing the program and reorganization optimization.
Programming specification. Anyone can modify the procedures written by other people, and then determine the new program through unit test.
5 limit test
Since the test is very important, XP advocates writing unit test before starting writing the program. Developers should always integrate development of well-developed modules to
To run together, you have to run unit test after each integration; do any code review and modification, you have to run unit testing; you find BUG, you need to increase the corresponding test (so the XP method does not require a bug database). In addition to unit testing,
There are also integrated testing, functional testing, load testing and system testing. All these tests are the most important documents during XP development.
First, it is also one of the final delivery to the user.
============================================================================================================================================================================================================= ==========
Important practices and rules in XP
1 Project Development Group (Team)
In XP, each person who contributes to the project should be one member in the project development team. Moreover, there must be at least one person in this group.
It is very clear to user demand, can propose requirements, determine the business value (priority) of each requirement, according to changes in demand, etc.
Plastic plan. This person plays the "customer" role, of course, is the actual end user, because the entire project is around
The end user needs to be expanded. Programmers are an indispensable member in the project development team. There can be testers in the group, they help
Customer formulate acceptance tests; there are analysts to help customers determine demand; usually there is a Coach (coach), responsible for tracking development progress,
Solve some of the issues encountered in development, promote the project; you can also still have another project manager, responsible for the distribution of resources, assisting projects inside and outside
Communication communication, etc. There are so many roles in the project team, but it is not to say that everyone doing is that others can't intervene or intervene, XP
Encourage everyone to contribute more to the project as much as possible. Equality, take the length of the best; this is the best XP development team.
2 Planning Game, acceptance test, small scale release (Small Releases)
The XP Development Team uses a simple way to conduct project plans and development tracking, and predict the progress of the project and the steps to determine the future. root
According to the business value of the demand, the development team conducts a series of development and integration for a group of needs, and each development will produce a pass.
The system you can use can be used.
• Plan project
The planning process of XP is mainly for two issues in software development: how much work can be completed before delivery date; now and next
Do something. Constant answer these two questions, just serve how to implement and adjust the development process; Hope to start with this
It is half a time to exactly define what is going to do for the entire development process and how much time is spent. For these two questions, XP
There are two main corresponding processes:
Software Publish Plan (Release Planning). Customers describe demand, developers estimate development costs and risks. The customer is based on development
The importance of this, risks and every demand is developed a rough project plan. The initial project plan is not necessary (nor possibly)
Often accurate, because the development cost of each requirement, risk and its importance are not unchanged. Moreover, this plan will be constantly adjusted during the implementation process.
Cycle Development Planning. During the development process, there should be many phases (such as every three Monday
Draw). Developers may perform internal reforming and optimization (code and design) in a certain cycle, and add new in a certain cycle.
Features, or will do two works simultaneously in one cycle. However, after each development cycle, users should get one
Some functions have been achieved. Moreover, each time a cycle, the customer will reproduce the need to determine the next cycle to be completed. in
During each development cycle, developers will break demand into a small task and then estimate the development cost and risk of each task.
These estimates are based on actual development experience, the project is much done, and the estimation is naturally more accurate and accurate; in the same project, every pass
A development cycle, the next estimation will have more experience, reference and basis, making it more accurate.
These simple steps provide customers with rich, sufficient information, making it flexibly and effectively regulates development processes. Two three stars
During the period, customers can always see the needs of developers have completed. In XP, there is no "fast to complete", "complete
90% of the fuzzy statement, or if it is not completed, it is not finished. This practice seems to be favored: the benefit is customer
I know what to do, what I have made, what else to do or improve, what is wrong?
The things that can come out may be very unsatisfactory or even stop contracts. In fact, this practice of XP is to find problems early, solve problems,
Instead of waiting for a few months, the user finally saw the developed system, and then told you that this is not, that change, but also increase
Which content, etc.
• Acceptance Test
Customers define some acceptance tests for each requirement. By running an acceptance test, developers and customers can know the developed software
does it reach the requirement. XP developers are as important as those of these acceptance tests and unit testing. In order not to waste valuable time, it is best to
Automate these test processes.
• Frequent small scale release software (SMALL Releases)
The need for each cycle is the most needed for users. In XP, the system is released for each cycle
User should be able to evaluate it easily, or it is already enabled. In this way, software development for customers,
It is no longer a thing that can't touch it, but it is real. XP requires frequent release software, if possible, it should be released every day
A new version; and after completing any changes, integration, or new needs, you should immediately release a new version. These versions
Consistency and reliability are guaranteed by the development of acceptance testing and test drive.
3 Simple design, Pair Programming, test drive development, reforming and optimization
The XP programmer is not only working together as a development team, but also writes the same program with two people for a small development unit. Developers
Simple design, write a unit test, write code that meets the test requirements, and constantly optimize the settings under the premise of meeting the demand
meter.
• Simple design
This is the most confused in XP. XP requires the easiest way to achieve each small demand, provided in accordance with these simple settings
The software developed must pass the test. These designs can only meet the needs of systems and customers in the current demand, do not need any
The design of the snake has been designed, and all of these designs will be continuously reorganized and optimized during subsequent development. In XP, there is no one-time in traditional development model, and the overall design of all needs. In XP, the design process is almost always
Wearing the entire project development: From the plan to develop a project, to develop a plan for each development cycle, to each need
The shortcut design of the module, to the design review, and the uninterrupted design reorganization and optimization. The entire design process is a spiral, no
Broken process and development process. From this perspective, XP is the ultimate of the design.
PAIR Programming
In XP, all the code is written by two programmers on the same machine - this is the most controversial in XP, and it is also true.
A little bit. This guarantees all the code, design, and unit tests to review, code, design, and test quality due to another person.
This is improved. It seems that it is a waste of human resources, but various studies have shown that the fact is exactly the opposite. - this way of work
Greatly improved working strength and work efficiency.
Many programmers have been forced to try this (XP also requires support for administrative orders). Always not get used to start, and two people
The efficiency is not higher than the efficiency of one person. The effect of this approach is often necessary to stick to a few weeks or two months before it can be significant. Dependent
In all the programmers who have just started PAIR Programming, 90% of people think that this work is more high after two months.
effect.
In project development, each person will continue to replace partners programming. Therefore, Pair programming not only improves software quality, but also
Enhanced knowledge exchanges and updates, enhanced communication and understanding of each other. This is not only good for individuals, but also benefits the whole
Project, development team and company. From this point of view, Pair Programming is not only for XP, but also for all other software development.
method.
• Test driver development
Feedback is one of the four basic values of XP - in software development, full feedback can only be obtained by sufficient testing. XP
Subprising tests can be seen in other software development methods, such as functional testing, unit testing, system testing and load testing, etc .;
Different, XP combines testing into its unique spiral incremental development process, the test continues to accumulate with the progress of the project.
In addition, since the entire development team has code, the test is also maintained by everyone. That is, anyone is putting a program in the Code Base
Before Check IN, all tests should be running; if anyone finds a bug, it should be added to this bug immediately.
A test, not waiting for someone who wrote that program to complete; anyone picking up another person's task, or modifying other people's code and setting
After the change, it will prove that his work has not been destroyed by all tests. In this way, the test can truly help
Get feedback, and, the test should be basically covered by all customer and development needs by constantly prioritizing and accumulating.
Therefore developers and customers can get as sufficient feedback as possible.
• Reforming and optimization (Refactoring)
XP emphasizes a simple design, but simple design is not a designed water-based program, nor does it have no structure, lack of reuse
programming. Although developers are simple designed for each USER Story, it is also constantly improving design.
The process is called the design of the reforming and optimization. This name first appeared in Martin Fowler "Refactoring:
Improving The Design of EXISTING CODE "this book. Refactoring is mainly working to reduce the reuse of the procedures and reuse in the program and design, enhance the reusability of procedures, and design. Refactoring
The concept is not XP first, it has been proposed for nearly 30 years, and it is always considered to be one of the characteristics of high quality code. But XP
Emphasize that the refactoring is extremely, and should be used anytime, anywhere, as long as it is possible, the programmer is not
It should be distressed in the previously written procedure, but it is necessary to improve the procedure without lie. Of course, after each change, the programmer should run the test program.
Guarantee the new system still meets the predetermined requirements.
4 frequent integration, collective ownership, programming specification
The XP Development Team often integrates different modules. In order to improve software quality, in addition to test drive development and pair programing, XP
Require each person's code to comply with programming specification, and anyone can modify the code written by other people, and everyone should take the initiative to check
Code written by other people.
• Frequent integration (Integration)
In many projects, developers tend to integrate each module very late. In these projects, developers are often integrated.
There are many problems, but it is not possible to have a problem for who's procedures; and only after the integration is completed, the developers began to be slightly
Use the entire system, then deliver it immediately to the customer acceptance. For customers, even if these systems can pass the test test, because
Short use, there is not much grasp of the customer's heart.
In order to solve these problems, XP proposes that the entire project should be frequent, and the USER Story has been developed as much as possible.
(A new User Story each time). Each integration must run the corresponding unit testing and acceptance test to ensure that the customer is in line with the customer and
Development requirements. After the integration, a new application system is issued. In this way, during the development of the entire project, almost every two days, will
Publish a new system, sometimes even release several versions one day. Through this process, customers can understand that they have completed very clearly.
Features and development progress, and based on these conditions and developers to communicate in time to ensure that the project is successfully completed.
• Collective code Ownership, Collective Code Ownership
During many project development, developers only maintain their own code, and many people don't like other people to modify their own code.
Therefore, even if there may be a corresponding comparison development document, a programmer is very small, and it is not willing to read other programmers.
Code; and, because unclear what other people have achieved, a programmer does not dare to change the generation of others.
code. At the same time, because it is your own code, some problems can not be used because of the limitations of time tension or technical level.
Discover or get a better solution. In response to this point, XP advocates everyone to share the code, everyone has the right and obligations to read other generations.
Code, discovery, and correct errors, reforming, and optimizing code. In this way, these code is not just one or two people, but is opened by the entire project.
If the team is completed, the error will be reduced, and the reuse will be improved as much as possible, and the quality of code is very good.
In order to prevent the code from modifying other people from causing the system crash, each person should run the test program after modification. (From this point, we can see again that the various practices and rules of XP are combined with organically.)
• Programming specification
Everyone in the XP Development Team follows a unified programming standard, so all the code seems to be written by one person. because
With a unified programming specification, each programmer is easier to read the code written by other people, this is to implement Collective Code
One of the important premise of Ownership.
5 metaphor (system metaphor), not overtime
The XP process allows everyone to have a common, concise understanding of the system by using some image metaphors. XP believes that overtime is abnormal, because
For this, there is a problem with the estimate of the project progress.
• Metaphor (system metaphor)
In order to help everyone unanimously understand the customer needs to complete, the system function to be developed, the XP development team uses a lot of image metaphors
To describe how the system or function module works. For example, for a search engine, its metaphor may be "a large group of gaps
Spider, look for things to capture on the Internet, then bring things back to the nest. "
• Do not work overtime
A large number of overtime means that the original plan is inaccurate, or the program is far from knowing what work can be done. and
Moreover, development managers and customers can therefore be unable to grasp the development speed; developers are therefore very tired. XP believes if there is
A large number of overtime phenomena, development managers (such as Coach) should be determined with customers, and adjust the project gauge in time
Plan, progress and resources.
============================================================================================================================================================================================================= ==========
Introduction to some basic concepts in XP
User Story: Developers ask customers to write all the needs into a separate small story, each can be finished for a few days.
to make. During the development process, customers can make new User Story at any time, or change the previous User Story.
Story Estimates and Development Speed: Development Team Estimates each User Story and based on each development cycle
The actual situation in the ipus repeatedly calculated the development speed. In this way, developers and customers can know more about every week.
Less User Story.
Release Plan and Release Scope: During the entire development process, developers will continue to post new versions. Developers and customers
Determine the USER Story included in each release.
Iteration (Development Cycle) and Items: During a Release process, developers ask customers to choose the most valuable
User Story as the development of the next two weeks.
The Seed: After the first development cycle is complete, the system submitted to the customer. Although this is not the final product, but it
Several customers who have realized several customers think that the developers will gradually add new modules. Continuous Integration: Assemble the development of the User Story module, step by step approaching and the most
Finally complete the final product.
Acceptance test (function test): For each USER Story, customers will define some test cases, developers will make these tests
The process of the case is automated.
UNIT TEST: Before starting the write prior, the programmer first writes the corresponding test program for most classifications.
Refactoring (Reforming and Optimization): Remove the redundancy in the code, increase the reusability and scalability of the code.
summary
A success factor for XP is to pay attention to the customer's feedback - the purpose of development is to meet the needs of our customers. XP method makes developers always
Can confidently face changes in customer needs. XP emphasizes teamwork, managers, customers and developers are one of the development teams. group
The team strives to develop high-quality software through the simple but effective ways of each other, using XP. XP setup
The plan is simple and efficient; the programmer obtains customer feedback through testing, and modifies the code and design according to the change, they always strive as possible as possible.
Deliver the software to the customer. XP programmers can be brave in facing demand and technology changes.
XP is very like a mentally puzzle that is tied up by many small pieces. It doesn't make sense to see every small piece alone, but after assembly, a beautiful
The picture will be present in front of you.