@wixc3/engine-core

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

@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 */
  },
});
npm i @wixc3/[email protected]

Metadata

  • MIT
  • Whatever
  • Unknown
  • released 5/28/2021

Downloads

Maintainers

liorgwix, nadav.a, elig-wix, yurii-v, vladkar, tetiana0611, yardenporat, tmatyashovsky, mikanadel, wixdanielr, enzewon, tomrav, avi.vahl, alexswix, omerk, tomermes, iamromanyarinovsky, talga, cijoe, wix-ci, wixnpm, quitten, harelig, mykhailom, simonaspa, baraki, blue16, bolshchikov, avivr, chenroth-wix, liorur, danielagr, yershalom, yoavamit, nachshons, alex5il, jonathana.wix, omerbu, selama, guybe, shanik, eransh, felixmosh, dimarysk, yanivefraim, smangam, nayish, ronnyr, elip, zeevg, giladartzi, guyw, inbaltish, dleshem, danbars, interal, karolisb, yairhaimo, yoav, guyca, mantasm, t0mas, ethanshar, vladislavz, ydaniv, dmfilipenko, olshen, andriuss, nira-wix, sirmagis, ariell, sagiiwix, alonbl, borisk, idok, rotemmiz, oripi, adiramsalem, sapirc, schlez, maxlk, roeia, omerb, yevhenk, papamisty, listochkin, zsgalusz, liorcode, vladik7244, gran33, moshfeu, amiryonatan, henrykuzmick, itaystwix, alisey, talh, shahata, jomarton, tyv, tzelon, tomerlichtash, asafr, archram, maksimpe, ipanasenko, alexanderg-wix, danieleww, alexeye, tompereswix, sdoomz, romabelka, viattik, marijuss, kranux, ikachura, bohdan-lytvynov, xyrue, zombiefruit, domshlakn, idoros, nadavwix, rashellek, wtfil, maksym_wix, chuvpylov.m, oleksii-uxd, sestri4kina, denysdovhan, vkobeliatskyi, alf-er, shacharg, pistolpete_, deduck, nettaru, kelyar, wix-ambassador, roysom, aleksanderd, jurasm, ranyitzhaki, mariar, silyevsk, igalh, galil-team, netanelgilad, hadarvid, liorer, annielr, anatfenn, erezshasha, tuchk4, zemlanin, amirgabay, leeronwix, arnonkehat, eladdo92, im0b, romanyarinovskytest, ariki, itpurchases, danalevy, anna-c, kenanu, adamy, mayameshik, serhiiz, eifr0980, oleksandraab, idango10,