- Building Enterprise JavaScript Applications
- Daniel Li
- 237字
- 2021-07-23 16:31:17
Refining requirements into specification
The requirements outline the high-level goals that the business wants the application to achieve, but it does not have sufficient details for developers to start implementation straight away. Requirements are imprecise and do not translate well into code, which is very explicit.
Instead, developers need to understand the overall business goal, and the current sets of requirements, and produces a more detailed set of technical specifications. A specification should contain sufficient technical details needed by developers to begin implementation.
In our case, the overall goal of the project is to "Create a web application that allows users to log in and update their profiles."; and the first requirement may be to "create an API server with an endpoint to create new users". You should now think about how to structure the application. For example, you may split the application into the following modules:
- Authentication: To allow users to register and log in
- Profile: To allow users to edit their own profile and view the profile of others
- Database(s): To store user data
- API server: The interface between our internal services and external consumers
With the structure of the application on the back of your mind, we can now move on to writing the specification. As we've already mentioned in Chapter 1, The Importance of Good Code, the best specifications are tests, so let's write some tests!