https://github.com/thawkin3/boundaries-demo
Demo of Clean Code Chapter 8: Boundaries
https://github.com/thawkin3/boundaries-demo
clean-code date-time react tutorial workshop
Last synced: about 1 month ago
JSON representation
Demo of Clean Code Chapter 8: Boundaries
- Host: GitHub
- URL: https://github.com/thawkin3/boundaries-demo
- Owner: thawkin3
- Created: 2021-11-04T20:24:40.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-01T02:39:36.000Z (over 4 years ago)
- Last Synced: 2025-09-01T01:03:05.750Z (10 months ago)
- Topics: clean-code, date-time, react, tutorial, workshop
- Language: JavaScript
- Homepage: http://tylerhawkins.info/boundaries-demo/build/
- Size: 993 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Clean Code, Chapter 8: Boundaries
This project is meant to demonstrate some concepts from Chapter 8 of Clean Code. You can view the demo app here: http://tylerhawkins.info/boundaries-demo/build/
## Key Concepts
**Wrap third-party code in a thin layer of abstraction. This allows you to:**
1. Create your own interface
2. More easily mock the third-party library in your code
3. Easily adapt to changes in the third-party library's API
4. Swap out underlying libraries if you want to change libraries in the future
**Write "learning tests" to document a third-party library. This allows you to:**
1. Document how you intend to use the library
2. Easily catch breaking changes in the library when you upgrade dependencies
**Use mock data when the code you're integrating with doesn't exist yet. This allows you to:**
1. Not be blocked if you're a frontend developer waiting on a backend developer to create the backend API
## Running the App Locally
1. `yarn install`
2. `yarn start`
3. Navigate to http://localhost:3000/ in your browser
## Resources
- Day.js format: https://day.js.org/docs/en/display/format
- Day.js time from now: https://day.js.org/docs/en/display/from-now
- Moment.js: https://momentjs.com/
- date-fns: https://date-fns.org/
- date-fns format: https://date-fns.org/v2.25.0/docs/format
- date-fns time from now: https://date-fns.org/v2.25.0/docs/formatDistanceToNow