This is the server of the frontend application dialog flow.
Dialog Flow is an application developed by lauchness. It implements one API change (see details below) that I use as a use-case to evaluate the evolvable-by-design approach that I created.
In this repository, the evolvable-by-design approach is implemented. Other projects are used as use cases, see the evolvable-by-design organization.
Here is a list of all the repositories linked to this use-case.
- Original client: lauchness/dialog-flow
- Client fork with the evolvable-by-design implementation (here)
- Original server: lauchness/dialog-flow-server
- Server fork with the evolvable-by-design implementation
Amount of changes: 1
Type of change: change model of returned data (n°3)
Description of the change: do an API change (change returned model) while moving the API call to the server, see UI commit (https://github.com/lauchness/dialog-flow/commit/929dd1f84dde381d2e393a5f76a34cf95112054f) and server commit (https://github.com/lauchness/dialog-flow-server/commit/2b8b301d4909a6dbbbbda674ebe20989956118e2)
Description of the work done:
- Fork both the client and the server
- Remove the model change from the API to create a first version returning a model that is equal to the model previously used on the frontend (see server commit)
- Create the API documentation and serve it from the backend on OPTIONS {baseApiUrl}/ (see the three commits: b2dd491, e3cc2ba and c53c7a2)
- Modify the frontend to use the first version of the API (see frontend commit)
- Create the proper accounts on Google Cloud Console and Google API Console to get the dialog flow API credentials
- Implement the evolvable-by-design approach into the frontend, in a single commit
- Replay the API evolution (see server commit)
- Verify that the client code does not need to be modified in order to continue working -> SUCCESS
- How many evolutions? ➜ 1
- Types of evolutions ➜ change type of return value (n°3)
- One or several commits? ➜ 1
- How many lines per commit for the original evolution? ➜ 2 (for a 721 lines program)
- How many lines of code to implement the approach on the frontend? ➜ 43 lines changed
- One or several developers ➜ 1
- If tests, broken? ➜ no tests
- Covered or not covered? Covered
- Clone this repository
- Go back to the commit before the evolution
git checkout before-evolution
- Start the server
npm start
- Start the frontend
- Play with it
- Stop the server
ctrl + c
in the bash session - Move to the server commit implementing the evolution
git checkout after-evaluation
- Start the server back
npm start
- Refresh the frontend and play with it, it is still working while the code has not changed