Skip to content

Latest commit

 

History

History
executable file
·
65 lines (40 loc) · 1.15 KB

README.md

File metadata and controls

executable file
·
65 lines (40 loc) · 1.15 KB

ONEFLUX

One God, One Way, One Flow

OneFlux is a framework that structures applications by providing

  • Abstract components - that communicate through events in a hierarchical way
  • Modules / services - that communicate via an Event Bus
  • Injection Dependencies Simple

Quickstart

npm install

Build the kernel First

gulp --task build-kernel

gulp --task test-kernel

Why Dependency Injection?

Why Event Bus?

Why Actions & components?

Example Register Factory

var CaseManager = function (options) {
      this.config = {};
  };
OneFlux.registerFactory("@CaseManager", CaseManager);

## Usage

var CaseManager = OneFlux.instantiateFactory("@CaseManager", {});

Example Register Service

## Usage

var CaseManager = OneFlux.instantiateFactory("@CaseManager", {});
OneFlux.service("CaseManager", CaseManager);

## A service is used in DI

Example DI & Event Bus

var FormManager = function (EventBus, options) {
      this.config = {};
      this.eventBus = EventBus
  };

## EventBus is a service in framework & is used as DI

EventBus

For more Information about Event Bus see postal js