FlyCubePHP is an MVC Web Framework developed in PHP and repeating the ideology and principles of building WEB applications, embedded in Ruby on Rails.

Last update: Dec 21, 2021

FlyCubePHP

FlyCubePHP is an MVC Web Framework developed in PHP and repeating the ideology and principles of building WEB applications, embedded in Ruby on Rails. The main task set during the development was a quick and flexible transfer of project code from Ruby on Rails to PHP with a minimum number of changes to the code base of projects, and maintaining application performance.

An additional functionality added to the FlyCubePHP core is the plug-in mechanism support, which allows you to extend or change the functionality of your application, taking into account the plug-in dependencies during operation. In terms of its structure, the plug-in partially repeats the architecture of the application, making the necessary changes to it.

Currently FlyCubePHP supports

  • creating projects that architecturally repeat Ruby on Rails 5 projects:
    • creation of controllers (gui / api);
    • creation of data models;
    • creation of templates for WEB pages;
    • creation of helper classes for access from WEB page templates;
    • creation of JavaScript files with automatic assembly in * .min.js in production mode and processing of directives:
      = require ...
      = require_tree ...
    • creation of Sass Stylesheets files with automatic assembly in CSS and processing of directives:
      = require ...
      = require_tree ...
    • access to project resources (images, files, etc.) using the Asset Pipeline.
  • creation of plugins that extend or change the functionality of your application;
  • creation of database migrations and a wide range of tools for working with migrations;
  • creation of extensions to the FlyCubePHP kernel allowing:
    • add support for the required databases;
    • add support for the required databases for the migration system;
    • add additional helper classes for access from WEB page templates;
    • add support for the necessary tools for preprocessing and assembling JavaScript files;
    • add support for the necessary tools for preprocessing and assembling Stylesheets files.

Supported databases

  • SQLite 3;
  • PostgreSQL 9.6 or later.

Third-party dependencies

These dependencies are required for the framework to work correctly:

NOTE: required third party dependencies will be automatically downloaded when creating a new FlyCubePHP project. This behavior can be disabled by specifying the input argument:

--download-requires=false

Usage

FlyCubePHP/bin> php ./fly_cube_php --help

Usage: ./fly_cube_php [options]

Options include:

    --help                              Show this message [-h, -?]
    --new                               Create new FlyCubePHP project
    --name=[VALUE]                      Set new project name
    --path=[VALUE]                      Set new project root path (optional; default: user home)
    --download-requires=[true/false]    Download FlyCubePHP requires in new project (optional; 
    default: true)

    --version                           Print the version [-v]

Create new FlyCubePHP project

FlyCubePHP/bin> php ./fly_cube_php --new --name=MyProject 

=== FlyCubePHP: Create new project "MyProject" === 
 - Create project dir: OK 
 - Create project tree: OK 
 - Copy FlyCubePHP core: OK 
 - Copy FlyCubePHP templates: OK 
 - Download requires [Twig]: OK 
 - Download requires [JShrink]: OK 
 - Download requires [ScssPhp]: OK 
 - Download requires [Psr/Log]: OK 
 - Download requires [Monolog]: OK 
 - Unzip requires [Twig]: OK 
 - Unzip requires [JShrink]: OK 
 - Unzip requires [ScssPhp]: OK 
 - Unzip requires [Psr/Log]: OK 
 - Unzip requires [Monolog]: OK 
=== FlyCubePHP: Create project success. === 
=== FlyCubePHP: Dir: /home/[USER]/FlyCubePHProjects/MyProject ===

Development guides

  • RUS
  • ENG: Coming soon...

Basic system requirements

  • PHP >= 7.0

Additional required PHP modules

  • php7-ctype
  • php7-json
  • php7-mbstring
  • php7-openssl
  • php7-pdo
  • php7-pgsql
  • php7-posix
  • php7-sqlite
  • php7-xmlreader
  • php7-xmlwriter
  • php7-zip

Operating systems tested

  • OpenSUSE 15.1 and later
  • CentOS 8
  • Astra Linux SE 1.6 (Linux kernel: 4.15.3-1)

Releases

Releases of FlyCubePHP are available on Github.

License

FlyCubePHP is licensed under the MIT License. See the LICENSE file for details.

GitHub

https://github.com/AnthonySnow887/FlyCubePHP
Comments
  • 1. Routing system: add route globbing and wildcard segments

    Route globbing is a way to specify that a particular parameter should be matched to all the remaining parts of a route. For example:

    get('photos/*other', [ 'to' => 'photos#unknown' ]);
    

    This route would match photos/12 or /photos/long/path/to/12, setting _params['other'] to "12" or "long/path/to/12". The segments prefixed with a star are called "wildcard segments".

    Wildcard segments can occur anywhere in a route. For example:

    get('books/*section/:title', [ 'to' => 'books#show' ]);
    

    would match books/some/section/last-words-a-memoir with _params['section'] equals 'some/section', and _params['title'] equals 'last-words-a-memoir'.

    Technically, a route can have even more than one wildcard segment. The matcher assigns segments to parameters in an intuitive way. For example:

    get('*a/foo/*b', [ 'to' => 'test#index' ]);
    

    would match zoo/woo/foo/bar/baz with _params['a'] equals 'zoo/woo', and _params['b'] equals 'bar/baz'.

    Reviewed by AnthonySnow887 at 2022-05-19 12:41
  • 2. Support for concurrent connection with different databases

    RUS

    Добавить поддержку одновременного соединения с различными БД. Доработать конфигурационный файл. Доработать DatabaseFactory, ActiveRecord и систему миграций.

    ENG

    Add support for concurrent connections to different databases. Edit the configuration file. Update DatabaseFactory, ActiveRecord and Migration system.

    Reviewed by AnthonySnow887 at 2022-05-13 10:03
  • 3. Routing system: add redirect in routes

    RUS

    Добавить redirect в маршруты, чтобы использовать автоматическое перенаправление без вызова метода контроллера:

    get("/stories", [ 'to' => redirect("/articles") ] );
    // --- or ---
    get("/stories/:name", [ 'to' => redirect("/articles/%{name}") ] );
    // --- or ---
    get("/stories/:name", [ 'to' => redirect("/articles/%{name}", /*status*/ 302) ] );
    

    ENG

    Add redirect to routes to use automatic redirect without calling a controller method:

    get("/stories", [ 'to' => redirect("/articles") ] );
    // --- or ---
    get("/stories/:name", [ 'to' => redirect("/articles/%{name}") ] );
    // --- or ---
    get("/stories/:name", [ 'to' => redirect("/articles/%{name}", /*status*/ 302) ] );
    
    Reviewed by AnthonySnow887 at 2022-05-13 09:11
  • 4. Routing system: add сonstraints

    RUS

    Добавить constraints, чтобы использовать автоматическую проверку на основе регулярных выражений для динамического сегмента:

    get('/photos/:id', [ 'to' => 'Photos#show', 'constraints' => [ 'id' => '/[A-Z]\d{5}/' ] ] );
    

    ENG

    Add constraints to use automatic regular expression validation for the dynamic segment:

    get('/photos/:id', [ 'to' => 'Photos#show', 'constraints' => [ 'id' => '/[A-Z]\d{5}/' ] ] );
    
    Reviewed by AnthonySnow887 at 2022-05-13 09:01
  • 5. App loading speed optimization

    NOTE: It's just speculation and guesswork!

    RUS

    Подумать над оптимизацией скорости загрузки приложения. Возможно стоит добавлять каталоги моделей и контроллеров в AutoLoader. При этом для данных файлов не вызывать include_once. То же самое сделать и для контроллеров и моделей плагинов.

    На данный момент ядро загружает все дерево файлов, даже те что не нужны для обработки конкретного маршрута.

    Так же нужно переписать метод RouteCollector::checkRoutes - выполнить хранение маршрутов и классов для них в кэше, а проверку классов в данном методе выполнять только если объект не найден в кэше, или в development mode.

    Возможно данный подход позволит увеличить скорость обработки запроса.

    ENG

    Think about optimizing the download speed of the application. It might be worth adding model and controller catalogs to AutoLoader. At the same time, do not call include_once for these files. Do the same for controllers and plugin models.

    At the moment, the kernel is loading the entire tree of files, even those that are not needed to process a particular route.

    You also need to rewrite the RouteCollector::checkRoutes method - store the routes and classes for them in the cache, and check the classes in this method only if the object is not found in the cache, or in development mode.

    Maybe this approach will increase the speed of request processing.

    Reviewed by AnthonySnow887 at 2022-02-18 14:50
  • 6. Сreate a loader and parser for help files

    RUS

    Создать загрузчик и парсер файлов help. Описание help рекомендуется реализовать на основе markdown файлов. Добавить набор вспомогательных методов для вставки коректных путей к ресурсам Asset Pipeline.

    ПРИМЕЧАНИЕ: реализация будет включать разбор заголовков и содержимого файлов с формированием единого оглавления, корректных ссылок на разделы и изображения.

    ПРИМЕЧАНИЕ: предлагается реализовать в версии 1.6.0

    ENG

    Create a loader and file parser help. Help description is recommended to be implemented based on markdown files. Add a set of helper methods to insert correct paths to Asset Pipeline resources.

    NOTE: The implementation will include parsing the headers and content of the files to form a single table of contents, correct links to sections and images.

    NOTE: suggested to be implemented in version 1.6.0

    Reviewed by AnthonySnow887 at 2022-02-07 12:59
  • 7. Сreate a loader and parser for api description files

    RUS

    Создать загрузчик и парсер файлов описания api. Описание api рекомендуется реализовать на основе json файлов.

    ПРИМЕЧАНИЕ: использование yaml было бы проще, но повлечет за собой лишние зависимости. На данном этапе разработки использование yaml отклоняется.

    ПРИМЕЧАНИЕ: предлагается реализовать в версии 1.4.0

    ENG

    Create a loader and parser for api description files. It is recommended to implement the api description based on json files.

    NOTE: using yaml would be easier, but would entail unnecessary dependencies. At this stage of development, the use of yaml is rejected.

    NOTE: suggested to be implemented in version 1.4.0

    JSON Example

    {
        "api-block-name": "[DEFAULT Controller class name]", // <-- Optional or May not be asked (default: Controller class name)
        "api-block-description": "[DEFAULT Empty]", // <-- Optional or May not be asked (default: empty string)
    
        "[Controller action name]": {
            "description": "", // <-- Optional or May not be asked (default: empty string)
            "version": "[API Version aka 0.0.1]", // <-- Optional or May not be asked (default: empty string)
            "deprecated": true/false, // <-- Optional or May not be asked (default: false)
            "output-formats": [ "json" ],
    
            "param-[Param Name]": {
                // All section Optional or May not be asked
    
                "name": "[Param Name]",
                "description": "", // <-- Optional or May not be asked (default: empty string)
                "type": "int",
                "optional": true/false, // <-- Optional or May not be asked (default: false)
                "empty": true/false, // <-- Optional or May not be asked (default: false)
                "min": 0, // <-- Optional or May not be asked (default: 0; for number types)
                "max": 100, // <-- Optional or May not be asked (default: 0; for number types)
                "available-values": [ "aa", "bb" ], // <-- Optional or May not be asked (default: empty array)
    
                "param-[Param Name N]": { 
                     // All section Optional or May not be asked
                }
            },
            
            "param-group-[Param Group Name]": {
                // All section Optional or May not be asked
    
                "name": "[Param Group Name]", // <-- Optional or May not be asked
                
                "param-[Param Name N1]": {
                     // All section Optional or May not be asked
                },
                "param-[Param Name N2]": {
                     // All section Optional or May not be asked
                },
                "param-[Param Name Nn]": {
                     // All section Optional or May not be asked
                }
            },
    
            "headers": {
                // All section Optional or May not be asked
    
                "[HTTP Header name]": "HTTP Header Description"
            },
    
            "return": {
                "code": 200,
                "type": "hash",
                "description": "", // <-- Optional or May not be asked (default: empty string)
    
                "param-[Param Name N1]": {
                    // All section Optional or May not be asked
                },
                "param-[Param Name Nn]": {
                    // All section Optional or May not be asked
                }
            },
    
            "error-[Error Name]": {
                // All section Optional or May not be asked
    
                "name": "[Error Name]", // <-- Optional or May not be asked
                "code": 500,
                "description": "", // <-- Optional or May not be asked (default: empty string)
    
                "param-[Param Name N1]": {
                    // All section Optional or May not be asked
                },
                "param-[Param Name Nn]": {
                    // All section Optional or May not be asked
                }
            },
    
            "example-[Example Name]": {
                // All section Optional or May not be asked
    
                "name": "[Example Name]", // <-- Optional or May not be asked
                "description": "", // <-- Optional or May not be asked (default: empty string)
                "request": "", // <-- Optional or May not be asked
                "response": "" // <-- Optional or May not be asked
            },
            
            "example-[Example With Multilines]": {
                "name": "[Example With Multilines]",
                "description": "",
                "request": [
                    "This is multiline",
                    "example for request",
                    "...etc"
                ],
                "response": [
                    "This is multiline",
                    "example for response",
                    "...etc"
                ]
            }
        }
    }
    
    Reviewed by AnthonySnow887 at 2021-11-30 15:22
  • 8. Add support for Vue JS (low priority task!)

    NOTE: This is a low priority task!

    RUS

    Добавить поддержку сборки Vue JS в JSBuilder. Добавить возможность установки сборщика скриптов по умолчанию для JSBuilder.

    ENG

    Add Vue JS build support to JSBuilder. Add the ability to set the default script builder for JSBuilder.

    Reviewed by AnthonySnow887 at 2022-02-07 13:09
  • 9. Add support for TypeScript

    RUS

    Добавить поддержку сборки TypeScript в JSBuilder. Добавить возможность установки сборщика скриптов по умолчанию для JSBuilder.

    ENG

    Add TypeScript build support to JSBuilder. Add the ability to set the default script builder for JSBuilder.

    Reviewed by AnthonySnow887 at 2022-02-07 13:06
  • 10. Add support for CoffeeScript

    RUS

    Добавить поддержку сборки CoffeeScript в JSBuilder. Добавить возможность установки сборщика скриптов по умолчанию для JSBuilder.

    ENG

    Add CoffeeScript build support to JSBuilder. Add the ability to set the default script builder for JSBuilder.

    Reviewed by AnthonySnow887 at 2022-02-07 13:05
The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)

gRPC - An RPC library and framework gRPC is a modern, open source, high-performance remote procedure call (RPC) framework that can run anywhere. gRPC

Aug 8, 2022
TrailLamp is a lightweight, easy-to-use Php MVC framework that can be used to build web applications and REST APIs.

TrailLamp Introduction TrailLamp is a lightweight, easy-to-use Php MVC framework that can be used to build web applications and REST APIs. Installatio

Jun 10, 2022
Woski is a fast and simple lightweight PHP Framework for building applications in the realm of the web.
Woski is a fast and simple lightweight PHP Framework for building applications in the realm of the web.

Woski is a simple fast PHP framework for the Realm The Project Installation Clone the repository $ composer create-project clintonnzedimma/woski myApp

Apr 13, 2022
Framework for building extensible server-side progressive applications for modern PHP.
Framework for building extensible server-side progressive applications for modern PHP.

Chevere ?? Subscribe to the newsletter to don't miss any update regarding Chevere. Framework for building extensible server-side progressive applicati

Jun 7, 2022
Symprowire is a PHP MVC Framework based and built on Symfony, using the ProcessWire CMS as DBAL and Service Provider.

Symprowire - PHP MVC Framework for ProcessWire 3.x Symprowire is a PHP MVC Framework based and built on Symfony using ProcessWire 3.x as DBAL and Serv

Jan 16, 2022
💡 Mudrock is a MVC PHP framework, which was inspired by the Laravel and CodeIgniter frameworks.

?? Mudrock is a MVC PHP framework, which was inspired by the Laravel and CodeIgniter frameworks

Nov 17, 2021
A simple PHP MVC framework without extra files and codes that you don't need

Welcome to (SPM) Simple PHP MVC, just what you need! This is a simple PHP MVC framework without extra files and codes that you don't need.

Aug 4, 2022
A super fast, customizable and lightweight PHP MVC Starter Framework to extend for your own...

PHPMVC A super fast, customizable and lightweight PHP MVC Starter Framework to extend for your own... How to Start Clone this repo - git clone https:/

Aug 8, 2022
a micro mvc framework for php

micro-mvc-php a micro mvc framework for php Config your Web url in .env . lifecycle All request proccess by index.php Autoload files include in bootst

Jul 9, 2022
The Hive is a simple php mvc framework
The Hive is a simple php mvc framework

Hive framework The Hive is a simple php mvc framework . Information Features : -MVC design -PDO connection -OOP system -Twig template -Very Fast, simp

Sep 4, 2021
This repository include my own PHP MVC Framework

PHP OWN MVC FRAMEWORK Kendimi geliştirmek ve modern PHP Framework'lerinin işleyişini kavram amacıyla inşa ettiğim profesyonele yakın PHP MVC Framework

Jul 28, 2022
Minimal PHP MVC Framework that is eternally broken.

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ██ ▄▄▄ █ ▄▄▀█ ▄▄██▄██ ▄▀██▄██ ▄▄▀█ ▄▄▀ ██ ███ █ ▄▄▀█▄▄▀██ ▄█ █ ██ ▄█ ▀▀ █ ██ ██ ▀▀▀ █▄▄▄▄█▄▄▄█▄▄▄█▄▄██▄▄▄█▄██▄█

Dec 16, 2021
A Slim PHP MVC framework built just for fun!

Aura Framework A Slim PHP MVC framework built just for fun! en: Note: This repository only contains the core code of the Aura framework. If you want t

Dec 16, 2021
PHP MVC Framework

You can select version on branch list. cmd> composer install 0.1. Z Framework (V2.0.0) 0.2. Easiest, fastest PHP framework. (Simple) 0.3. Document 1.

Jul 10, 2022
A simle MVC framework implimentation using php

Vanilla-framwork A simle MVC framework implimentation using php , no additonal 3rd party are used (Vanilla Php); Email Support Configuration for email

Jul 10, 2022
a framework for WebDevelop based on the mvc structure. The name of this project for Fun because everyone can use it. Completely simple and powerful structure for all your projects

A_A (-.-) ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ |-| █▄─▄▄─█▄─██─▄█─▄▄▄▄█─▄▄▄▄█▄─█─▄█─▄▄▄─██▀▄─██─▄

Jun 29, 2022
PhpBoot is an easy and powerful PHP framework for building RESTful/Microservices APIs.
PhpBoot is an easy and powerful PHP framework for building RESTful/Microservices APIs.

?? tiny & fast PHP framework for building Microservices/RESTful APIs, with useful features: IOC, Hook, ORM, RPC, Swagger, Annotation, Parameters binding, Validation, etc.

Aug 7, 2022
Quite possibly the smallest MVC framework you'll ever use.

Swiftlet Swiftlet is quite possibly the smallest MVC framework you'll ever use. And it's swift. Licensed under the MIT license. Buzzword compliance ✔

Feb 22, 2022