The Tequila Framework platform (hereafter referred to as TeqFW) was created to simplify the distributed development of JavaScript applications by loosely connected teams of developers. It fully supports ES6 modules, providing a unique approach to dependency injection and avoiding early code binding. This document offers a general understanding of TeqFW's philosophy; for detailed instructions and examples, please refer to other documents in the knowledge base.
The main concepts of TeqFW include:
- Utilizing pure JavaScript without the need for transpilation
- Relying on JSDoc instead of TypeScript for type annotations
- A modular architecture based on ES6 modules
- Applying the principle of Inversion of Control (IoC)
- Supporting unique namespaces for module addressing
- Using templates to unify code structure
- Adhering to conventions that facilitate distributed development
- Clear separation of data and functions in accordance with Harvard architecture principles
- The ability to dynamically load ES6 modules from CDNs at runtime
TeqFW operates exclusively with pure JavaScript without the need for code transpilation, simplifying debugging and accelerating the development process. This allows developers to write and test code directly without unnecessary conversion steps.
Summary: Eliminating code transpilation simplifies development and enhances compatibility across different environments.
Instead of using TypeScript, TeqFW employs JSDoc annotations for type descriptions. This eases code handling, allows for static analysis in IDEs, and provides development freedom without the strict typing constraints of TypeScript.
Summary: JSDoc offers the benefits of type checking without strict limitations, simplifying work across various environments.
TeqFW uses ES6 modules as the primary unit of application structure. Each module can export individual entities, and
dependencies are injected through constructors or factories. Modules are bundled into npm packages managed via
package.json
. The teqfw.json
file adds information necessary for the TeqFW platform, such as rules for mapping
namespaces to file structures to locate source code.
Summary: ES6 modules provide modularity and flexibility in code structure, managed through npm.
For more details on TeqFW's module structure, read the document "TeqFW Module System".
The core idea of IoC in TeqFW is to avoid static imports of modules. This ensures consistent operation in both browser and Node.js environments, allowing developers to focus on high-level architecture while deferring implementation specifics until application runtime.
Summary: Inversion of Control enhances portability and modularity, enabling a focus on architecture.
Namespaces are used for effective dependency management. The filename or class name in a TeqFW plugin should reflect its location in the codebase, simplifying navigation and the search for required modules.
Summary: Namespaces allow efficient management of modules and dependencies.
Learn more about namespaces in the section "Working with Namespaces in TeqFW".
TeqFW uses templates to organize code by component types, helping maintain structural consistency. For example, code can be organized into Data Transfer Objects (DTOs), services, controllers, and so on.
Summary: Templates help standardize code and improve its organization.
Strict adherence to conventions helps developers quickly onboard and simplifies collaboration in distributed teams. Standardizing code structure, file naming, and component organization makes development more predictable and scalable.
Summary: Conventions simplify distributed development by making code uniform and predictable.
In TeqFW applications, code is divided into that which describes data structures (DTOs) and that which processes this data. Data handlers operate under a functional paradigm, relying heavily on input data and minimizing dependency on external states.
Summary: Separating data and functions simplifies maintenance and enhances code modularity.
For more details on DTOs and data handlers, read the document "Working with Data in TeqFW".
TeqFW provides the ability to dynamically load ES6 modules during application runtime in the browser. Using
dynamic import
and CDNs like JsDelivr or Unpkg, the Object Container can load any modules directly from the npm
package registry. This means that applications on the TeqFW platform can access any available ES6 module without prior
installation or bundling, significantly expanding development possibilities and flexibility.
Summary: Dynamic module loading from CDNs allows applications to flexibly connect dependencies at runtime, utilizing a wide range of packages from the npm registry.
TeqFW offers a powerful set of tools and approaches for efficient and flexible JavaScript application development. By leveraging pure JavaScript, JSDoc, modular architecture, and other described concepts, developers can create scalable and maintainable applications, easily integrating new modules and collaborating within distributed teams.