Top 7 Node.js/TypeScript Tips for scalable back end development
阿新 • • 發佈:2018-12-29
2) Be function first, OO as needed. Don't try to mimic Java Class-for-everything coding style in TypeScript.
3) Take advantage of structural typing. Type with Interface & type over classes, avoid Class / Interface duos.
4) Export functions, types, and objects over classes and factories. Classes, when need, should often just be module implementation details.
5) Minimize Mock need (i.e. Kubernetes centric development), and favor module-alias over Class based DI.
6) Favor light and focused libraries / micro-frameworks, over all-in-one solve-it-all mega frameworks.
7) Keep it simple, SIMPLE SCALE BETTER