The software lifecycle
On This Lesson 11 topics
Lesson Overview
Software is not built once and then finished. It is born from an idea, designed, written, tested, given to users, kept running, changed many times, and eventually shut down. This path from first idea to final shutdown is called the software lifecycle.
In this lesson you will learn seven stages: requirements, design, build, test, release, operate, and retire. You will also learn the most important feature of the lifecycle: it is a loop, not a straight line. What happens after release feeds back into new requirements.
In the restaurant picture: deciding what the restaurant should serve (requirements), planning the menu and the kitchen (design), cooking the dishes and setting up (build), tasting before opening (test), opening the doors (release), serving customers every day (operate), and closing for good one day (retire). Customers' comments change the menu, so the cycle begins again.
Why this matters: a large part of a backend engineer's time goes to stages after release. Many beginners imagine that writing code is the whole job. This lesson corrects that.
This lesson builds on the previous lessons of this module: software is instructions plus data, and a backend is a service that keeps running.
Learning Objectives
By the end of this lesson you will be able to:
- Name the seven stages of the lifecycle in order.
- Describe in one or two sentences what happens in each stage.
- Explain why the lifecycle is a loop and where the feedback comes from.
- Place a described activity (for example "a customer reports a bug") in the right stage, and say which stage starts again.
- Explain why releasing software is not the end of the work.
- Explain why a failure found late costs more to fix than one found early, using a plain example.
- State that real teams organize these stages differently (some in long steps, some in short cycles), and the names vary.
Written Explanation
The seven stages
Here are the stages in the order they first happen.
| # | Stage | Question it answers | Typical result |
|---|---|---|---|
| 1 | Requirements | What do the users and the business need? | A clear list of what the software must do |
| 2 | Design | How will it work? | A plan: the pieces and how they connect |
| 3 | Build | How do we make it? | The working code |
| 4 | Test | Does it really do what was required? | Evidence that it works, and a list of defects |
| 5 | Release | How do users get it? | The software is available to real users |
| 6 | Operate | How do we keep it running well? | A running, monitored service |
| 7 | Retire | When and how do we shut it down? | The software is switched off safely |
Different books and companies use slightly different names and sometimes split or merge stages. Wikipedia, for instance, notes that the phases of a development process are not always strictly separated and that simple projects may combine or overlap phases. The seven names above are the ones this course uses. If you see "implementation" for build, "deployment" or "deploy" for release, or "maintenance" for operate and change, they are close cousins.
Stage 1: Requirements
Before anyone writes code, the team needs to know what is needed, and for whom. This is the requirements stage.
Good requirements say what the software must do, in words the users and the team both understand. For a food-ordering app:
- "A customer can see the menu of a restaurant."
- "A customer can place an order and pay."
- "A restaurant sees new orders within a few seconds." (Notice how a requirement can include how fast something should be.)
Requirements also cover limits: how many users, how safe, how much it may cost. They come from talking to users, the business, and other teams.
A frequent trap: requirements that are not clear. "Make the app better" cannot be tested or built. "A customer can reorder a past order in two taps" can.
Stage 2: Design
Design answers: how will it work? Before building, the team plans.
For a backend, design includes decisions such as:
- What pieces are there (a mobile app, a website, a backend, a place to store data)?
- What data is stored, and in which form?
- How do the pieces talk to each other?
- What happens if something fails?
Design does not need to be a giant document. It can be a sketch on a whiteboard. Its purpose is to find the big mistakes while they are still cheap to fix: moving a box on a drawing costs nothing, while moving it in finished code costs days.
Stage 3: Build
In the build stage, programmers write the code (the instructions from the first lesson) and prepare it to run. This is what most beginners picture when they think of software work.
Building includes more than typing code: it also means organizing the code, reusing existing tools and libraries, and keeping the work saved safely (you will learn version control with Git later). In this course, you will spend a lot of time here.
Stage 4: Test
Testing is checking that the software does what the requirements say, and finding problems before users do. Testers and developers try the normal cases and the unusual ones: "What if the basket is empty?", "What if the price is negative?", "What if two people order the last item at the same moment?"
A defect (also called a bug) is a difference between what the software does and what it should do. Tests may be run by people, or by other programs written to check the software automatically; both are common.
Testing can show that problems exist; it cannot prove there are none. That is why teams keep testing and keep watching after release.
Stage 5: Release
Release is the moment the software is made available to real users. For a mobile app, that may mean publishing a new version in an app store. For a backend, it means putting the new instructions onto the servers and starting them (this is often called deploying).
Release can be a big event, with a specific date, or a small routine step done many times a day. Either way, it is where the software leaves the team's hands and meets real people and real data.
Stage 6: Operate
Operate means keeping the released software running and healthy, for as long as people use it. For a backend, this is where the lesson on services applies: the service must stay up, answer quickly, and keep the data safe.
Operating includes:
- Monitoring: watching signs that the software is working (is it answering? how fast? any errors?).
- Fixing: dealing with problems and failures as they appear.
- Maintaining: updating the software, the servers, and the tools it depends on.
- Listening: collecting what users report and what the monitoring shows.
This is typically the longest stage. A piece of software may be operated for many years after it was built.
Stage 7: Retire
Software does not live forever. At some point, it is replaced by a new system or no longer needed. Retiring means shutting it down on purpose and doing so safely:
- Telling users in advance.
- Moving the data that still matters to its new home, or deleting what must not be kept.
- Switching off the servers, and cleaning up so that nothing keeps running or costing money without reason.
Retiring is often forgotten. Old services that nobody owns anymore, still running, still holding data, are a real problem in many companies.
The lifecycle is a loop
If the lifecycle were a straight line, it would stop after release or after retire. In reality, the middle of the story keeps going around:
Requirements -> Design -> Build -> Test -> Release -> Operate -> Retire
^ |
| |
+------------ feedback: bugs, new needs -----------+After Release, the software is operated. In operation, real users find bugs that tests missed, ask for features, and use the software in ways nobody expected. Those findings become new requirements and the cycle runs again, perhaps for a small fix or for a new feature. The loop ends only when the software is retired.
That is why "software is done once it is released" is wrong. Release is the beginning of the part where the software is really used.
Different ways of organizing the stages
All teams go through these activities, but they arrange them differently. Some do each stage once, in order, for a large project (often called the waterfall style). Others use many short cycles, in which a small piece goes through requirements, design, build, test, and release in days or weeks, and then they repeat (agile methods are examples). The course's later modules touch on this. For now, remember: the stages are activities, and a team can do them in big steps or in small, repeated cycles. In the small-cycle style, the loop turns fast.
Why early checks are cheaper
A principle that guides much of software work: the later a problem is found, the more it costs to fix. Picture a mistake in the requirements, such as forgetting that orders must be paid before the restaurant sees them. If caught at requirements, you change a sentence. If caught at design, you change a drawing. If caught in build, you change code written so far. If caught in test, you change code and its tests. If caught by customers after release, you also have unhappy customers, possibly wrong data, and an urgent fix.
I describe this as a general principle based on common experience in software work. I did not find a specific number in the sources I checked, so do not quote a figure for it.
Examples
Example 1: planning a school timetable app (simple)
A school asks for a small app for its timetable. Walk through the stages:
- Requirements: teachers must see their lessons for the week; students must see their class timetable; the office must be able to change a lesson.
- Design: a phone app and a website for viewing; one backend that stores lessons; a simple login.
- Build: write the code for the app, the website, and the backend.
- Test: check that a changed lesson appears for the right class and no one else, and what happens when two rooms clash.
- Release: the school installs the backend and publishes the app.
- Operate: the office reports that a teacher is missing from the list; the team fixes it. At the start of the year, new classes are added.
- Retire: three years later, the school buys a bigger system. The old app is switched off and the timetable data is moved.
Example 2: a user reports a bug after release (practical)
A customer writes: "I ordered pizza, but the app charged me twice."
- Which stage found it? Operate. The software was released and in use when a real customer found it. (Testing did not catch it.)
- What happens next? The loop turns. The team describes the problem as a new requirement ("a customer is charged exactly once per order"), looks at the design and the code, fixes the code (build), checks the fix and tries to reproduce the problem (test), and releases the fixed version (release). Then it is operated again, with an eye on whether the problem has gone.
The team may also ask the deeper question: why did our tests not catch this? Adding a test for double charging is part of the fix, so the loop leaves the software better than before.
Example 3: the life of a food-ordering backend (realistic)
Follow a backend through several years:
| When | What happens | Stage |
|---|---|---|
| Year 0, month 1 | Founders list what customers and restaurants need | Requirements |
| Year 0, month 2 | The team sketches the pieces and what data is stored | Design |
| Year 0, months 3-6 | Developers write the backend and the apps | Build |
| Year 0, months 5-6 | Testers try orders, failed payments, many users at once | Test |
| Year 0, month 6 | The backend is deployed and the apps are published | Release |
| Years 1-4 | The service runs daily; fixes and new features go through the cycle many times | Operate (and the loop) |
| Year 5 | The company is replaced by a bigger platform; users are told; data is moved; the old servers are switched off | Retire |
The dates here are invented to show the shape. Notice the overlap: testing begins before the build ends, and operation is by far the longest period. The loop through requirements to release turns many times in the operate years.
Backend Insight
The lifecycle explains much of a backend engineer's actual working life:
- You will spend more time with software after release than before. Reading existing code, fixing defects, and adding features to a running service is a core skill. Writing a new service from scratch is rarer than people expect.
- Operating is part of the job. Many teams expect the people who build a service to help run it: answer when it breaks, watch how it behaves, and improve it. You will meet these ideas again in later modules.
- Releases to a running service need care. A backend never "finishes" (previous lesson), so changing it means replacing instructions in something that users are using right now. Teams plan how to do this with little or no interruption.
- Retire carefully. Data kept by an old service may be personal or legally important. Shutting down means deciding what to keep and what to delete, not just pressing a button.
- Good requirements and design pay off. The cheapest bug is the one you avoid by asking a clear question early.
This lifecycle returns later in the course path, in the lessons on how teams run projects and how software is released and operated, where the same seven ideas show up in more detail.
Common Mistakes
Mistake 1: Thinking software is "done" once it is released
- Incorrect: "We released it, so the work is finished."
- Correct: "Release starts the operate stage, where users find new problems and ask for changes. The cycle starts again."
Mistake 2: Seeing the lifecycle as a straight line
A line stops. The lifecycle loops: what is learned in operation becomes new requirements. The only real end is retire.
Mistake 3: Believing build is the whole job
Writing code is one of seven stages. A team that skips requirements may build the wrong thing; one that skips testing delivers defects; one that ignores operating cannot keep the service healthy.
Mistake 4: Forgetting to retire
Switching off is a planned stage, not an afterthought. Forgotten services keep running, keep costing money, and may keep old data that nobody looks after.
Mistake 5: Believing that tests prove there are no bugs
Tests can show that something is wrong. When all tests pass, you only know that the cases you thought of work. That is why monitoring and listening to users continue after release.
Exercises
Try each exercise yourself before opening the solutions.
Level A: Foundation
A1. Write the seven stages in order from memory.
Show solution A1
A1. Requirements, Design, Build, Test, Release, Operate, Retire.
A2. In one sentence each, say what happens in the Design stage and in the Operate stage.
Show solution A2
A2. In Design, the team plans how the software will work: its pieces, its data, and how they connect. In Operate, the team keeps the released software running, watches it, fixes problems, and maintains it.
A3. Which stage comes immediately after Build, and which immediately before Release?
Show solution A3
A3. Test comes right after Build, and Test comes right before Release.
Level B: Application
B1. For each activity, name the stage: (a) a team lists what users need, (b) engineers switch off an old server and move its data, (c) someone tries to order with an empty basket to see what happens, (d) developers write the code for the order page.
Show solution B1
B1. (a) Requirements. (b) Retire. (c) Test. (d) Build.
B2. Explain why the lifecycle is described as a loop. Use the words operate and requirements.
Show solution B2
B2. After release, the software is operated, and real users find bugs and ask for changes. Those findings become new requirements, so the stages start again. The cycle only ends when the software is retired.
B3. A restaurant owner says: "Our app is finished. We released it last week." What would you tell the owner?
Show solution B3
B3. Release is not the end. Now that real people use the app, they will find problems and want changes, so the app needs to be operated: monitored, fixed, and improved. The team should expect the cycle to continue.
Level C: Challenge
C1. A bank discovers on release day that its software does not support a currency that customers need. Compare the cost of discovering this during requirements with discovering it after release, in your own words.
Show solution C1
C1. Found in requirements, it costs a sentence in a list and a conversation. Found after release, customers are already affected, the team must urgently change design and code, test again, and release again, and may have to repair incorrect data. The same fact costs far more later. (I am not giving a number.)
C2. Choose an app you use (for example a messaging app). Describe one change that probably went through the whole loop in the last year, from request to release, and say where the request first appeared. Hedge: you may not know the real story, so call it a plausible guess.
Show solution C2
C2. For example, a plausible guess: users asked for "edit a sent message" (requirements, first heard through support or feedback in operation), the team decided how it should work (design), wrote it (build), checked it with testers and automatic tests (test), published it in an update (release), and now watch how people use it (operate). Any answer that covers all the stages and says it is a guess is correct.
Mini Challenge
Write the life story of a piece of software you could imagine building, for example a small library app that tracks borrowed books.
- Under each of the seven headings, write one or two sentences of what would happen.
- Draw the loop: add an arrow from Operate back to Requirements, and write one example of feedback that would travel along that arrow.
- Write one thing you must decide at the Retire stage about the data.
- Mark which stage you think would last longest, and why.
Check your work: you used all seven stages in order, you have an example of feedback that starts a new cycle, and you did not stop at Release.
Summary & Next Lesson
Key takeaways
- The seven stages are requirements, design, build, test, release, operate, retire.
- Requirements say what is needed. Design plans how. Build writes the code. Test checks it. Release makes it available. Operate keeps it running. Retire shuts it down safely.
- The lifecycle is a loop: feedback from operating becomes new requirements, until the software is retired.
- Release is not the end. Operating is usually the longest stage.
- The later a problem is found, the more it generally costs to fix.
- Teams organize the stages in different ways (big steps or small cycles), but the activities are the same.
Next lesson
You now have all the pieces: what software is, its five kinds, the idea of a service, and the lifecycle. In the last lesson of this module, a demo called "One app, many pieces", you will watch a single product (a mobile app, a website, and a backend) and see these ideas work together.
Self-check
- List the seven stages in order.
- Which stage is usually the longest?
- Why is the lifecycle a loop?
- A user finds a bug after release. Which stage found it?
- Why is "retire" a stage and not just "switch it off"?
Show answers
- Requirements, design, build, test, release, operate, retire.
- Operate.
- Feedback from real use during operation becomes new requirements, so changes go around the cycle again.
- Operate.
- Switching off safely needs planning: telling users, moving or deleting data, and making sure nothing keeps running or costing money without reason.
References
- Wikipedia, Software development process. Supports the general ideas that development efforts pass through phases from beginning to end of life, that methodologies differ in how sequential or iterative the phases are (for example waterfall versus iterative and agile methods), and that simple projects may combine or overlap phases. That page does not list the exact seven stages used here.
- The seven-stage names and the restaurant picture are this course's own teaching framing, matched to common usage; other sources use different names (for example implementation, deployment, maintenance). The statement that late-found problems cost more is a widely held general principle that I did not verify with a specific study or figure, so no numbers are given.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.