Given the typical technical and structural requirements of a business application what are the recommended technology choices and architectural nuggets?
This is my recommended tech stack for a typical enterprise application. Underlying assumptions of most important requirements
- Long service life (often more than 10 years) and thus good maintainability
- Development with several teams and over the years changing members
- Good structuring possibilities for large and complex applications
- Fast development speed
http://blog.embarc.de/spicker/#9
- https://2019.stateofjs.com/front-end-frameworks/
- https://tsh.io/state-of-frontend/#frameworks
- https://djcordhose.github.io/spa-workshop/2020_arch.html#/frameworks
- https://reactjs.org/
- https://2019.stateofjs.com/javascript-flavors/
- https://djcordhose.github.io/spa-workshop/2020_arch.html#/ts
- https://djcordhose.github.io/spa-workshop/2020_js_ts_intro.html#/ts
- https://www.typescriptlang.org/
- https://www.typescriptlang.org/docs/handbook/react.html
- https://react-typescript-cheatsheet.netlify.app/
- https://github.com/piotrwitek/react-redux-typescript-guide#react--redux-in-typescript---complete-guide
- https://2019.stateofjs.com/data-layer/
- https://djcordhose.github.io/spa-workshop/2020_arch.html#/innere-struktur
- https://djcordhose.github.io/spa-workshop/2020_arch.html#/state-management
- https://nilshartmann.github.io/react-training/2020_1211_react.html#/t-state
- Redux
- MobX
- https://github.com/ReactTraining/react-router
- Routing and Redux
- Deprecated: https://github.com/reactjs/react-router-redux
- "official" answer - don't: https://stackoverflow.com/questions/36722584/how-to-sync-redux-state-and-url-hash-tag-params/36749963#36749963
- https://react.i18next.com/
- Deprecated
yarn testyarn e2e- https://2019.stateofjs.com/testing/
- https://nilshartmann.github.io/react-training/2020_1211_react.html#/118
- https://reactjs.org/docs/testing.html
- runner for node based unit tests: https://jestjs.io/
- smoke: does the component render at all (without throwing)?
- snapshot (https://jestjs.io/docs/en/snapshot-testing): only advisable to use as golden master when checking against external (REST) API
- full: render to HTML and check lifecycle methods
- logic: pure unit test for reducers
- https://testing-library.com/docs/react-testing-library/intro/
- Advocates role based selectors
- testid is alternative (might not be applicable when using component library)
- https://testing-library.com/docs/guide-which-query
- end2end tests: https://devexpress.github.io/testcafe/
- Testing Redux: https://redux.js.org/recipes/writing-tests
- some basic tests are made obsolete by redux toolkit and TypeScript checking
- Testing i18n with mocked hook: https://react.i18next.com/misc/testing
- https://material-ui.com/
- https://github.com/microsoft/fluentui
- Build your own
- https://classic.yarnpkg.com/en/docs/workspaces/
- https://lerna.js.org/
- https://blog.harveydelaney.com/creating-your-own-react-component-library/
- modes of maintenance
- corporate: use is mandatory for all, high risk in quality and suitability of lib
- agile: use recommended, usage shows quality and suitability of lib
- ownership?
This project was bootstrapped with Create React App, using the Redux and Redux Toolkit template.
- https://github.com/reduxjs/cra-template-redux-typescript
- yarn create react-app my-app --template redux-typescript
- yarn upgrade typescript --latest
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.
