glial/glial

A HMVC PHP framework (include CLI mode) made for high volumetry & batch process

v5.1.9 2020-04-15 14:50 UTC

README

Latest Stable Version License

http://www.glial-framework-php.org/

Requirement ?

  1. Linux (degraded on windows with daemon and cli)
  2. PHP 5.5 or better
  3. modrewrite of Apache
  4. curl
  5. mcrypt

How to install?

To create a new project

Have a look on glial-new

To install as a library

Simply add a dependency on glial/glial to your project's composer.json file if you use Composer to manage the dependencies of your project. Here is a minimal example of a composer.json file that just defines a development-time dependency on Glial 3.2:

{
    "require": {
        "glial/glial": "5.1.*"
    }
}

Why use Glial?

Build application quickly

Many common components are included: translation tools, database access, code profiling, encryption, validation, and more.

Use specific libraries and tools

* Full support to PSR-0~4 * Extending existing components and adding new libraries is very easy.

Write commercial applications

Uses the GU/GPL license, so you can use and modify it for commercial purposes.

A very fast framework

Benchmarking a framework is hard and rarely reflects the real world, but Glial is very efficient and carefully optimized for real world usage.

A simple page with core system loaded we turn around between 400 and 800 query by second.

Good debugging and profiling tools

* Simple and effective tools help identify and solve performance issues quickly. * In dev mode you have some tools which show you the execution time for each module and memory used, same for each databases connected

Know what the framework is doing

Very well commented code and a simple routing structure makes it easy to understand what is happening.

Works with objects and classes

This is an OOP framework that is extremely DRY. Everything is built using strict PHP 5 classes and objects.

Write you own code

There are no code generators and endless configuration files, so setting up is fast and easy.

Who use Glial ?

  • Acsediate
  • BNPPARIBAS
  • Société Générale (SGCIB)
  • Arkadin
  • Alstom (Transport)
  • Photobox

User Guide

Glial don't work as most of framework worked actually.

I think it's the first framework to work in a navigator and in CLI in same time. When I developed Glial, the goal was to make some stuff usable and worked fine, it's possibly that it's not nice by moment.

First you have to know if you miss somethings about spelling and stuff, All in Glial was in lower case and in singular. Why ? Like that we don't have transform any string and waste time of execution. Since we decided to follow the SPR-X, all class name and directory are now in StudyCaps

About model.

To construct the model, we read the database to build the model. It's mean we use some convention to make a good parsing. and must respect these points :

  • all tables must have the first field called id, with a primary index not null autoincremented (no more obligatory now since version 3.0)
  • all fk, have to start by "id_" fallowed by the name of the table

if for one table we need to reference two FK on the same table we have to add a "__" double underscore followed by detailled name.

example : id_user__customer, id_user__provider

When we require to create a table to join 2 others you have to start the name of first table fallowed by "__" fallowed by the last table to link. the names have to be sort by alphabetique.

example for table user and mail_message

the name will be : mail_message__user

About controller

For the moment no custom route are supported.

One specifity of Glial, it's the controller/action can fit together, this option will be used natively with ajax, to load specificly only one area at once. Each controller/action, will be checked by auth, to decide to display or not. More each controller/action have 2 options :

  • read (allow access to all in read)
  • write (allow access to all in create / update / delete)

About view

We decided to use PHP, and not an engine of template because nobody can be faster than PHP only, and the goal of Glial it's to focus on developement. And not spend time to learn a new language even it's easy.