@wixc3/engine-core
TypeScript icon, indicating that this package has built-in type declarations

45.5.0 • Public • Published

@wixc3/engine-core

Run-time abstractions for creating multi-environment web applications while practicing feature-oriented software development.

Approach

  • An application is a set of one or more features.
  • A feature contains all the integration code required to get a subset of product functionality implemented.
  • Features may depend on other features, consume their exposed services and register into their slots.
  • A service is a set of functions exposed as an API of a feature.
  • A slot is a registry of any type, which allows pluggability via registration.
  • Environments (browser/webworker/iframe) are defined by features, and have semantic names (main/processing/preview).
  • Each slot and service is available in a specific environment.
  • Services can be marked as accessible cross-environments, which exposes them as async APIs in those environment.

Feature

A feature is combined of several files:

  • <feature-name>.feature.ts - feature definition file.
  • <feature-name>.<some-env>.env.ts - some-env specific setup code.
  • <feature-name>.<another-env>.env.ts - another-env specific setup code.

Feature definition file

Feature definition is created in a <feature-name>.feature.ts file, and is exposed as the default export.

For example:

/* my-feature.feature.ts */

import { Feature } from '@wixc3/engine-core';

/* defining a new feature */
export default new Feature({
  id: 'myFeature' /* unique id for the feature */,

  dependencies: [
    /* other features the feature depends on */
  ],

  api: {
    /* slots, services, and configurations of the feature */
  },
});

Readme

Keywords

none

Package Sidebar

Install

npm i @wixc3/engine-core

Weekly Downloads

759

Version

45.5.0

License

MIT

Unpacked Size

1.35 MB

Total Files

262

Last publish

Collaborators

  • dorza
  • vladba-wix
  • danielgovrin
  • yurimorkovnik
  • ranberko91
  • 0xrezaa
  • gregdamsky
  • alissawix
  • ekaterinaza
  • noammu
  • buchenpilar
  • oleksiiletushev
  • alisalachman
  • vladyslav-baliuk
  • yuriin
  • ilyakwix
  • matang
  • daomry
  • noama
  • shakederin
  • dlvhdr
  • plisovyi
  • pijusn
  • shireewill
  • haryelp
  • iuriikowix
  • itaywix
  • thealmightycrumb
  • devex-infra
  • olehr
  • tomrav
  • avi.vahl
  • alexswix
  • omerk
  • talga
  • cijoe
  • wix-ci
  • wixnpm
  • baraki
  • interal
  • alisey
  • danieleww
  • idoros
  • nadavwix
  • rashellek
  • wtfil
  • denysdovhan
  • vkobeliatskyi
  • pistolpete_
  • nettaru
  • igalh
  • netanelgilad
  • anatfenn
  • erezshasha
  • zemlanin
  • arnonkehat
  • ariki
  • itpurchases
  • danalevy
  • serhiiz
  • oleksandraab
  • idango10
  • mikanadel
  • tetiana0611
  • vladkar
  • yurii-v
  • elig-wix
  • nadav.a
  • vladyslavgoloshchapov