一款软件是如何开发出来的

软件生命周期

When you think of software development, you probably think first of a person writing code. In fact, for any important piece of software, there will be many people involved and only some are developers.

Think of building a house. Long before a brick is laid, different people have done lots of work. The person paying for the house—let’s call them the client—decided what sort of house they wanted: how big it should be, how many bedrooms it should have, and so on. An architect took these ideas and turned them into detailed plans and estimated the cost of building. While the house is being built, people with different technical skills—bricklayers, plasterers, plumbers. and so on — are involved. A project manager will create a plan and track progress. Their job is to make sure the technical people have what they need and also to fix any problems and let the client know how things are going. People from the government may come to test that all safety regulations are being followed. The client will surely visit to make sure the building is being built just as they asked.

Different types of job are also performed when a big piece of software is developed. Some of the jobs even have the same names, like architect and project manager. Let’s take a look at a classic plan for developing a software project.

A Classic Software Development Process:The V-Model

The left arm of the V is about deciding exactly what should be developed; the right arm describes the stages of testing required before the system goes live. Only the bottom box is about the writing of the code. The process goes along the V, but the dotted line shows that each stage of defining the system has a matching testing stage.

V 模型是软件开发的一 种开发过程,该模型指 出软件开发中的各阶段 以及其对应软件测试阶 段之间的关系

When lots of people are working together on something, it’s important for them to have an understanding of how to work together. For software development, one of the classic way is to follow the V-model.

项目经理项目的主要负责人,协 调实施中的问题,控制 项目人力与时间成本等 工作,推动项目成功

Let’s follow an example. In early 2020, governments across the world wanted to build a new type of website, one that showed COVID data to the public. How might that software development project have gone?

It would have started with a government official sitting down with an IT team to talk through what needed to be built. The site would be quite simple: a home page showing graphs of cases, hospital admissions, and deaths for the whole nation and then a more detailed page for each of those, where a user could filter by region, date, and so on. It would need to be running all the time and would have huge numbers of people using it.

From Requirements to Llive Code

The process starts with the creation of the user requirements. This stage is all about talking to the client about what the system should do. A person called a business analyst works to understand the client’s needs and write them down in detail. It’s a skilled job as sometimes the client doesn’t know exactly what they want and needs some guidance. A business analyst thinks through the requirements and uses their experience to challenge the client if they find any problems with what is planned. For the website example, the client might have asked for a really complicated home page. The analyst instead would recommend a simpler design, knowing that the page would have to work on a small mobile device, not just a desktop. Finally, the analyst makes his recommendation and writes a software specification that describes what the site must do. It’s reviewed and approved by the client.

软件需求说明文档中包 含的内容

The user requirements are then used to define exactly what needs to be built – the software specification. A software architect becomes involved at this stage. They will consider both the functional requirements (what the system will do) and also the non-functional requirements (some basic system settings, like how many users it will need to support and how fast it should perform certain functions). They decide what software language, operating system, and database software to use. There is some discussion with the business analyst at this stage to clarify details. For example, if the architect wants to reuse an existing JavaScript library to build the graphs on the page, which would make the project quicker and cheaper, the analyst would need to change the requirements. The business analyst then explains the situation to the client, who agrees with the change.

系统分析师系统分析师的主要职 责是项目的业务需求 分析、系统需求分析、 可行性分析等。系统分 析师面对的业务需求不 仅仅是指客户提出的需 求,还要去挖掘潜在的 但又是系统必需的业务 功能。系统分析师通常 要与行业专家、用户、 项目经理、系统架构师 频繁商讨,分析项目的 特点、成本、风险,拟 定实现的模型

The next stage is high-level design, this stage describes all the different types of software required and how they will work together. At same time the project manager has already started putting together a team of developers and testers and briefing them. Project manager is a very important role. Their job is to turn all of these steps into a plan so everyone knows how long the process should take.

系统架构师
系统架构师是软件项目 的总体设计师,对项目  需求和应用场景给出最 恰当的解决方案。系统 架构师负责设计系统整 体架构,把握整个项目, 使设计的项目尽量效率 高,开发容易,维护方  便,升级简单等。系统 架构师还配合项目经理 做好软件开发中的项目 管理

The high-level design works like the architectural plan of a house. This point is very important. When building a house, the person putting in the water pipes needs to put them where the person fitting a bathroom needs them, but they work at different times, so the architect creates a diagram showing where everything should go. The different developers review this design and suggest improvements based on their skills and experience. In our example, the person building the database will not be writing the code that queries that database. The database expert could be worried about performance and persuade the architect to add caching of the data within the web server.

The low-level design is done by the software development just before they get into writing the code. Each type of developer works separately. The front-end developer will write the code, such as HTML or JavaScript, that will run in the browser. A back-end developer will write code to turn HTML requests into SQL queries, fetching data from the database. A database developer creates the tables required to store the data.

How We Know It Works: Testing

Once coding is complete, we move back up the V in the testing arm. Each type of testing matches a stage of the design. The developers will perform unit tests to show that the piece of code they’ve written works as defined in the low-level design. Next, they’ll test that the code written by the different technical experts works together. This integration testing, makes sure the overall software design is working as it should. For example, a test might involve pressing a button on a web page that calls code that runs an SQL query on the database. If this works, it shows that the different types of software are working together properly.

一个软件项目的进行,最初是在客户、需求 /系统分析师和系统架构师之间的互动开始。需求文档和系统设计完成之后,交由 UI 设计师和软件设计师进行下一层次架构以及模块的设计,再由程序员编写程序代码;在此同时,测试工程师开始工作,完成从具体程序到系统的一系列测试,经过反复调试修改,最后交付使用。项目经理负责整个项目的进度以及与客户的协调

System testing might involve the business analyst and will cover the entire system. The goal is to ensure it matches the original specification for everything the system does. Finally, acceptance testing will involve the client. Only once they are happy can the process finish and the system be put live. It’s rare for everything to pass tests the first time. So the developers are likely to be working during the testing phases to fix any problems found. Then that phase of testing is repeated with the corrected code until all tests are passed.

Within the software industry, testing is a specialist role. Good testers take pride in finding problems. Each one they find means a better experience for the people using the live software. If you enjoy using a piece of software, remember the testers. Without them, you’dbe the one finding the bugs!

软件设计师
软件设计师负责按照系统总体设计规 格说明书进行软件设计并编写程序设 计规格说明书,组织和指导程序员编 写、调试程序,以及软件优化和集成 测试

As we saw in the V model, there are different types of testing that can be performed on software. Unit and integration tests are often performed by the technical team. For modern software, the tests themselves might be run by automated scripts that can be used again after the software is live. System and unit acceptance testing will simulate the whole business process and, so, may require hundreds of individual tests.

程序员
程序员主要负责软件项目的代码编写 和内部测试,对小型软件项目也可以 兼任系统分析和软件设计。程序员通 常熟练掌握两到三种高级语言(如 Python、C/C++ 和 JAVA), 熟知数 据库 SQL 的基本语法

Performance testing might be part of a system test phase. This involves using software to simulate many users all acting at once and putting load on the system. It’s an important step, particularly, for websites.

UI 设计师
“UI”就是用户界面。UI 设计师研究 软件的人机交互和操作逻辑,设计操 作界面的外观以及定义用户与软件之 间交流互动的方式。UI 设计师主要集 中在网页设计和移动应用界面设计上

Security testing is important for software on the Internet. Specialist tools scan a system to make sure there are no loopholes or backdoors, covert methods of gaining access to a program or system by bypassing security controls, that can let criminals in.

Delivery

测试工程师负责找到最佳的测试 方式,来检查软件中 的 Bug,以及软件的稳 定性、安全性、易操 作性等性能,并撰写 测试规范和测试用例

Let’s go back to our example. After the security and performance testing are completed, the proud team will show the site to the government official. The client is impressed, but they’ve had a great idea for a new type of graph that would look really good. If they can add that in? The project manager and the architect exchange a look. The architect shakes his head: the deadline is fast approaching. The project manager talks to the client and persuades them to wait and get the site live first!

The client agrees, and soon the site is turned on, containing official figures about real people’s lives. A press release goes out, and the team sits together watching the data showing people accessing the site. The number of users goes up and up: first hundreds, then thousands, and more. Anxiously they check the servers, but everything seems calm. The site is working as it should.

It’s getting late and the team is done. They text their friends to tell them this site was something they helped build and go home feeling proud.

The Software Lifecycle

A piece of software has stages it passes through—a lifecycle. Once developed, software systems are put live to do the job they were built for.

The W-Model

The W-model is an extension of the V-model that further emphasizes testing. Testing is brought into the early stages of the project by having reviews of the requirements and specification documents . Also detailed planning of the testing phases is done then . The goal is to make the developers and designers take more responsibility for testing.

So much emphasis is put on testing because if a problem is found at a late stage, it is much more expensive to fix. Finding problems with the requirements document early on is much cheaper than making big changes during user acceptance testing as there is no need for retesting of large segments of code at this phase.

Sometimes big software projects last for years, and by the time the client gets to test the system, the world has moved on and their requirements have changed. Other software development methods have ways to avoid this as we’ll see in the next chapte

In-use software is likely to be updated due to changes in the outside world. If it needs to do new things, then the software must be updated. This is like adding an extension to a house to accommodate a change in the family. Some software goes through many different versions. They’ll look for ways of making it easier to extend the software in the future and make it strong enough to bear heavier workloads. This might mean making it possible to migrate the software onto other hardware or operating systems.

敏捷开发是一种比较新型的开发方式。敏捷开发将整个开发周期分为多个小周期,每个小周期快速迭代新版本。随着每一次的迭代,软件的问题和需求在不断地更新,使开发过程更灵活。此外敏捷开发更关注人员间的高效沟通,效率更高。Scrum 是敏捷开发的实现方法之一,它将开发周期分为几个“冲刺”,每个冲刺设立一个共同目标,团队成员每天检视完成目标的进度,并进行调试

As more and more software systems are connected to the Internet, issues of security become more important. Criminals are always looking for new ways of getting access, and part of supporting in-use software is making sure any backdoors are quickly closed.

运维工程师负责在产品上线后维持后程序的 稳定运行,快速解决出现的问题, 并对系统进行持续的优化

Nothing lasts forever. Software goes through many cycles of updates, and eventually turned off and decommissioned. It may be that the job it was doing is not needed any more. Maybe the software is too slow or becoming hard to support, so an entirely new piece of more modern software will be developed to replace it. This will be the end of that complete software lifecycle.

运营负责在上线后维持产品的长期运 转,工作可能包括活跃用户数量 的增长、保证内容持续输出、活 跃社区氛围等

The W-model is an extension of the V-model that further emphasizes testing. Testing is brought into the early stages of the project by having reviews of the requirements and specification documents . Also detailed planning of the testing phases is done then . The goal is to make the developers and designers take more responsibility for testing.
So much emphasis is put on testing because if a problem is found at a late stage, it is much more expensive to fix. Finding problems with the requirements document early on is much cheaper than making big changes during user acceptance testing as there is no need for retesting of large segments of code at this phase.
Sometimes big software projects last for years, and by the time the client gets to test the system, the world has moved on and their requirements have changed. Other software development methods have ways to avoid this as we’ll see in the next chapter.

Contributors

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top