System Requirements
These constrain the whole system to do what the client needs. They
should be broken down and the results allocate to different components
in a systems architecture -- hardware + software + procedures + data + people.
Given that each part fits its requirments then you should be
able to argue that they will work together to achieve what is required.
Notice that a requirement must state a constraint on a part of a system. System requirements are often high level requirements. We often use outlines to describe how the constraints on the whole system is broken down into a collection of constraints on the parts of the system.
Software Requirements
Requirements are more or less precise descriptions of what software (and sometimes
hardware) has to do plus how well it should do it.
Requirements have to be thought about and specified whenever software
is being developed or maintained. It is especially important with outsourced
software development. As a rough rule, the worse the communications between
stakeholders and developers is (for example outsourced oversees), the more
formal and rigorous your requirements must be.
Well written requirements tend to avoid over-constraining the solution to
problems. The avoid describing the internal structure of the software.
Be very careful to learn the difference between
[ Functional requirements ]
and
[ non-functional requirements ]
before moving on the modern way of organismic requirements -- use cases.
Before Starting Requirements
Systems Analysis and Systems Design.
Systems Design is not program design
Process:
Non-functional vs Functional requirements
This is a key distinction.
Functional requirements
define what a process or system must do.
They tend to define what happens to the data that flows in and out of the
process. They define the what not the how. For example:
The student is entered in the roster for the chosen section.
In addition to these functional requirements we have quality requirements that define how well the process or system carries out its function. The traditional name is non-functional requirements for these. They demand special care when developing software. Quality requirements are about how good the software has to be. For example:
If possible to register in class then this must happen with in a second.
Quality requirements are often about things that must not happen. For example
During registration the students id must be protected from sniffers.
Typically you will find both functional and quality requirements in the initial (high level) descriptions. As an example:
Grades will be posted securely.
Typical quality requirements: security, safety, reliability, speed, efficiency, storage space, economy, etc. You can add various costs and the time to develop and/or maintain a system.
Notice that a functional requirement
The teacher can change grades on the systemdescribe something that must be done but a quality requirement can say that something must be difficult or even impossible:
A student can not change any grades stored on the system
The architecture of software often depends more on the needed qualities than the function specifications.
Typically quality requirements start off with a nice desirable quality like "User friendly". But they need to be made precise. They need to be expressed as a set of measurements that can be made of the final product: "The user can find out how to cut and paste data on the form without being told", "In a sample of 10 users, after using the product, 9 of them rate it as 'easy to use' ..." The most reliable quality requirements are base on national standards.
Similarly, a requirement that "Grades are stored securely" might imply that nobody, even if they access the data, can determine a student's grade unless they are the teacher or the student. This is quite difficult to achieve, and might be watered down in practice so that reading grades without being the teacher or student should take several hours of work. Another refinement is: Anyone can read the grades but they can not figure out who each grade is assigned to.
Technique -- List Features
A common technique in mass marketed software is to document the requirements
in terms of a list of "features" that will be provided. This is largely driven
by marketing. The technique is also used in other situations -- executives
and steering committees make up a list of the features they want a new
or updated system to provide. They are a mix of functions and qualities.
It is possible that this technique contributes to the low quality of much software.
Technique -- Top-down Functional decomposition
Functional requirements can be developed top-down. You start with large
scale needs and then decompose them into a set of requirements, which together
achieve the top-level.
DFDs help to do this right.
However, this technique was taken to extremes in the
two decades proceeding the 1990's. As a rule: stop decomposing functions
when you are down to a single program. Then switch to other techniques.
Tool -- Checklists and Forms
A checklist is a handy tool to avoid forgetting things. So are forms.
So most organizations have a whole set of these to help manage projects.
For example, in the CSUSB CSCI department we require all senior and
graduate projects to follow the IEEE standard "Software Requirement Specification".
[ ../SRS/ ]
Method -- Traditional System Development Life cycle -- SDLC -- Reminder
A straightforward project that can
follow the traditional sequence:
Method -- JAD -- Joint Application Design
This is similar to
Participatory Design.
Joint Application Design involves the users and other stakeholders
in the process of designing systems and specifying requirements. Typically
the developers and the stakeholders have meetings. And the meeting generate
requirements for the software being developed. The advantage is that
the stakeholders have a strong chance of getting what they want.
However, they can also run a large project into the ground by producing requirements faster than they can be coded. When the clients continuously produce new and corrected requirements faster than the developers can implement them JAD breaks down. Some form of incremental delivery and a system to control the rate of change of requirements is almost a necessity when using JAD with large systems.
Method -- RAD -- Rapid Application Development
The two above techniques assume that the stakeholders and the developers have
all the knowledge that they need to come up with a better system. This is
not a reliable assumption. We often need to do some research before we development.
One response to the need to learn about the solutions and needs is the RAD
method of prototyping.
The aim is to give stakeholders what they want quicker. RAD relies on tools that let's developers throw software together quickly. Prototypes define requirements and are then thrown away. They are developed quickly with no attention to other qualities. They are not documented, tested, or designed to be maintained.
These prototypes are best used when you think that people don't really know what is needed. They are also very useful for sorting out user interfaces: you can show two versions of the GUI and ask which is best? RAD was fashionable in the 1990's but is getting less press these days.
As a rule user interfaces need iterative development. But it is still better to make the user interface a separated but well-crafted part of the software.
How do you decide on the method JAD, RAD, ...
The different methods do have different personalities -- even if they share
thought: "Involve the stakeholders in the process". In fact the
first decision you need to involve others in -- is in selecting the
method: Have they the time and resources for JAD meetings? Would they
prefer to see demos of the product every now and then? Would they be
willing to send a representative to live and work as part of the
development team (as in XP)? ...
What is the best way to start the design of a system
I still like the classic approach: map out the current system and look
for a set of processes and data stores that could work better. Think in
terms of doing surgery to the living enterprise:
"What organs need replacing?". As you talk to people take note of
where the current system hurts. Be ready to brainstorm.
Then "drill down" into the details at the boundaries of the old and new.
Don't forget to involve the stakeholders and get your ideas reviewed.
What are the advantages and disadvantages of JAD
JAD gives people what they want -- but occasionally JAD
tends to lead to wasting time and money on a system that does not work.
Ideally as each requirement comes out of the JAD team it should have a price
tag attached to it, and a Change Control Board (or equivalent) decides
if the enterprise can afford the price for the new feature/quality/...
Which is used most in the workforce -- JAD or RAD
I don't have any data! My feeling (from reading 5 or 6 magazines
on software development each month) is that RAD getting unpopular.
Indeed I think we are seeing mixed methods where a JAD meeting is
used with a PC prototyping system and projector to rapidly
develop a mock up system -- RAD.
Agile Methods
Agile methods stress people and providing value to the stakeholders.
Instead of prototypes they provide a sequence of quick high-quality,
high value, useful, iterations.
Instead of meetings they tend to have an informal work place where everybody
can hear what is going on.... complete with on-site users.
They also stress shared code and documents. They often stress doing
detail work in pairs: pairing. Some have "stand up meetings".
Instead of paper work documentation they stress face-to-face communication, test plans, chalkboards or white boards, posters, 3-by-5 cards, sticky notelets, and code. They want documentation to be "Just good enough". However -- "Don't let the sun set on bad code". They stress excellent source code and 100% compliance with tests for programs -- from the first iteration onward. They stress automating routine tasks -- like testing. Indeed most of them are "Test Driven Development" -- they write the tests before they write the code. Thus the software requirements specification for a project is a set of tests!
They often include an explicit "code refactoring" process that improves the quality of working code without breaking any tests. This counters the well known tendency of code to "rust" as small changes are made to it. In refactoring a series of small changes are made to the code that are sure to not break it. Each is followed by a quick retest. Step by step the code becomes clearer and better structured.
The key difference between RAD and Agile development is that
one uses prototypes and the other iterations.
Iterations vs Prototypes
A prototype is often incomplete and nearly always of low quality.
As a rule it is harder to put quality into bad software than it is to
add features to good software. Some call them "throw-away" prototypes.
Can a prototype be incomplete
Yes.
Can a prototype be of low quality
They often are.
A high quality prototype program is best called an iteration
and in some sources it is called an evolutionary prototype.
Can RAD prototypes evolve into better programs
In your dreams. RAD means low quality... and
low quality code makes
evolution difficult.
Does a special RAD language like DELPHI give prototypes that can be converted into a final product
Only in small projects -- In My Humble Opinion.
In my experience the prototype tends to become a nightmare. For example see [ ../tools/mth2html.txt ] (Mad laughter echoes from the dark dusty dungeon of deadly code)
Requirements Tool -- Use cases
A use case is a description (in text or table form) of how a user
uses the system to get something tangible from it.
Low level functions/processes in a DFD tend to be use cases.
Definition of Use Case
A use case describes how a user gets something of benefit
from a system. It can also spell out what can go wrong and what
is done about it. A use case describes the interaction between a user
and the software -- it must not describe what happens inside the software!
It can show the steps taken by the user to get what they want -- but
not format/layout/media.
Key point: a use cases says who wants what, and how they can get it. Use cases are text documents. Use Cases are not diagrams. Use case diagrams are just a visual summary of a collection of use cases.
In essence, a use case defines a set of scenarios associated with one user and
one of their needs, but you can add:
The diagrams can be done by most tools: Dia, Visio, and IBM Rational Rose.
Hints on use cases
(UC1): student registers in class.
(UC2): Faculty gets a roster for their class.You can then use hyperlinks to refer to them.
Examples:
(Process my Email): A student can login, see the headers of Email
messages and then read, delete, reply to, and forward a message.
Example
. . . . . . . . . ( end of section Casual) <<Contents | End>>
Fully Dressed format
| System | OSS: Online Shopping System. |
| Name | UC12: Validate credit card |
| Actors | Prime: Customer, Secondary: Credit card company |
| Other Stakeholders | Client |
| Description | the credit card validation process |
| Main Success Scenario |
|
| Alternative 1 | In step 2 if the credit card company rejects card, system sends rejection message to user. |
| Alternative 2 |
|
| Alternative 4 | In any step, the client doesn't respond after 30 minutes, cancel the transaction. |
| Alternative 5 | In any step, if there is a power failure.... TBD |
| Alternative ... | - |
| Precondition | Customer has selected at least one item and has proceeded to checkout area. |
| Post condition | Credit card information has been validated. Customer can continue with order |
| Assumptions | None |
| Special Requirements | Security -- No way for customer data to be sniffed. |
Note: KISS in CSCI372. We do the complex diagrams and formats in CSCI375.
Develop use cases using text processors...
Use the Casual Format use case in this class:
Use Case Diagrams
Don't go overboard on drawing use case diagrams. Keep them simple.
Use cases are about writing not drawing.
The following part of a use case diagram shows connections
between use cases: Adding classes includes logging in and logging out.
So does getting a class roster.
It also shows the special alternative case of trying to add a full class.
This is called an "extension" and is expressed as extending particular
steps in the basic use case.
These are the only connections between use cases that you should draw.
The diagram does not show the "Special case of" arrow. This is rarely used.
When should we use a UML use case diagram
When you want to present your ideas.
You need one in complex projects when
you have a dozen or more use cases and you notice some common
patterns developing.
Questions
What is a Sunshine scenario
The simplest perfect case when a user does the right things, the
system has the right resources and the user gets what they wanted.
How many use case scenarios should be included in a project
There is no ideal number. Big projects have many
use cases and small projects have a few (simple) use cases.
In fact the number
of the total number of scenarios indicates how big and expensive a project will
be.
See [ 000980.html ] in the Coding Horror series for example feature lists, and how "creeping featuritis" leads to buggy software.
A classic example was the FBI VCF project but the page on it
has vanished.
Details on JAD
See
[ JAD ]
for a good definition and description.
There have been several books published on JAD
JAD is explicitly mentioned in a special issue (Vol 36 no 4) of the "Communications of the Association for Computing Machinery" on "Participatory Design". An article (page 41) credits IBM in the 1970's as the source. This article also tracks the evolution of the JAD method... The whole issue (looking back at it from 13 years later) is full of ideas that are now part of the mainstream, see [ toc.cfm?id=153571&coll=portal&dl=ACM&type=issue&idx=J79&part=periodical&WantType=periodical&title=Communications%20of%20the%20ACM&CFID=3065872&CFTOKEN=95778283 ] (the special issue on Participatory Design = PD).
RAD on the Wikipedia
See
[ Rapid_application_development ]
for history etc.
Real world examples of using a prototype
Here are half-a-dozen references to publications of experiences
with various kinds of prototypes:
[CarrollCarrithers84]
[Cerietal88]
[Cloyd01]
[Constantine00]
[GordonBieman95]
[KamataYoshizawa00]
[KeilCarmel95]
[Morales00]
The Agile Alliance
[ http://www.agilealliance.com/ ]
RUP
For more see
[ RUP ]
on the Wikipedia.
CSCI375 is all about UP which is a non-proprietary version of RUP.
See
[ ../cs375 ]
for details.
Alternate Technique -- Usage Scenarios
Usage Scenarios are simpler and more precise than use cases. They rapidly get
to the heart of how the software and its users interact.
However they are not widely used.
See
[ usage_scenarios.html ]
for more.
Use cases on the Wikipedia
See
[ Use_cases ]
for a good description.
Use case Resources on the Web
Sensible introduction:
[ systemUseCase.htm ]
Proposal made to Hewlet-Packard [ use_case.pdf ] (Full disclosure -- I worked with the author 40 years ago).
Example from Virginia Tech [ usecases-ex1.html ]
Wikipedia: [ Use_cases ]
Books on Use Cases
Alexander Cockburn: writing effective use cases
Martin Fowler: UML distilled
UML diagrams on the web
You can find the UML
notations in Fowler and the UML manuals. See
[ Use_case_diagram ]
If you have time or the tools you can make the use case diagram a MAP in an HTML page and link the bubbles to their definitions See [ UseCases.html ] for an slightly over the top example.
. . . . . . . . . ( end of section Requirements and Use cases) <<Contents | End>>
Abbreviations
Also see [ glossary.html ] for more special abbreviations and phrases.