npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

organic

v1.0.0

Published

Organic development in node.js

Downloads

438

Readme

node-organic

Organic v1.0.0

A concept & abstract implementation inspired by Organic Computing usable for rapid software development having the following properties:

  • Self-configuration
  • Self-optimization
  • Self-protection
  • Self-reflection

The package represents abstract form of the implementation bundled with concept documentation. Further modules/libraries/packages inheriting organic core classes provide actual implementation and the ability to extend, improve and adapt furthermore the concept and its practical results.

node-organic(or just organic) is based on the nature's patterns for structural organization, control flow & etc. Its base abstract ground is found to be the usable for rapid engineering of complex systems.

Organic software development thereafter mimics nature's pattern for living cells representing their organization and structure within software applications.

Main primitives of the conceptual implementation are listed bellow in this document. Note that the terminology is intentionally chosen because every primitive comes with nature's fundamental properties/abilities/features proven to be naturally scalable/extendable

Chemical

Chemical is raw data structure.

Every chemical has a type and in its nature is a plain object filled with properties (primitive values and/or references to other objects).

One chemical has this generalized structure

{
  type: String,
  // ... other custom properties
}

DNA

DNA is configuration.

It is the collected internal knowledge of the entire cell application - its relations, abilities, build phases, functionalities and modes. DNA information can be acquired from various sources and can be transmitted across various mediums if needed because it is a Chemical (raw data structure)

var dnaStructure = {
  "OrganelleName": {
    "source": "path/to/organelle_implementation"
  },
  "branchName": {
    "OrganelleName2": "path/to/implementation"
  }
}

var dna = new DNA(dnaStructure)
console.log(dna.OrganelleName.source) // "path/to/organelle_implementation"

Plasma

Plasma is EventBus/EventDispatcher/PubSub pattern.

It is the fluid/environment which contains different kinds and copies of Organelles and/or Chemicals. The plasma also has main purpose in transmitting Chemicals between Organelles and within the Cell itself.

var plasma = new Plasma()
plasma.on(chemicalPattern, chemicalReactionFn)
plasma.emit(chemical)

Implementations:

Organelles

Organelle is Controller/Command/Strategy pattern.

These are the building blocks of organic application. Organelles are simple class implementations having the following form:

var Organelle = function(plasma, dna) {
  this.plasma = plasma
  plasma.on(dna.reactOn, self.reactionToChemical)
}

Organelle.prototype.reactionToChemical = function(c) {
  // -- reaction logic
}

Nucleus

Nucles is DependencyInjector/Factory pattern.

Nucleus is an Organelle. It however has reactions vital for a 'living' Cells - ability to process DNA and execute reactions involved in constructing Organelles.

var nucleus = new Nucleus(plasma, dna)

// add ability to construct organelles on demand via "build" typed chemical.
plasma.on({type: "build"}, function(c){ nucleus.build(c) })

// build some organelles from dna
plasma.emit({type: "build", branch: dna.organelles})

Implementations:

Cell

Cell is Application.

It is usually a single constructor logic which brings up Plasma and Nucleus. The Cell also can provide support to "build" organelles using build chemicals.

// dna/organelles.json
{
  "plasma": {
    "organelle": {
      "source": "path/relative/to/cwd"
    }
  }
}

// cell.js
var Cell = function Cell(dna){
  this.plasma = new Plasma()
  var nucleus = new Nucleus(this.plasma, dna)
  this.plasma.on("build", nucleus.build, nucleus)
}

// main.js
var loadDNA = require('organic-dna-loader')
loadDNA(function(err, dna){

  // instantiate
  var instance = new Cell(dna)

  // trigger building
  instance.plasma.emit({type: "build", branch: "organelles.plasma"})
})

Cells can be in different kinds - command line, web services, desktop apps. Cells themselfs can form up and organize into a Systems. Different kinds of systems can build up even more complex structures interconnecting with each other like Organisms...

Implementations:


Note that the proposed concept and its respective implementations doesn't simulate the actual nature order and processes. The concept follows closely nature's patterns where applicable to software development discipline.

Organic development in node.js