# ribbons

> A robotics software development framework for Node.js: sensors, controllers and actuators.

Latest version **0.0.5** (published 2012-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install ribbons
pnpm add ribbons
yarn add ribbons
bun add ribbons
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2012-11-21 |
| First published | 2012-11-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Brian Mulloy |
| Maintainers | landlessness |
| Keywords | ribbons, framework, robotics |

## Links

- npm: https://www.npmjs.com/package/ribbons
- Repository: https://github.com/robot-ribbons/ribbons
- npm.io page: https://npm.io/package/ribbons

## Dependencies (2)

- [ribbons.controller](https://npm.io/package/ribbons.controller.md) 0.0.1
- [ribbons.application](https://npm.io/package/ribbons.application.md) 0.0.1

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2012-11-21
- 0.0.4 — 2012-11-21
- 0.0.3 — 2012-11-21
- 0.0.2 — 2012-11-19
- 0.0.1 — 2012-11-16

## README

# Ribbon

A robotics software development framework for Node.js.

Sensors, Controllers, Actuators - [SCA](http://www.youtube.com/watch?v=He6Ac_DigJA).

## Overview

Information flows: sensors -> controllers -> actuators

Debugging flows the other way: actuators -> controllers -> sensors

Therefore we tie the controllers to the actuators.

### Logo Ideas

[Ribbon Cable Wikipedia](http://en.wikipedia.org/wiki/Ribbon_cable)
[Ribbon Cable Image](http://www.keterex.com/img/kxacc-083pp.jpg)
Modify [Ribbon Farm](http://ribbonfarm.org/wp-content/themes/cp-minimal/images/web_logo.png) logo so that components are connected to a breadboard via a ribbon cable

## TODO

is there a way to automate the creation of components based on them being in the proper directories?

### New

Create a new ribbon project:

    ribbon new

Creates directory structure:

    * app
      * actuators
      * controllers
      * sensors
    * config
    * doc
    * lib
    * log
    * test
      * actuators
      * controllers
      * sensors

Adds /package.json with dependencies:

    * vows

Install vows globally to get vows command working? Or mask it behind a ribbon command?

    npm install vows -g

### Generate 
Generate actuators, controllers, sensors and custom objects.

    $ ribbon generate
    Usage: ribbon generate GENERATOR [args] [options]
  
    ...
  
  
    Please choose a generator below.
  
    Ribbon:
  
      actuator
  
      controller
  
      sensor
  
      generator
  
      ...

Generate a solenoid

    $ ribbon generate solenoid BrakeDrum

    creates:
      * app/actuators/brake.drum.js
      * test/actuators/brake.drum.test.js

## Usage Notes

Remember evertything in JavaScript is an object. If you're coming from a class-based langauge you'll need to drop the duality between classes and objects and just roll with the fun.

about inheritance and 'as' function. the thought is 'as' has a nice prototype ring to it. for example, i can use an LED object as a protoype for a solenoid. actuating the solenoid is a lot like blinking a LED. so, we use Led as a Solenoid: Led.as(Solenoid);.

Sensors are Emitters.

Controllers are Listeners.

Sensors communicate with Controllers via Events.

Controllers contain Actuators and acuate them via function calls.

### MVC versus SCA
In an MVC framework like Ruby on Rails there is one model, one view and one controller for each class. For example a model for people would look like

  /controllers/people_controller.rb
  /models/person.rb
  /views/people/edit.html.haml
  /views/people/index.html.haml
  /views/people/new.html.haml
  /views/people/show.html.haml

Ribbons tries to realize some of the benefits of predictable file naming conventions and locations so that as projects grow and the teams that work on them evolve it's easier to be productive. 

view -- controller -- model >-< models

Ribbons uses a model of Sensors, Controllers and Actuators. While this is helpful there isn't a 1:1:1 relationships among the components. In fact, it's often interesting to have many sensors impacting the same actuator. And likewise it's common to have multiple actuators impacted by one sensor. So, what do we do? Controllers are defined by the many sensors and actuators they control.

sensors >-< sensors >- controller -< actuator >-< actuator

## Content That Inspired Ribbon
http://web.media.mit.edu/~lieber/Lieberary/OOP/Delegation/Delegation.html
http://www.laputan.org/reflection/warfare.html

---
_Source: https://npm.io/package/ribbons · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
