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 the server repository
- Go back to the commit before the evolution
git checkout before-evolution
- Start the server
npm start
- Clone this repository, install the dependencies (
yarn install
) and then start it (yarn start
) - 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
This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Note: this is a one-way operation. Once you eject
, you can’t go back!
If you aren’t satisfied with the build tool and configuration choices, you can eject
at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject
will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use eject
. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify