In order to develop software properly, we must follow some steps, or a given approach for this development. Software engineering is the branch of computer science that helps us follow these approaches and steps correctly.
In (almost) every software engineering process, we can follow these steps:
To sum up these stages, we could say that software engineering provides an approach that helps us understand the problem to be solved (requirement analysis), design a possible solution, implement it, test it and then get a better quality or performance (maintenance).
However, all these steps may sometimes be an obstacle, since many developers think that software engineering is something too structured, that do not let them develop software quickly. But we must see sofware engineering as something adaptive, that provides different models and methodologies to be adapted to our development process, as we will see later.
A lifecycle is a list of stages through which a system (in this case, a software project) must go, from its birth until it is no longer used. In each lifecycle we set both the stages and the requirements to go from one stage to the next, including the inputs and outputs expected for every stage.
The products generated after each stage are called deliverables and they are either part of the input of the next stage or an evaluation of the project at a given point.
Some lifecycles are repetitive, this is, we can go through the same stage more than once, depending on the state of the product. This process is also known as feedback.
We are going to see some of the most typical lifecycles in software development, and their pros and cons. In all of them we will find the stages seen before (requirements analysis, design, implementation…), or any variation of them.
This is the oldest model, and the most widespread. It was created by W. Royce in the 70s, and it sorts the stages of software development rigurously, so that the beginning of a stage must wait for the end of the previous one.
It is called cascade model because the stages are placed one below the other, and the process flows from the upper stages to the lower ones, as if they were a cascade.
Pros:
Cons:
Variations:
There are some variations of this model, like the Sashimi model, in which stages are overlapped, like Japanese fish does. In this model, there is some time overlap between two sequential stages; this way, we start the design stage while we finish setting the requirements (and we can change them as we go forward with the design), and we start implementing the system while we finish with the design (so that we can improve the design because of some issues detected during the implementation).
One of the main problems of the traditional cascade model is that failures are not detected until we reach the final stages of the process. With the V model, tests start as soon as possible, and they are performed in parallel by another work team. This way, tests are integrated in each stage of the lifecycle.
Left branch of the V represents the requirement analysis, design and implementation, and the right branch integrates the tests of each stage. We move along the left branch until we reach the bottom, and then we validate the tests of the right branch, from the most specific ones (unit tests to check some concrete modules of the product) to the most generic ones (integration and system tests). Every time we detect a problem, we go back to the associated stage of the left branch.
Pros:
Cons:
The models seen so far are only suitable for projects with easy, well specified requirements, but this is not very usual in real software projects. In order to try to improve this, the iterative model repeats the cascade model, and generates an intermediate version or prototype after each iteration. This prototype can be then checked by the customer, problems can be detected earlier and then we can improve the system.
Pros:
Cons:
Variations:
There are some interesting variations of this model, with other names and some particular features:
This model was created by Boehm in 1988, and it tries to combine the cascade and iterative models. Stages are arranged in a spiral divided into four sections, so that each section does one task, and each spiral turn goes through all sections and tasks, generating one prototype after each complete turn.
This model manages the risks of software development. We start from the middle of the spiral, and in every loop we analyze all the development alternatives, we identify the most assumable risks and then perform a spiral cycle. If the customer brings new requirements or improvements, we then evaluate the risks again and perform another cycle, until the product is finally accepted.
Pros:
Cons:
Exercise 1:
Create a table like the one below (in a piece of paper, or in a text editor), and fill each cell with a YES or NO, depending on whether the specified feature is part of the corresponding lifecycle.
Cascade | V | Iterative | Spiral | |
---|---|---|---|---|
It is simple and easy | ||||
It generates intermediate versions of the product | ||||
Suitable for projects with uncertain requirements | ||||
It lets us evaluate the risks of the chosen solution |
Exercise 2:
Our team is going to develop an application to manage the accounting of a cinema company. The customer still doesn’t know what he expects from the application, and we want to use a really new technology we don’t control yet. According to this information, argue which lifecycle model(s) are the most suitable for our purpose, and which one(s) are NOT recommended.
Exercise 3:
A teacher from the Higher Polytechnic School of the University of Alicante wants to develop a program to help him correct his students’ exercises. As he is very busy, he has asked a group of old students to do it for him. We assume that, as he is a computer scientist, he knows perfectly what he wants from the very beginning. It is a small project that should not take a lot of time. According to this information, argue which lifecycle model(s) are the most suitable.