Project

General

Profile

Spectodesign » History » Version 6

Shuvam Misra, 05/12/2018 07:09 PM

1 1 Shuvam Misra
# From spec to design of a business application
2
3
{{>toc}}
4 2 Shuvam Misra
5
This page will describe
6
* what processes we can follow to arrive at detailed software design from layman specs, and
7
* what documents we need to create along the way
8
9
We will first start by taking a look at the spec and design documents conventionally used in the industry for a few decades, then look at the terminology used by the much more recent agile development chaps, and then arrive at the documentation we need for our use in Merce. After that, we will describe the process we can follow to arrive at the detailed design document.
10
11
The objective of this entire process is to arrive at documentation which can be handed over to a bunch of good programmers who can then do the coding and testing without discussing spec with the client.
12
13
## Documentation in the traditional approach
14
15
The traditional approach, called the "waterfall" approach, believed in documenting everything in great detail, getting the client to sign off on each document, and then starting software development. In that approach, the steps were as follows:
16
17
* The **BA** (Business Analyst) studies the business operations of the client, suggests some changes to the process for suitable computerisation, and then captures all this in something called a **BRD** (Business Requirements Document). The BRD is also known as BRS (Business Requirements Specifications), FRS (Functional Requirements Specification), etc. They roughly mean the same thing.
18
* The tech team then sits with the **BRD** and creates the **SDD** (Software Design Document). This contains technical design and architecture which is useful for the programmers who will develop the software.
19
* Modern applications are expected to have very good UX and UI, since no user wants to go through a training programme or read a user manual to use it. Therefore, a third activity is the UX and UI design, which is done by studying the BRD. This UI design is used by developers to design the screens.
20
21
This is three-part process for software design and specification in the conventional approach. The dev team finally gets 
22 3 Shuvam Misra
23 2 Shuvam Misra
* the SSD
24
* the UI spec and screens
25
26
to do their coding.
27 4 Shuvam Misra
28
## Documentation in the agile approach
29
30
The agile approach does not believe in creating documentation first, and then starting their coding activity. They believe that documentation needs to be created in short chunks, enough to feed the dev team for 1-2 sprints. They have a very specific structure for their software spec. They talk of specifications in a 4-level hierarchy:
31
32
* **The theme**: a company-wide focus area, specified in broad terms
33
* **The initiative**: a large objective or target, assigned to a department or multiple departments, to achieve in a time-bound manner. Many initiatives may emerge from a theme.
34
* **The epic**: a target to be achieved by a single team. Many epics may emerge from a single initiative.
35
* **The user story**: a small, single deliverable, demo-able task or function or feature to be implemented in a software application. Many user stories together are used to deliver an epic.
36
37
### Examples of themes, initiatives and epics
38
39
* A **theme** could be: "we need to increase our profits by 20% in the next financial year."
40
* Some **initiatives** which may emerge from this theme:
41
    * **Initiative 1**: cut costs by 10% in the fixed overheads of the company
42
    * **Initiative 2**: improve programmer productivity by 5% through all teams
43
    * **Initiative 3**: acquire 15 new customers in the next financial year
44
* Some **epics** which may be triggered by the Initiative 3 (acquire 15 new customers):
45 5 Shuvam Misra
    * **Epic 1**: recruit and train 3 new sales executives and deploy them on the field (Sales Dept)
46
    * **Epic 2**: revamp the website to reflect more attractive offerings we have (Marketing Dept)
47
    * **Epic 3**: set up a call centre for outbound sales calls for lead generation (Marketing Dept)
48
    * **Epic 4**: deploy the latest version of a salesforce automation system and train the full sales team on it (IT Dept)
49 4 Shuvam Misra
* Some **epics** which may be triggered by Initiative 1 (cut fixed costs):
50 5 Shuvam Misra
    * **Epic 5**: explore relocation of HO to less expensive real estate (Estate Dept)
51
    * **Epic 6**: install intelligent AC monitoring systems to reduce AC electricity bills (Admin and Facilities Mgmt)
52
    * **Epic 7**: downsize some of the clerical departments and outsource to a BPO (the relevant clerical depts)
53 4 Shuvam Misra
54
As is evident, the agile approach to specifying a "project" is not limited to software development alone, and works very well both for software and for non-software projects.
55
56
The examples clearly show:
57
58
* A theme is a company-wide focus area, stretching over a longer term. It is implemented by kicking off various initiatives in the company.
59
* An initiative is a large activity with a single target or objective, but may involve multiple departments, functions or teams
60
* An epic is a smaller activity which involves exactly one team within one department, and it is expected to be completed in a shorter timeframe than a theme or initiative. The epic is what we, in the software world, call "a project".
61
62
We can almost characterise these things this way:
63
64
||Time scale|Size|
65
|---|---|---|
66
|Theme|a financial year|full organisation|
67
|Initiative|a financial year|one goal across multiple departments or teams|
68
|Epic|3-4 months|One team in one department|
69
|User story|a few days|One software dev team of 5-10 people|
70
71
### Examples of user stories 
72
73
Here we are assuming that we are building an FA system.
74
75
* As an accounts executive, I should be able to enter new vouchers into the system so that I can log all accounts transactions.
76
* As an accounts executive, I should be able to edit existing vouchers so that I can correct errors in them.
77
* As an accounts manager, I should be able to see a list of vouchers entered into the system in the last day or week, so that I can monitor progress of work and keep track of recent transactions.
78
* As a Financial Controller, I should be able to see the up-to-date P&L statement, so that I can keep track of overall company income and expenditure.
79
80 6 Shuvam Misra
Every user story *always* has the following parts:
81 4 Shuvam Misra
82
* **Persona**: *e.g.* an accounts executive
83
* **Desired feature or capability**: *e.g.* see a list of vouchers entered into the system
84
* **So that**: *e.g.* I can keep track of progress of work and see recent transactions
85
86
User stories, in the context of software development have the following features:
87
88
* They are the smallest unit of software spec or feature which can be delivered and demonstrated to the end-user
89
* They always specify something which the non-technical end-user can *use*, therefore they will never specify just a library to be developed or a database table to be created
90
* They are almost always something which can be implemented by a small dev team (a sprint team) in a few days at max.
91
92 1 Shuvam Misra
As a result of all this, they are almost always full-stack. In other words, implementing a user story involves building the screens (HTML, CSS, *etc*), writing the front-end code (browser-based or app code), writing back-end server-side web service calls, *etc*, creating database tables, integrating with other systems as needed, and so on. Each user story may be a very narrow feature or function *horizontally*, but is full-stack *vertically*.
93 6 Shuvam Misra
94
### Documentation in the agile world
95
96
Since documentation is built incrementally as software is developed, in sprints, therefore the documentation is quite different in this approach.
97
98
There are two broad approaches to agile software development: [scrum](https://en.wikipedia.org/wiki/Scrum_(software_development)) and [kanban](https://en.wikipedia.org/wiki/Kanban_(development)). These are two *implementations* of the agile methodology. Scrum is more suited for the turnkey development of a software application, and kanban is better suited to the continuous improvement phase of a product.
99
100
In the scrum approach, the documentation which is developed is:
101
* the **epic**: just a few lines of text
102
* the list of **user stories**: each stated in 1-2 sentences
103
104
Needless to say, this is not enough for the developers to actually write code. But this is what is created and entered in a project tracking system like Redmine or Jira as a "burn-down chart". If all the user stories are implemented and accepted by the end-users, the project is deemed complete.
105
106
Actual development needs more work, which is done within the sprint by the multi-functional dev team:
107
* add details to the user story: write additional notes of the business logic, work flow, etc
108
* create the screens for the user story
109
* define the data model: add new tables, add columns to existing tables
110
* decide the code to be written: new code as well as re-factoring and re-structuring of existing code
111
* test automation scripts, test cases, *etc*
112
113
Therefore, a user story usually leads to a set of **sub-tasks** which are created by the team (maybe by the team lead or the PM) and then assigned to individuals who execute them one by one. All the sub-tasks of a user story must be completed within the same sprint, because the mandatory requirement is that a sprint must deliver a few *complete user stories*. Half-complete user stories are not allowed to be spread across sprints.
114
115
## Documentation for Merce
116
117
In Merce, we can follow the following documentation:
118
119
* The BA phase can create a BRD
120
* The UX/UI phase can create high-fid screens from the BRD
121
* The SSD can be created from the BRD
122
123
These three can then be fed to the dev and  testing teams to implement the software, in the form of a sequence of sprints. In other words, we are doing some documentation in the conventional approach, and then implementing the code using the agile approach of sprints.
124
125
## What the documents contain
126
127
The BRD will contain
128
129
* a one-page description of the overall project and its objectives
130
* a list of personas: the various categories of users who will use the system
131
* a list of business operations: for each business operation there will need to be:
132
    * a low-fid or "rough" screen with fields
133
    * a list of input and output fields
134
    * brief notes about the calculations or logic, if needed (for more complex operations)
135
* NFR notes: non-functional requirements like
136
    * performance: must give millisecond response,
137
    * database size: how many vouchers,
138
    * number of users,
139
    * languages supported: do you need multi-lingual support?
140
    * platforms supported: Chrome on Linux, Chrome on Windows, iPads, Android phones, *etc*
141
    * integration with other systems if any
142
    * and any other such requirements
143
144
The SDD will contain
145
146
* architecture of the final system: could be just one big diagram
147
* list of components: Apache, JBoss, NodeJS, Postgres database, Redis, Angular front-end, *etc*
148
* data model: which will include
149
    * ER diagram
150
    * database schema: for main database, Redis cache, secondary databases, if any
151
* list of screens: with notes about operation or business logic of each screen (half-page to one page per screen)
152
* list of web service calls: with input and output parameters: 1-2 pages per call
153
* other modules: with their code if any (*e.g.* code for Alfresco, code to run in an ESB, *etc*)
154
155
The UI spec will contain
156
* the list of user stories: and for each story:
157
    * the sequence of screen names used, in a bullet-list form
158
* the set of screens: their pixel-perfect images or HTML+CSS
159
* style guide: specifying
160
    * which theme to use (if ready-made theme is being used)
161
    * which colours to use where, in hash-hex notation
162
    * actual set of icons in PNG/JPEG format
163
    * other sizes of things like margins, borders, font sizes, etc
164
    * font spec, including font files if any
165
166
With these three documents, we can start doing software development.
167
168
## How to create a BRD
169
170
To be completed.
171
172
## How to create SDD from BRD
173
174
To be completed.