Waterfall Model in Software Engineering
The software development life cycle (SDLC) is a well-structured and planned methodology. It consists of pre-defined processes to develop and deliver high-quality software products. There are different SDLC models, each of which takes a different approach to developing software. Among all, the waterfall model is the most classic one.
It is one of the earliest and oldest models of the software development life cycle. It takes a sequential approach to create software or applications. With the inception of many new models taking a modern approach to development, the waterfall model is rarely in use today. However, it plays a crucial role in software development because it forms the basis for all other SDLC models.
Well, in this article, we will discuss everything about the waterfall model.
What is the Waterfall Model in Software Engineering?
Winston W. Royce, in 1970, created the classical waterfall model. It is an SDLC model that takes a linear, sequential approach to building software products. It comprises different phases that progress sequentially downwards in a specific order, resembling a waterfall, hence the name – “Waterfall Model.”
In this model, each phase has its own goals and deliverables. You can move on to the next phase only after the current phase completes. This is because the outcome of the current phase will act as the input for the next phase.
Additionally, once you complete the current phase and go to the next one, there is no way to go back to that phase again to fix any errors or make any desired changes. Thus, the development flow moves only in one downward direction, and that too in sequential order. So this model is also known as Linear Sequential Model.
Key Features of the Waterfall Model
- Sequential Approach: It goes through different SDLC phases in a linear sequence, where you can move to the next phase only after the completion of the current phase.
- Document Driven: This model is completely based on documentation and is known as document-driven. The development team follows documentation to accomplish the goal of delivering high-quality software products.
- Rigorous Planning: This model involves rigorous planning. It has a pre-defined project scope, timelines, and deliverables that are monitored throughout the development process.
When to Use the Waterfall Model?
There are certain scenarios where you can use this SDLC model:
- When you need to develop large and complex projects with lengthy timelines.
- Where the project requirements are pre-defined well, and the project projects are clear and concise.
- When there is little scope for errors and changes in requirements.
Hence, this model is ideal to use for developing large, complex projects within the given deadline and budget with high quality.
Phases of the Waterfall Model in SDLC
This model consists of the following 6 phases:
1. Requirement Gathering & Analysis
Initially, the development team thinks about the feasibility of developing a software product. This means they think about whether developing the software is technically and financially feasible.
Next comes the requirements gathering and analysis. It involves capturing the software’s possible requirements from stakeholders and customers and documenting them for future use. This takes in two following phases:
- Requirements Gathering and Analysis: The development team collects the essential requirements from all the possible stakeholders and analyzes them. During the analysis, they eliminate incomplete and inconsistent requirements. Incomplete requirements are those removed from the actual requirements. Inconsistent requirements are those that contradict others.
- Requirements Specification: After requirements analysis, the development team documents them in a Software Requirement Specification (SRS) document. It contains both functional and non-functional requirements of the software.
2. System Design
In this phase, we gradually move forward to answer the ‘How’ of the system after answering the ‘What’ in the previous phase. The development team transforms requirements into a format that can be easily converted into the chosen programming language.
Further, it involves creating design documents specifying the different modules/components of the system, their interfacing, data flow, etc. All the data collected is stored in a software Design Document (SDD) document. This document helps establish the software’s architecture.
3. Implementation/Coding and Unit Testing
The implementation phase, also known as the coding phase, converts the software design into the source code using a suitable programming language. Besides a programming language, this phase uses a development environment, database, etc., to develop the software product.
Further, developers perform unit testing on each software module. Unit testing checks whether a specific software module functions as expected without errors.
4. Integration and System Testing
Now comes the testing phase. It involves validating the software product developed against the functional and non-functional requirements specified during the requirement gathering and analysis phase.
This phase includes integration and system testing. Integration testing logically combines unit-tested software components and validates the interaction between them. On the other hand, system testing validates the software as a whole.
The deployment phase involves making the software live in the production/real environment after it undergoes multiple rigorous checks.
Over a period of time, a software product may require some updates to remain functional in the real-world environment. The maintenance phase takes care of this activity by timely tuning the software as per the requirement.
It is the most crucial phase of SDLC. Even if the software is live and end users use it, it is essential to update it regularly. Maintenance requires 60% of the total effort required for developing the entire software.
There are three types of maintenance:
- Corrective Maintenance: It involves correcting errors left undiscovered during the development and testing stages.
- Perfective Maintenance: This entails enhancing the functionality of the software product.
- Adaptive Maintenance: If you want the software to port to another environment, such as a new computer system or operating system, adaptive maintenance comes in handy.
Advantages of the Waterfall Model
Here are some remarkable benefits of this classical model:
- It is easy to understand and implement.
- Each phase is processed at a time.
- There are specific deliverables in each phase of the life cycle.
- All the activities to be performed in each phase are clearly defined.
- It is perfectly suitable for projects where all the requirements are predefined and understood clearly. Requirements do not change throughout development.
- The release date and the final cost are already estimated before the development begins.
- It is easier to assign tasks to different team members.
- All processes, actions, and results are well documented.
Disadvantages of the Waterfall Model
This model has a lot of disadvantages and is not commonly used these days. They are as follows:
- No Feedback Path: This classical model develops software in a linear, sequential approach. The next phase begins only after the current phase completes, and there is no way to return to the previous one. So, even if there are errors in the previous phases, there is no feedback path. The model assumes that developers will not commit any errors during development.
- No Change in Requirements: Customer requirements constantly change throughout the development process. However, the SDLC waterfall model requires pre-defined requirements at the beginning of the development process. Hence, there is no scope for adding any new or changing existing requirements during development.
- No Overlapping Phases: As discussed above, the next phase commences only after the execution of the current phase. As a result, there is no overlapping of phases in this model. But, overlapping phases are required to increase efficiency and reduce cost.
- Lack of Flexibility: We know that this model is highly rigid because of its linear, sequential approach. It is impossible to return to the previous phase once it is completed. Also, it does not accommodate any requirements changes.
- Late Defect Detection: You might have noticed that the testing phase begins at the end of the development phase. Hence, defects are detected at the later stages of development, which can be challenging, time-consuming, and expensive to fix those errors.
- Not Ideal for Complex Projects: Complex projects generally need flexibility and may have changing requirements. However, this model is not ideal for developing them.
- Limited Stakeholder Involvement: The waterfall model requires clearly defined requirements at the onset of development. Therefore, stakeholders are involved only at the beginning and not throughout the development.
Application of the Waterfall Model
You can use the waterfall model for:
- Large and complex software development projects require a linear, sequential, and structured approach. This ensures that the projects are developed on time and within the budget.
- Safety-critical systems, such as aerospace and medical systems, where the results of errors or defects can be very serious.
- Government and defense projects that require software to meet all the specified requirements.
- Projects that have well-defined and stable requirements.
This was all about the waterfall model in software engineering. It is one of the oldest models that form the basis for all modern SDLC models. It involves executing different phases in a linear, sequential order. However, it is rarely used these days because of its limitations of not accommodating new requirements, lack of flexibility, and late detection of defects. It is ideal only for projects with clearly defined requirements.