2017 © Pedro Peláez
 

library unitengine

A distributed PHP framework powered by small units of social, dependency-aware code

image

xeoncross/unitengine

A distributed PHP framework powered by small units of social, dependency-aware code

  • Thursday, January 9, 2014
  • by Xeoncross
  • Repository
  • 2 Watchers
  • 8 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

UnitEngine

A distributed PHP framework powered by small units of social, dependency-aware code. UnitEngine allows you to bring small functions and classes from the gist.github.com universe into your project with ease. It's basically like composer for gists., (*1)

About

Developers often find existing libraries and frameworks lacking certain foresight, performance optimisations, documentation, or unit tests. This is often expected since libraries are usually written by less than a couple people. The old saying, "No one can do everything, but everyone can do something." rings true in many projects lacking enough hands., (*2)

Unit Engine splits code generation, documentation, and unit tests up into smaller bit-size chunks allowing many people to contribute in a very easy way. This means that each person can write the small bit of code they specialize in resulting in much better quality, performance, and documentation., (*3)

Features

Install

There are three ways to begin using UnitEngine for your projects., (*4)

A) (Recommended) Download the project using composer by creating a composer.json and running "$ composer install" from the command line., (*5)

{
    "require": {
        "xeoncross/unitengine": "dev-master"
    },
}

B) Simply checkout the latest copy of UnitEngine, (*6)

$ git clone https://github.com/Xeoncross/UnitEngine.git

C) Manually download the latest zip release of UnitEngine and extract it., (*7)

Once you have UnitEngine installed you can begin using other developers units - or writing your own!, (*8)

Share Your Code

Have a good unit of code you want to share? Simply fork the starter gist with your code, edit the readme, and create a simple unit test. Only takes a couple minutes to make your function available to the world., (*9)

Getting Started

From your project folder you can now create a readme.md which contains the URL's of all the gists you need for your project (along with any text you want). For example, consider the following example readme.md fileL, (*10)

# My FooBar Project

We need a good simple [router](https://gist.github.com/Xeoncross/8337101) so we can build
an awesome foo::bar!

After you have a readme.md file you can run the unit engine update manager to checkout the latest versions of the functions and classes you need., (*11)

$ php UnitEngine/update.php

Or if you installed it via composer:, (*12)

$ php vendor/Xeoncross/UnitEngine/update.php

After UnitEngine installs all the required units in your readme.md, (and their dependencies), you can include the compiled output by including the UnitEngine/UnitEngine.php file in your code., (*13)

<?php

require('UnitEngine/UnitEngine.php');

...your code here...

KISS

We encourage developers to write small chunks of reusable code by providing a simple parser which counts how many logical commands you are doing in your code. We recommend people keep their code down to less than 100 actions., (*14)

$ php UnitEngine/parser.php ../path/to/file.php

UnitEngine is built for small functional blocks - not whole libraries. If your code is larger then you might want to setup a full github repository and register the library with packigist., (*15)

UnitEngine ♡ Composer., (*16)

Namespacing

All UnitEngine blocks MUST be namespaced. Namespacing your code will prevent clashes with other functions and gists and provide easier separation for unit testing., (*17)

Web Admin

If you are on an environment which does not provide command-line access (i.e. shared hosting), you can upload a copy of the UnitEngine source code, then create a web_update.php file and paste the following into it assuming PHP and git are installed on the server and registered on the system $PATH., (*18)

<?php passthru('php UnitEngine/update.php');

Make sure you delete this file when you are done!, (*19)

The Versions

09/01 2014

dev-master

9999999-dev http://unitengine.com

A distributed PHP framework powered by small units of social, dependency-aware code

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

micro framework microframework unit gist small