firgilio
v0.0.0
Published
Firgilio, the next generation module bus
Downloads
1
Readme
A functional first draft rewrite of firgilio at icemobilabs. No more prototype, this and new to emulate classes, but use of closures and pure functions.
Prototype is still being used to link namespaces.
All examples and tests are working, with some slight modifications to a functional style.
The whole code is shorter by about 50 lines. The errors could get rid of all the prototype and constructor wrangling, but I made it work to pass the tests.
What follows is copied for the firgilio repository, adapted for Firgilio.
Firgilio
Firgilio is a tiny framework helping you write modular applications. Start your project in a single file, then scale upwards as needed. No refactoring needed.
Features
Focus on writing code - not organising code
Build your application out of actions, small functions with a specific responsibility. Move your actions about the project as development progresses without having to wory about having to refactor. Use namespaces to oranise your actions, and rest save in the knowledge that they will always return a promise.
Extend it in any way you like
At less than a 100 lines of actual code, the main library is tiny and we aim to keep it that way. Additional functionality goes into extensions, which you are free to use or not use as you see fit. Mix Firgilio-extensions with your own favourite libraries any way you want.
Getting Started
Get Firgilio from npm.
npm install firgilio
Then start defining actions.
Firgilio = require('firgilio');
var ns = new Firgilio.baseNamespace();
Firgilio.defineAction(ns, 'number.add', function add(num1, num2) {
return num1 + num2;
});
ns.number.add(3, 6).then(function(result) {
console.log(result); //=> 9
});
More tags
We dedicate this Library to the ServiceRegistrar, the EigenServices and the PuppetDresser.