The Comodojo Framework’s docs

_images/comodojo_logo.png

Comodojo is a PHP/js framework that provides a complete environment to realize complex and easy-to-maintain web applications.

Instead of offer a common foundation classes to biuld a single web app, Comodojo aims to be a pre-built environment where:

  • a couple of logical releated function (or even a single one) can be realized by an application;
  • an application publishes routes both on a server and client side, defining state-aware, linkable locations;
  • applications can (and generally should) be deployed, updated, removed using composer; in addition, multiple applications can be packaged under the same composer package;
  • internal role-mapper provides the connection between users and applications, exposing to user only the routes it should reach.

Warning

Code is under active development, there is no stable release and it may change without notice at any time.

Note

If you’re interested in participating development, please send a message to marco.giovinazzi@comodojo.org.

Contents:

Project Status

The framework is still in a pre-alpha stage and there is no planned release date yet.

Code will be published on packagist as soon as an alpha release is available.

Many of the foundation libraries are already stable and released under MIT license (refer to comodojo website for a complete list) as well as the two microframework dispatcher and extender.

Install Comodojo

Comodojo can be installed via composer, using comodojo/comodojo project’s package.

Requirements

To work properly, comodojo requires an apache webserver (nginx will also be supported ) with PHP >=5.6.0.

Installing via composer

Warning

This procedure is not complete, unstable, untested. In other words, there are no chances it will work.

A new comodojo/comodojo project can be created with:

composer create-project comodojo/comodojo myinstallationpath

The web root of your server shoud point to myinstallationpath/public.

More details will come in near future.

Applications

(Section yet to be written)

The application schema

(Section yet to be written)

The client side

(Section yet to be written)

The server side

(Section yet to be written)

Packaging applications

Application can be packed into bundles using special composer package type comodojo-app.

{
    "name": "my/app",
    "description": "My first comodojo app",
    "type": "comodojo-app",
    "extra": {
        "comodojo-app-register": {
            "helloworld": {
                "description": "My first comodojo app",
                "assets": "assets"
            }
        }
        "comodojo-configuration-register": {
            "app-helloworld-default": {
                "value": 'Comodojo',
                "constant": false,
                "type": "STRING",
                "validate": ""
            }
        }
        "comodojo-rpc-register": {
            "myrpc.helloworld": {
                "callback": "\\My\\Rpc",
                "method": "helloworld",
                "description": "Rpc Helloworld",
                "signatures": [
                    {
                        "returnType": "string",
                        "parameters": {
                            "name": {
                                "type": "string",
                                "optional": true
                            }
                        }
                    }
                ]
            }
        }
        "comodojo-service-route": {
            "helloworld": {
                "type": "route",
                "class": "\\My\\Helloworld",
                "parameters": {
                    "cache": false
                }
            }
        }
        "comodojo-task-register": {
            "HelloWorld": {
                            "class": "\\My\\Tasks\\HelloWorldTask",
                            "description": "Greetings from comodojo"
                    }
        },
        "comodojo-command-register": {
            "helloworld": {
                "class": "My\\App\\Command\\Helloworld",
                "description": "Greetings from comodojo",
                "aliases": ["hw"],
                "options": {},
                "arguments": {
                    "to": {
                        "choices": {},
                        "multiple": false,
                        "optional": true,
                        "description": "hello to..."
                    }
                }
            }
        }
    },
    "autoload": {
        "psr-4": {
             "My\\App\\": "src"
         }
    }
}

Users and Roles

(Page yet to be written)

Authentication

(Page yet to be written)

Themes

(Page yet to be written)

Theme package schema

{
    "name": "my/theme",
    "description": "My first comodojo theme",
    "type": "comodojo-components",
    "extra": {
        "comodojo-theme-register": {
            "mytheme": {
                "description": "My first comodojo theme",
                "assets": "assets"
            }
        }
    }
}

Appendix A: the Comodojo Installer

(Page yet to be written)

Indices and tables