-
Notifications
You must be signed in to change notification settings - Fork 0
Home
WARNING: This project is still in its early stages and the classes and interfaces to the classes are likely to change.
This project provides the foundation for the Bali Nebula™. It defines a framework of JavaScript classes designed to run in both the cloud on NodeJS servers and in your browser. It also implements the Bali Document Notation™ which allows your browser to communicate with the cloud services similar to the way JSON based web services work.
The Bali Component Framework™ is like JavaScript on steroids. It supports a much richer set of primitive types (13 in all) and collection types (6 in all) than JavaScript's five total types. It also provides powerful higher-level programming constructs that integrate directly with the Bali Nebula™.
Everything in this framework is a Bali component and inherits from the bali.Component
class. Each component can be formatted as a portable document containing Bali Document Notation™ which is like JSON on steroids. Similarly, a string containing Bali Document Notation™ can be parsed back into its corresponding Bali components.
This project provides all of the JavaScript/NodeJS modules that are required to work with Bali components and Bali Document Notation™ strings.
To whet your appetite here is a short example Bali document showing some of the capabilities of the Bali Document Notation™:
[
$transactionId: #LYZ6PJ9GBABSF18MQMBSJDV7KAPV4MS7
$timestamp: <2017-12-30T17:38:35.726>($city: "Madrid", $country: "Spain")
$consumer: [
$accountId: #SFNYCS6WTNCAVQ43DDS9HQJQX2A1XAPZ
$email: <jane.smith@gmail.com>
]
$merchant: [
$accountId: #GYR0D0N7D7RGLAMM50TA7YYP9TRCYFF0
$name: "Cool Deals R Us"
]
$items: [
[
$name: "Hover Board"
$version: v2.65
$quantity: 1
$price: 142.00($USD)
]
[
$name: "Hover Battery Packs"
$version: v15.3.7
$quantity: 2
$price: 16.00($USD)
]
]
$tax: 10.77($EUR)
$total: 184.77($EUR)
]
The document itself is fairly straight forward. It captures the information associated with a payment from a consumer to a merchant. The example is overly simple but it should give you the gist of the power behind the Bali Component Framework™ and its associated Bali Document Notation™.
Each of the structures and attributes within the example document maps to a Bali component class within the Bali Component Framework™. The classes are grouped by type. Click on each type for details about specific framework classes of that type:
- Abstractions - Abstract classes that define the framework using various tried and true software design patterns.
- Elements - Elemental components that are generally considered atomic in nature without subcomponents.
- Composites - Components that are composed of subcomponents.
- Collections - Composite components that contain a group of subcomponents that are added and removed from the collection dynamically.
- Utilities - Utility classes that operate on components as part of the design patterns.
To install the NodeJS package for this project, execute the following command:
npm install bali-component-framework
Then add the following line to your NodeJS modules:
var bali = require('bali-component-framework);
Check out the example code here.
Project contributors are always welcome. Create a fork of the project and add cool new things to the framework. When you are ready to contribute the changes create a subsequent "pull request". Any questions and comments can be sent to craterdog@gmail.com.