Project

General

Profile

Spectodesign » History » Version 10

Shuvam Misra, 05/12/2018 07:15 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 7 Shuvam Misra
7 2 Shuvam Misra
* what processes we can follow to arrive at detailed software design from layman specs, and
8
* what documents we need to create along the way
9
10
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.
11
12
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.
13
14
## Documentation in the traditional approach
15
16
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:
17
18
* 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.
19
* 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.
20 8 Shuvam Misra
* One or more architects are sometimes brought in to design the overall architecture of the solution.
21 2 Shuvam Misra
* 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.
22 1 Shuvam Misra
23 8 Shuvam Misra
This is the four-part process for software design and specification in the conventional approach. The dev team finally gets 
24 3 Shuvam Misra
25 2 Shuvam Misra
* the SSD
26
* the UI spec and screens
27
28
to do their coding.
29 4 Shuvam Misra
30
## Documentation in the agile approach
31
32
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:
33
34
* **The theme**: a company-wide focus area, specified in broad terms
35
* **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.
36
* **The epic**: a target to be achieved by a single team. Many epics may emerge from a single initiative.
37
* **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.
38
39
### Examples of themes, initiatives and epics
40
41
* A **theme** could be: "we need to increase our profits by 20% in the next financial year."
42
* Some **initiatives** which may emerge from this theme:
43
    * **Initiative 1**: cut costs by 10% in the fixed overheads of the company
44
    * **Initiative 2**: improve programmer productivity by 5% through all teams
45
    * **Initiative 3**: acquire 15 new customers in the next financial year
46
* Some **epics** which may be triggered by the Initiative 3 (acquire 15 new customers):
47 5 Shuvam Misra
    * **Epic 1**: recruit and train 3 new sales executives and deploy them on the field (Sales Dept)
48
    * **Epic 2**: revamp the website to reflect more attractive offerings we have (Marketing Dept)
49
    * **Epic 3**: set up a call centre for outbound sales calls for lead generation (Marketing Dept)
50
    * **Epic 4**: deploy the latest version of a salesforce automation system and train the full sales team on it (IT Dept)
51 4 Shuvam Misra
* Some **epics** which may be triggered by Initiative 1 (cut fixed costs):
52 5 Shuvam Misra
    * **Epic 5**: explore relocation of HO to less expensive real estate (Estate Dept)
53
    * **Epic 6**: install intelligent AC monitoring systems to reduce AC electricity bills (Admin and Facilities Mgmt)
54
    * **Epic 7**: downsize some of the clerical departments and outsource to a BPO (the relevant clerical depts)
55 4 Shuvam Misra
56
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.
57
58
The examples clearly show:
59
60
* A theme is a company-wide focus area, stretching over a longer term. It is implemented by kicking off various initiatives in the company.
61
* An initiative is a large activity with a single target or objective, but may involve multiple departments, functions or teams
62
* 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".
63
64
We can almost characterise these things this way:
65
66
||Time scale|Size|
67
|---|---|---|
68
|Theme|a financial year|full organisation|
69
|Initiative|a financial year|one goal across multiple departments or teams|
70
|Epic|3-4 months|One team in one department|
71
|User story|a few days|One software dev team of 5-10 people|
72
73
### Examples of user stories 
74
75
Here we are assuming that we are building an FA system.
76
77
* As an accounts executive, I should be able to enter new vouchers into the system so that I can log all accounts transactions.
78
* As an accounts executive, I should be able to edit existing vouchers so that I can correct errors in them.
79
* 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.
80
* 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.
81
82 6 Shuvam Misra
Every user story *always* has the following parts:
83 4 Shuvam Misra
84
* **Persona**: *e.g.* an accounts executive
85
* **Desired feature or capability**: *e.g.* see a list of vouchers entered into the system
86
* **So that**: *e.g.* I can keep track of progress of work and see recent transactions
87
88
User stories, in the context of software development have the following features:
89
90
* They are the smallest unit of software spec or feature which can be delivered and demonstrated to the end-user
91
* 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
92
* They are almost always something which can be implemented by a small dev team (a sprint team) in a few days at max.
93
94 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*.
95 6 Shuvam Misra
96
### Documentation in the agile world
97
98
Since documentation is built incrementally as software is developed, in sprints, therefore the documentation is quite different in this approach.
99
100 9 Shuvam Misra
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. We will focus on the scrum approach henceforth.
101 6 Shuvam Misra
102
In the scrum approach, the documentation which is developed is:
103
* the **epic**: just a few lines of text
104
* the list of **user stories**: each stated in 1-2 sentences
105
106
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.
107
108
Actual development needs more work, which is done within the sprint by the multi-functional dev team:
109 10 Shuvam Misra
110 6 Shuvam Misra
* add details to the user story: write additional notes of the business logic, work flow, etc
111
* create the screens for the user story
112
* define the data model: add new tables, add columns to existing tables
113
* decide the code to be written: new code as well as re-factoring and re-structuring of existing code
114
* test automation scripts, test cases, *etc*
115
116
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.
117
118
## Documentation for Merce
119
120
In Merce, we can follow the following documentation:
121
122
* The BA phase can create a BRD
123
* The UX/UI phase can create high-fid screens from the BRD
124
* The SSD can be created from the BRD
125
126
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.
127
128
## What the documents contain
129
130
The BRD will contain
131
132
* a one-page description of the overall project and its objectives
133
* a list of personas: the various categories of users who will use the system
134
* a list of business operations: for each business operation there will need to be:
135
    * a low-fid or "rough" screen with fields
136
    * a list of input and output fields
137
    * brief notes about the calculations or logic, if needed (for more complex operations)
138
* NFR notes: non-functional requirements like
139
    * performance: must give millisecond response,
140
    * database size: how many vouchers,
141
    * number of users,
142
    * languages supported: do you need multi-lingual support?
143
    * platforms supported: Chrome on Linux, Chrome on Windows, iPads, Android phones, *etc*
144
    * integration with other systems if any
145
    * and any other such requirements
146
147
The SDD will contain
148
149
* architecture of the final system: could be just one big diagram
150
* list of components: Apache, JBoss, NodeJS, Postgres database, Redis, Angular front-end, *etc*
151
* data model: which will include
152
    * ER diagram
153
    * database schema: for main database, Redis cache, secondary databases, if any
154
* list of screens: with notes about operation or business logic of each screen (half-page to one page per screen)
155
* list of web service calls: with input and output parameters: 1-2 pages per call
156
* other modules: with their code if any (*e.g.* code for Alfresco, code to run in an ESB, *etc*)
157
158
The UI spec will contain
159
* the list of user stories: and for each story:
160
    * the sequence of screen names used, in a bullet-list form
161
* the set of screens: their pixel-perfect images or HTML+CSS
162
* style guide: specifying
163
    * which theme to use (if ready-made theme is being used)
164
    * which colours to use where, in hash-hex notation
165
    * actual set of icons in PNG/JPEG format
166
    * other sizes of things like margins, borders, font sizes, etc
167
    * font spec, including font files if any
168
169
With these three documents, we can start doing software development.
170
171
## How to create a BRD
172
173
To be completed.
174
175
## How to create SDD from BRD
176
177
To be completed.