Update decisions doc
This commit is contained in:
parent
ac23689342
commit
0a1d92f109
@ -1,35 +1,45 @@
|
|||||||
# Decisions
|
# Decisions
|
||||||
|
|
||||||
A small document highlighting why certain choices were made.
|
## Server
|
||||||
|
|
||||||
## Typescript
|
### Tools
|
||||||
|
|
||||||
- static typing
|
- typescript
|
||||||
- stricter than normal javascript
|
- static typing
|
||||||
- better visual studio code support than javascript
|
- stricter than normal javascript
|
||||||
|
- better visual studio (code) support
|
||||||
|
- drawio
|
||||||
|
- lighter than png diagrams
|
||||||
|
- allows for editing the diagrams later
|
||||||
|
|
||||||
## Babel
|
### Conventions
|
||||||
|
|
||||||
- polyfill es6 modules to commonjs
|
- file naming
|
||||||
- hooks in better sourcemap support for node
|
- emulate C# namespacing
|
||||||
|
|
||||||
## Browserify
|
### Libraries
|
||||||
|
|
||||||
- required for nexe bundling (has a bug where bundling source fails)
|
- browserify
|
||||||
- fixes the `Uncaught ReferenceError: exports is not defined` error
|
- less setup compared to webpack
|
||||||
- far easier to setup compared to webpack
|
- node:http
|
||||||
|
- no additional dependencies
|
||||||
|
- no overhead from frameworks
|
||||||
|
- can be modified to the project's specific needs (EFT request have no compression headers, but data is zlib compressed)
|
||||||
|
- rcedit
|
||||||
|
- no virus warning after editing the target exe
|
||||||
|
- ws
|
||||||
|
- no overhead from frameworks
|
||||||
|
- no additional dependencies client side
|
||||||
|
- typescript-eslint
|
||||||
|
- provides type-specific rules for typescript as well opposed to alternatives
|
||||||
|
|
||||||
## Node.http
|
### Build
|
||||||
|
|
||||||
- can be modified to our specific needs
|
- `npm run build` is reserved by VS2022 for it's build task
|
||||||
- no additional dependencies, overhead and complexity under the hood compared to frameworks
|
- nexe cannot include `node_modules` of it's own, so browserify is used to combine it all into one JS file
|
||||||
- eft requires special care in request/response handling (no compression headers, but data is zlib compressed)
|
- browserify doesn't support ES6 modules, so babel is used for transpiling to CommonJS.
|
||||||
|
- node doesn't include sourcemaps loading support, so we add it in through a babel plugin (`babel-plugin-source-map-support`)
|
||||||
|
|
||||||
## File naming
|
### Lint
|
||||||
|
|
||||||
- emulates C# namespacing, which I prefer
|
- marked `any` explicitly valid to allow for prototyping faster
|
||||||
|
|
||||||
## Drawio
|
|
||||||
|
|
||||||
- png diagrams are heavy, drawio diagrams are not
|
|
||||||
- allows for editing the diagrams later
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user