Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm wondering about functional or non-functional requirements. I have found lot of different definitions for those terms and I can't assign some of my requirement to proper category.

I'm wondering about requirements that aren't connected with some action or have some additional conditions, for example:

  1. On the list of selected devices, device can be repeated.
  2. Database must contain at least 100 items
  3. Currency of some value must be in USD dollar.
  4. Device must have a name and power consumption value in Watts.

are those requirements functional or non-functional ?

share|improve this question
    
I think the distinction between "functional" and "non-functional" is misleading and tends to leave software with poor operability. I've found that thinking about "end-user features" and "operational features" leads to better software: blog.softwareoperability.com/2013/04/08/… (my post) –  Matthew Skelton May 3 '13 at 9:51
    
@MatthewSkelton I could not tell if (2.) is an en-user feature or an operation feature. Seems to be a "testing-feature". –  moose Jul 23 '13 at 6:41
    
@moose - the requirement for the DB to /operate within certain parameters/ given 100 items is more of an operational requirement, although this might impact the end-user experience if performance were degraded. Ultimately, we'd probably need a bit more context on the requirements in the OP to be able to split into F and NF, although - as I hinted - I think this is a bit of a spurious distinction anyhow :) –  Matthew Skelton Jul 23 '13 at 13:35
add comment

6 Answers

up vote 28 down vote accepted

Functional requirements define what the system or application will do - specifically in the context of an external interaction (with a user, or with another system).

When placing a new order, the system shall display the total cost and require confirmation from the user. That is a functional requirement; it describes a function of the system.

Refer to Wikipedia: Functional Requirement for more details.

Non-functional requirements are any requirements that don't describe the system's input/output behaviour. Note that we are still talking about requirements, not implementation details, so just because we're using the phrase "non-functional" doesn't mean that anything is fair game to put in that section.

The most common types of non-functional requirements you'll see relate to system operation (availability, continuity, DR), performance (throughput, latency, storage capacity), and security (authentication, authorization, auditing, privacy).

These are all cross-cutting concerns that impact every "feature" yet aren't really features themselves; they're more like feature metadata, helping describe not just whether the system does what it's supposed to but also how well it does it. Don't take that analogy too far, though - it's just an analogy.

Non-functional requirements are not subjective or hand-wavey, contrary to what some people here seem to be suggesting. In fact, they should actually have a hard metric attached to them (i.e. response time of no more than 100 ms). NF requirements are also not implementation details or tasks like "upgrade the ORM framework" - no clue where anyone would get that idea.

More details at Wikipedia: Non-Functional Requirement.


To specifically address the examples in the question:

  1. On the list of selected devices, device can be repeated.

    • Clearly a functional requirement. Describes what the system's output looks like.
  2. Database must contain at least 100 items

    • Sounds like a business rule, so also a functional requirement. However, it seems incomplete. What is the reason for this rule? What will happen/should happen if the database contains fewer than 100 items?
  3. Currency of some value must be in USD dollar.

    • Functional requirement, but not really a properly-stated one. A more useful wording would be: The system shall support one currency (USD). Obviously this would be amended if more than one currency needed to be supported, and then the requirement would have to include information about currency conversions and so on.
  4. Device must have a name and power consumption value in Watts.

    • Not really any kind of requirement, this is more like a technical specification. A functional requirement would be stated as the power rating is assumed to be in Watts. If there's more than one UOM, then as with the currency, the functional requirements should have sections about unit conversions, where/how they are configured, etc. (if applicable).
share|improve this answer
5  
+1 Great answer. Say NO to hand-wavey 'requirements' –  Dan McGrath Nov 8 '11 at 3:57
    
Nice! What thing I'd add is that functional requirements need not deal only with interactions with the external environment however (a related concept are "interface requirements" with other systems). A counterexample for this would be "The system must index the database of users every 60 minutes". This is clearly internal. –  Aram Kocharyan Jun 16 '13 at 5:25
1  
@AramKocharyan: That's not a functional requirement. Clearly there's a customer SLA hiding in there somewhere, and that is the functional requirement. "Contact updates must be processed within 60 minutes to support timely customer service/marketing" - that is an internal, functional requirement. "Index the database of users" is not a requirement at all, it's an implementation; for example, another way to meet said SLA could be to use realtime background indexing, or to eliminate the need for indexing entirely by using a service broker or bus and processing updates in near-realtime. –  Aaronaught Jun 16 '13 at 15:31
add comment

A functional requirement is typically something the system can or will do. It can be expressed as a result of an action (Of a negative result). A non fucntional requirement is something that the customer / end user does not care about, and does not affect the outcome - e.g
- Windows will have a blue border with pink dots. - The program will be written in Java
- Anything to do with coding standards, methods and process.

Be warned though that a non-functional requirements can be turned into functional requirements by customers. examples might be - The program will be written in Erlang because the customer read a magazine article on it and wants it written in Erlang. - The program must use DB 2. because the customer is going to run it on his existing DB 2 systems, has years of experience and an IT team familiar with that platform.
- The source code must pass all MISRA recommendations.

In summary - if the customer cares about it, it's a functional requirement, otherwise it's a non functional requirement or possibly not even a requirement.

share|improve this answer
1  
-1. Both customers and end users do care about non-functional requirements, since they affect directly their productivity. Also, non-functional requirements cannot be turned into functional requirements by customers: it's not up to the customer to choose if a requirement is functional or non-functional. –  MainMa Nov 8 '11 at 5:06
    
also, non-func could be broken into "development" (developers care, e.g. maintainability) and "operational" (users care, e.g. usability) qualities –  Aram Kocharyan Jun 16 '13 at 5:30
add comment

There is already an excellent answer by Aaronaught, but since there were other answers, now removed, which were totally wrong about what a non-functional requirement is, I think it would be useful to add a few explanations to avoid the mistakes about what a non-functional requirement is.


A non-functional requirement is "a quality or property that the product must have" ¹. James Taylor tells that a non-functional requirement "[...] is [nonetheless] a requirement, and it is important to the customer—sometimes even more important than a functional requirement". He then gives two examples: the logo of the product, and the accuracy and reliability of the equipment. Those both examples show very well that:

  • The non-functional requirements are not a marketing jibber-jabber like: "Internet is important nowadays and we wanna have a website".
  • The non-functional requirements concern the customers, since they can heavily impact their productivity and the ability itself to use the product.
  • The non-functional requirements are totally objective.

The last point is essential. If the requirement is subjective, it has nothing to do in the list of requirements. It would be impossible to build validation tests from something which is subjective. The sole purpose of the list of requirements is to enumerate the non-ambiguous expectations of the customer. "I want this square to be red" is a requirement. "I want this square to have a nice color" is a wish which requires explanation.

Remember that the list of requirements is like a contract (and in most cases is a part of a contract). It is signed by the customer and the development company, and in a case of a litigation, it will be used legally to determine if you've done your work correctly. What if I order you a software product, specify that "the product must be great", and refuse to pay when the product is done, because for me, what you've actually done is not a great product?

So, let's see some examples.

  1.  The software product is responsive to the end user.

This is not a requirement. Not a functional. Not a non-functional. It's just not a requirement. At all. It has zero value. You can't check if the software system meets this requirement during validation testing. Neither you — the QA department, nor the customer.

  2.  The reloading of the user statistics performs 90% of the time below 100 ms. when tested on machine with the performances specified in appendix G part 2 and the load below 10% for the CPU, below 50% for memory and no active R/W disk operations.

It is a requirement. If the appendix G part 2 is precise enough, I can take the machine with the similar hardware and perform the validation test in QA department, and I will always obtain a binary result: passed or failed.

Is it a functional requirement? No. It does not specify what the system must do. There were probably a functional requirement before, specifying that the software application must be able to reload user statistics.

Is it a non-functional requirement? It is. It specifies a property that a product must have, i.e. the maximum/average response time, given the percentage threshold.

  3.  The application is written in C#.

Is this a requirement? We don't really know without a context. It might be a wish of the lead developer, who wants, by inserting this requirement, to avoid later a discussion with his colleagues about the language to use. It might also be a requirement based on hardware/software, legacy or compatibility elements. We don't know.

  4.  The C# codebase of the product follows Microsoft Minimum Recommended Rules and Microsoft Globalization Rules.

This is a strange thing. Personally, I would rather not call it a requirement, and put it into a separate document specifying the standards and best practices.

  5.  The main window of the application has a blue (#00f) 10px border with pink (#fcc) filled circles, those circles being placed at the inner edge of the border and being 3px in diameter, separated by 20px from each other.

It is a requirement, and a non-functional one. It specifies something we may test during validation testing, and it specifies a property of the product, not what the product is intended to do.

  6.  The vehicle tracking system measures the speed with a precision of ±0.016 mph.

Also a non-functional requirement. It gives a measurable threshold of the precision of the system. It doesn't tell what the system must do, but tells how precise is it doing its work. But wait? It tells that the vehicle tracking system measures the speed, isn't it? So it's a functional requirement too? Well, no, since we put an accent on the precision of the measurement, not on the fact that the measurement is done.

  7.  The vehicle tracking system measures the speed of the vehicle.

Now it's a functional requirement. It doesn't tell how the system works, but what it's doing. Through functional requirements, we could learn that the vehicle tracking system measures the speed, the battery power, the pressure of I don't know what and if the lights are on or not.

  8.  The pages of the website take 850 ms. to load.

This is not a requirement. Is tries to be one, but is totally invalid. How would you asset this? What pages? All? Tested through a local 1Gbps network on a quad-core client machine and a eight-core server with SSDs used at 2%, or through a modem of a old and crappy laptop while the website is being hosted by a small server used at 99%? What is meant by "to load"? Does it mean downloading the page? Downloading and displaying it? Sending the POST request with some large data, then loading the response and displaying it?

To conclude, a non-functional requirement is always a requirement, which means that it describes something which is totally objective and can be checked through an automated or manual validation test, but instead of telling what the system is doing, it explains how the system is doing something or how the system is itself.


¹ Managing Information Technology Projects: Applying Project Management Strategies to Software, Hardware, and Integration Initiatives, James Taylor, ISBN: 0814408117.

share|improve this answer
    
+1 for details. I kind of disagree with your opinion in (1), you say "this is not a requirement". I think it is a requirement but the business analyst has to make it a "measurable" requirement before the team is committed to it. I also liked your usage of the word "wish" and your distinction between "wishes" and "requirements" –  Emmad Kareem Nov 8 '11 at 6:19
    
@Emmad Kareem: you're right. I limit myself to purely technical requirements, i.e. the requirements that would be used by developers and QA. For business analysts, things are slightly different, and some elements that I qualified as not being requirements would in fact be perfectly valid ones. –  MainMa Nov 8 '11 at 6:23
    
Clear. Thanks for your reply. –  Emmad Kareem Nov 8 '11 at 7:56
    
I'd argue "The application is written in C#." is a constraint, not a functional requirement, since it doesn't describe the behaviour of the system but ascribes a limitation to the solution space. –  Aram Kocharyan Jun 16 '13 at 5:35
    
@AramKocharyan: that's why I said that we don't know whether this statement is a requirement at all. –  MainMa Jun 16 '13 at 7:24
add comment

Just to add to some existing good answers that non-functional requirements are sometimes called "ilities" - qualities that the system needs to possess in additional to its plain functionality. "ilities" include availability, usability, security, flexibility - and even more subjective aesthetics.

Some of these are very difficult to specify and assess. Nevertheless, they matter. If you are signing up to them contractually, then you will want to avoid the meaningless hand-wavy versions, e.g. "The system must be secure". The problem with trying to nail such requirements down is that people tend to gravitate to the things that are easily measurable, rather than the things that matter (and the requirements may well be written by people who don't have any grounding in the relevant specialities). The end result is that you generally end up with systems that are neither secure, usable, nor flexible (availability isn't so difficult to specify and measure, though it still causes plenty of headaches).

There are cultural differences here between folks who deal with contracts and formal stuff, and folks who deal in more general analysis, architecture, research etc. A vague hand-wavy requirement is still a requirement as far as the latter is concerned, because it expresses things that matter to the customer, even if they sympathize completely with the contractual folks that its not a useful contractual requirement until it has been explored in detail and thoroughly nailed down.

One final point - if you can't (yet) come up with an objective measure of an "ility", that doesn't mean the customer doesn't need it. Vague != unnecessary. However, it may mean we need to develop better ways to measure such things, elicit and refine non-functional requirements incrementally, or contract in ways (Agile etc) that can work without up-front objective measures for everything.

share|improve this answer
add comment

Functional or non-functional? I would say neither. Most, if not all of the listed examples look like business rules to me (specifying process-related constraints and decision rules which system processes must follow).

They're something a lot of engineers forget about or aren't aware of, as business rules are typically collected as part of business analysis (and often embedded in functional requirements specs rather than externally referenced).

share|improve this answer
    
why do listed examples look like business rules to you? –  gnat Jan 10 '13 at 5:24
add comment

These comments are all very good but they are way over-cooked and do not offer a clear template to work with. Wouldn't it be clear to specify it as:

In my opinion, a functional requirement is what the user experiences when using the application. It is requirement that need to be met when a developer tries to implement this from scratch, make enhancements or modifications. For example: the user should log in. Let's say if you also add a new way to run the application via a command prompt then the user still has to log in.

A non-functional requirement happens under the bonnet. The user is not aware of it, but it has to be there however it is implemented. For example: The application should be developed in C#. If it is developed in any other language the user will not notice. But that may be a requirement because it is based on existing code. Another example would be that it must be installed on certain server. Moving servers would not be noticed by the user.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.