Reputation: 64
I am documenting a project and I have found myself wondering if this is a requirement, a functionality or business logic, after all it is a chat system and if this is not the business logic I would not be able to say what it is. Here is what i think is bl:
We'll describe starting from the fact that a user 'A' is connected to a chat with user B and 'A' sends a message. Cases to consider:
User B is also connected. Any exchanged message should be displayed in real-time for both.
Afterwards, it should be saved in the database so that the chat has a history (marked as read).
The list of chats mentioned above should be reordered.
User B is within the app but not connected to the chat with user A.
The message should be saved in the database (marked as unread).
User B should be notified and shown that there are new unread messages in the chat (notification or display within the app).
The aforementioned list of chats should be updated for reordering.
User B is completely disconnected.
The message will be saved in the database (as unread).
A push notification will be sent to user B.
Upvotes: 0
Views: 191
Reputation: 1110
if this is a requirement, a functionality or business logic
Those are not the technical distinctions: requirements in software engineering come in two (and only two) categories, explicit vs implicit (see below for the meaning, short of a good engineering book), and what you ask about belongs specifically to the former side of requirements.
Namely, yours are examples of usage scenarios (whether or not part of e.g. a Use Case analysis specifically, or User Stories, etc.), and they indeed belong to
the conceptual, aka functional, aka business, aka explicit side of requirements; as opposed to
the technical, aka non-functional, aka implicit side of requirements.
Upvotes: 0
Reputation: 10215
- Any exchanged message should be displayed in real-time for both.
- Afterwards, it should be saved in the database so that the chat has a history (marked as read).
- The list of chats mentioned above should be reordered.
- The message should be saved in the database (marked as unread).
- User B should be notified and shown that there are new unread messages in the chat (notification or display within the app).
- The aforementioned list of chats should be updated for reordering.
- The message will be saved in the database (as unread).
- A push notification will be sent to user B.
These (above) are all requirements, because they define things the solution needs to do - whether it be a behavior or outcome.
Ideally requirements should be testable - in that regard some of the requirements could be improved.
Requirements come in different types. A lot of these are System Requirements or Technical Requirements - meaning they are what I might expect a technical analysist to produce for a developer.
Other types include Non-Functional Requirements (NFR) which deal with system qualities such as performance and availability, and Business Requirements which describe outcomes that "the business" (the client) wants - these should or tend to be technology agnostic.
Any exchanged message should be displayed in real-time for both.
That's an interesting one - context and intent is so important: this one could be interpreted as functionality, a business requirement or an NFR:
As a practical note, its not uncommon for things like you have listed to be subject to debate in terms of which category they fall into, so whilst I would definitely try to categorize things correctly I'd also try and avoid spending too much time on things that fall into that grey zone.
Terms like "real-time" can become problematic when you think about human vs computer context - what appears as real-time to us is not instantaneous to a computer.
Upvotes: -2
Reputation: 9446
Requirement: I, as a user want to be able to accomplish X
Functionality: The system provides functionality Y (in order to satisfy X)
Business Logic: The software implements logic Z (in order to implement Y)
Requirements are what the user's goal is, what need do they have to be fulfilled, it is the WHY. Functionality is WHAT the system does. And business logic is HOW the system does it.
In your example, the Requirement is that user A can deliver a message to user B. The requirement doesn't talk about the how, or databases, or interfaces, just the goal of User A to deliver a message to User B.
The functionality includes:
The business logic includes:
Upvotes: 1