2017 © Pedro Peláez
 

library cena

Composite Entity Notation and Augmentation for PHP.

image

cena/cena

Composite Entity Notation and Augmentation for PHP.

  • Thursday, May 1, 2014
  • by asaokamei
  • Repository
  • 1 Watchers
  • 0 Stars
  • 19 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Cena.Cena

Cena is "Composite Entity Notation and Augmentation", a technology about text representation of entity objects state., (*1)

license

t.b.d., (*2)

patent

Patented in Japan (#4782895), and patent pending in the US. so, please be careful when using this software..., (*3)

About Cena

For each entity object, Cena represent it the following in text:, (*4)

  • lifecycle (how it is generated),
  • its properties, and
  • relation with other entities.

Cena will simplifies various operations such as database synchronization and complicated html forms., (*5)

Entity State and Text Representation

Given that the class name of entities are "Model"., (*6)

An entity is represented as a simple text, called CenaID. For instance: Cena.model.new.1, Cena.model.get.1., (*7)

Entity LifeCycles

Create a new entity of Model., (*8)

// Cena.model.new.1
$entity = new Model();

Retrieve an entity from a database., (*9)

$entity = Model::findById(1);
// Cena.model.get.1

Entity's Properties

To represent property values of an entity, just specify property name following the CenaID., (*10)

Cena.model.new.1.prop.name = 'my name'
Cena.model.get.1.prop.name = 'your name'

Relation Between Entities.

Cena uses CenaID to represent relations between entities., (*11)

Cena.model.new.1.link.related = Cena.other.get.1

The above simple notation is almost equivalent with the following PHP code., (*12)

$entity = new Model();
$entity->setRelated( Other::findById(1) );

Protocol (tentative)

current protocol looks like:, (*13)

{
  cenaID: {
    prop: { field1: value1, field2: value2, ... },
    link: { rel1: cenaID2, rel2: [ cenaID3, cenaID4,...],... }
    error: { field5: message5, field6: message6,... }
    info: {
      orig-cenaID: OriginalCenaId,...
    }
  }
}

Cena is Unique At...

So, what are the differences between Cena and other similar technologies? Honestly, I (the author) is not familiar with other technologies yet, so I cannot be certain but..., (*14)

The following are (probably) the unique features of Cena., (*15)

  • easy to describe new entities (Cena.model.new.1).
  • easy to manipulate many entities, new or existent.
  • easy to relate new entities (i.e. no primary key) with other entities.

CenaManager

Currently, Doctrine2 can be used as a base ORM for Cena., (*16)

The Versions

01/05 2014

dev-master

9999999-dev

Composite Entity Notation and Augmentation for PHP.

  Sources   Download

by Asao Kamei

13/03 2014

dev-validation

dev-validation

Composite Entity Notation and Augmentation for PHP.

  Sources   Download

by Asao Kamei