Learn through the super-clean Baeldung Pro experience:
>> Membership and Baeldung Pro.
No ads, dark-mode and 6 months free of IntelliJ Idea Ultimate to start with.
Last updated: March 18, 2024
We can see computer science as the art of solving real-world problems through computations. So, one of the relevant abilities of a computer scientist, or a software developer in a broad sense, is abstracting the real world into computing models able to solve particular problems.
Abstract models, in turn, are built based on a series of requirements defined together with the stakeholders of the on-development software. These requirements define the desired relation between inputs and outputs, determining calculation processes to the expectations of the final product quality.
In this tutorial, we’ll study requirements in software development. First, we’ll check the definition of requirements as well as their categories. Thus, we’ll understand what functional and non-functional requirements are in detail. Next, we’ll see some techniques employed to define requirements. Finally, we’ll review the studied concepts while comparing them in a systematic summary.
In short, according to the famous Business Analysis Body of Knowledge (BABOK), a requirement is a representation of a need. So, in a software development context, we see requirements as a set of demands that a software product must carry out.
However, requirements fit into several contexts and have multiple categories. The most relevant of them are:
In the context of this tutorial, we’ll focus on investigating the category of solution requirements by exploring functional and non-functional classes of them.
Functional requirements are the features implemented by the programming team while developing a software product. More tangibly, we can see functional requirements as the calculations done by a software solution and the ways it consumes, processes, and generates data: they describe what software does.
Defining functional requirements is a mandatory stage of the software development process. Such requirements usually come from use cases established by the future operators of the on-development solution. So, the development team analyzes these cases, mapping them to software features and determining the necessary implementation technologies.
There are several categories of functional requirements. Among them, it is relevant to highlight the following categories:
Of course, there are other categories of functional requirements, such as backup, recovery, audit, archiving, etc. However, they are employed in systems with particular characteristics that demand them. By the way, there is no absolutely mandatory functional requirement category; we should define them according to the necessities of each software project.
In summary, non-functional requirements refer to attributes and properties representing quality expectations regarding a software solution. The set of non-functional requirements highly depends on the particular execution scenarios to which the software is submitted.
Specifying non-functional requirements is not a mandatory task at all. We can develop software through only a set of functional requirements. However, the software solution will work in a best-effort model without considering any performance parameter expectation.
But to which parameters do we refer when we talk about performance expectations?
There are multiple parameters we can consider. These parameters are related to different non-functional requirements categories. Thus, let’s examine the most usual categories and their parameters:
Finally, we define non-functional requirements on-demand. So, we do not have a minimum or maximum set of categories and parameters.
We specify software solution requirements in a document called Software Requirement Specification (SRS). The SRS can include both functional and non-functional requirements and will work as a guide to the development team.
We can write SRS documents based only on plain text or even employ extra resources, such as use case diagrams and user stories. Anyway, the most relevant about an SRS is that it should be accessible and interpretable by all the people involved in the software development, from the future users to the technical team.
An SRS document must have at least three sections:
Let’s briefly see some popular resources used in SRS documents for describing software and its requirements in the following subsections.
A use case diagram is tailored to determine the interactions of a software solution with its operators and administrators. We have three main entities in these diagrams:
The most common presentation of a use case diagram is on a figure which defines associations between the previously presented entities. The following figure shows an example of such a diagram:
A user story also aims to determine the desired software solution. However, it focuses on the end-user perspective, defining what they want to execute and which data they have to access in the solution.
A user story consists of free text, but they usually consider formatting as presented next:
I, as a <type of user>, aim to <goal> so that <reason>.
Furthermore, each user story may be associated with an acceptance criteria list, which presents the stakeholders’ required characteristics for implementing the user story in a software solution. Acceptance criteria are also defined as free text; the best acceptance criteria lists are very concise and testable, working as a checklist for the developers.
Functional and non-functional requirements represent essential resources for any software development team. Functional requirements determine all the necessary features, while non-functional requirements provide performance parameters of how such features must work in the software solution.
Taking into account the previous definition, we can say that defining functional requirements is a mandatory process. On the other hand, the non-functional requirements definition is optional but highly recommended to guarantee the quality of the final product.
As we saw throughout this tutorial, we have different functional and non-functional requirements categories, each with distinct purposes and objectives. A large software project may include requirements from all categories, but ordinary ones typically define only a subset.
The table next summarizes and compares some relevant characteristics of functional and non-functional requirements:
| Functional Requirements | Non-functional Requirements | |
|---|---|---|
| Definition | Define what a software solution does | Define how a software solution work |
| Essentiality | Mandatory | Desirable |
| Result | Software features | Software properties |
| Focus | Users’ requirements | Users’ expectations |
| Origin | Future users and stakeholders | Stakeholders and technical teams |
In this tutorial, we studied functional and non-functional requirements. Initially, we briefly reviewed general concepts regarding requirements to investigate functional and non-functional ones particularly. So, we saw some techniques to create requirement documents. Finally, we outlined the main characteristics of functional and non-functional requirements and compared them in a systematic summary.
We can state that requirements are crucial resources for designing software products and guiding their development. So, analysts and developers must employ time to define and interpret requirements, thus getting the best final product possible which covers all the stakeholders’ technical necessities.