# @zkty-team/x-engine-module-engine

> zkty-team/x-engine-module-engine

Latest version **0.1.21** (published 2021-04-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @zkty-team/x-engine-module-engine
pnpm add @zkty-team/x-engine-module-engine
yarn add @zkty-team/x-engine-module-engine
bun add @zkty-team/x-engine-module-engine
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.21 |
| Published | 2021-04-09 |
| First published | 2020-10-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 18.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | zk |
| Maintainers | zkty_company, zk4 |

## Links

- npm: https://www.npmjs.com/package/@zkty-team/x-engine-module-engine
- npm.io page: https://npm.io/package/@zkty-team/x-engine-module-engine

## Recent versions

- 0.1.21 (latest) — 2021-04-09
- 0.0.46-alpha.1 (canary) — 2020-10-29
- 0.1.20 — 2021-03-25
- 0.1.19 — 2021-03-25
- 0.1.17 — 2021-03-13
- 0.1.13 — 2021-02-24
- 0.1.12 — 2021-01-20
- 0.1.11 — 2021-01-12
- 0.1.10 — 2021-01-11
- 0.1.9 — 2021-01-11
- 0.1.8 — 2021-01-11
- 0.1.7 — 2020-12-30
- 0.1.6 — 2020-12-28
- 0.1.5 — 2020-12-23
- 0.1.4 — 2020-12-22
- … 28 more at https://npm.io/package/@zkty-team/x-engine-module-engine/versions

## README

引擎是一个特别的组件,其他所有组件都需要依赖于它.  

![image-20200824162106977](assets/image-20200824162106977.png)





引擎的工作：

- 组件的发现与编排, (注入)。

- 组件生命周期的管理与通知。

- webview 的编排.

  

>  要注意：组件不要依赖组件， 组件应该依赖于 protocol。这样，才可以使组件具有一定的独立性。

![image-20200813142309675](assets/image-20200813142309675.png)



引擎中定义了可能会造成冲突的模块它们的 protocol。

![image-20200813142351469](assets/image-20200813142351469.png)

如上例中， 当冲突发生时，如果依赖的库不可更改，只需在 module a 实现 protocol network，则可实现 afnetworking 3 到 4 的无缝迁移。

![image-20200813142529255](assets/image-20200813142529255.png)

---
_Source: https://npm.io/package/@zkty-team/x-engine-module-engine · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
