Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to write a functional specification? [closed]

We always write functions or classes and their logic is very complicated. If there is no specification for these structures, later it will be hard for even ourselves to grasp the ideas.

How do you write specifications for complicated functions and classes?

Please tell me something about your own experience, but not just some link, thanks.

like image 476
MemoryLeak Avatar asked Aug 28 '09 23:08

MemoryLeak


People also ask

What is a functional specification example?

Examples of functional requirements include company information, start date, list of services, the purpose of the product, audience, organization, how it works, competition, and budget/deadline. Other possibilities include context, user requirements, a data flow diagram, and a logical data model.

What makes a good functional specification?

Functional specifications are an essential step in building quality software that you'll want to support over the long term. They define the requirements to be implemented in the software. A good specification needs to carefully describe how the software will look and behave in all situations.

What is in a functional specification document?

A Functional Specification Document (FSD) is a document designed to give an overview of how a software system, mobile app or web app functions. The document gives a detailed step-by-step outline of each item's functionality and flow.


2 Answers

I find the biggest challenge with functional specifications is not the format directly, but keeping them in sync with things that drive them (requirements) and things that build upon them (test cases, documentation).

For that reason, I prefer to handle this issue with a model-driven approach rather than a paper-driven one.

I use a UML modeling tool (Enterprise Architect by Sparx Systems, but many tools work as well) to capture all of the artifacts of the project in one place and create traceability between them. In Enterprise Architect, I can create traceability from a requirement artifact to a design artifact (for example) by just putting them both on the same diagram and creating a connector from one to the other with a mouse drag.

My "functional specification" is actually a collection of activity diagrams, one per use case in the system. Each use case ties back to one or more requirements that necessitate that use case. Even end users find it easy enough to follow the activity diagrams and validate them (how easy is it to get end users to read, let alone understand and validate, a traditional, paper-based functional specification?)

In a similar manner, I can create traceability from my activity diagrams (use cases) to specific design artifacts like class diagrams.

QA can model test cases and create traceability from their test cases to the use cases. That way, we see if there are any use cases that do not have test cases (or don't have enough test cases).

The nice thing about Enterprise Architect as a tool is that all of these artifacts are stored in a SQL database, so I can just run some queries that I have built up over time to find artifacts with nothing tracing to/from them.

like image 179
Eric J. Avatar answered Oct 16 '22 14:10

Eric J.


You should make on research on the following subjects (not necessarily in order):

  • UML
  • SSD
  • Use Cases
  • Activity Diagrams

These are the most common approaches for software projects specification.

like image 36
rogeriopvl Avatar answered Oct 16 '22 13:10

rogeriopvl