CoolFace
Apppublic

strong-tie/inbound-calls

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
Principles.md79 linesDownload Raw Back to Reference
1# Technical Principles2 3Every decision in the Fastify framework and its official plugins is guided by4the following technical principles:5 61. “Zero” overhead in production72. “Good” developer experience83. Works great for small & big projects alike94. Easy to migrate to microservices (or even serverless) and back105. Security & data validation116. If something could be a plugin, it likely should be127. Easily testable138. Do not monkeypatch core149. Semantic versioning & Long Term Support1510. Specification adherence16 17## "Zero" Overhead in Production18 19Fastify aims to implement its features by adding as minimal overhead to your20application as possible.21This is usually delivered by implementing fast algorithms and data structures,22as well as JavaScript-specific features.23 24Given that JavaScript does not offer zero-overhead data structures, this principle25is at odds with providing a great developer experience and providing more features,26as usually those cost some overhead.27 28## "Good" Developer Experience29 30Fastify aims to provide the best developer experience at the performance point31it is operating.32It provides a great out-of-the-box experience that is flexible enough to be33adapted to a variety of situations.34 35As an example, this means that binary addons are forbidden because most JavaScript36developers would not37have access to a compiler.38 39## Works great for small and big projects alike40 41We recognize that most applications start small and become more complex over time.42Fastify aims to grow with43the complexity of your application, providing advanced features to structure44your codebase.45 46## Easy to migrate to microservices (or even serverless) and back47 48How you deploy your routes should not matter. The framework should "just work".49 50## Security and Data Validation51 52Your web framework is the first point of contact with untrusted data, and it53needs to act as the first line of defense for your system.54 55## If something could be a plugin, it likely should56 57We recognize that there are an infinite amount of use cases for an HTTP framework58for Node.js. Catering to them in a single module would make the codebase unmaintainable.59Therefore we provide hooks and options to allow you to customize the framework60as you please.61 62## Easily testable63 64Testing Fastify applications should be a first-class concern.65 66## Do not monkeypatch core67 68Monkeypatch Node.js APIs or installing globals that alter the behavior of the69runtime makes building modular applications harder, and limit the use cases of Fastify.70Other frameworks do this and we do not.71 72## Semantic Versioning and Long Term Support73 74We provide a clear Long Term Support strategy so developers can know when to upgrade.75 76## Specification adherence77 78In doubt, we chose the strict behavior as defined by the relevant Specifications.79