phpmv / ubiquity
Ubiquity-framework
Installs: 35 716
Dependents: 10
Suggesters: 0
Security: 0
Stars: 693
Watchers: 24
Forks: 60
Open Issues: 13
Type:framework
Requires
- php: >=7.4
Requires (Dev)
- phpmv/php-mv-ui: ^2.2
- phpmv/ubiquity-codeception: dev-master
- phpmv/ubiquity-dev: ^0.1
- phpmv/ubiquity-devtools: dev-master
- dev-master / 2.6.x-dev
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.12
- 2.4.11
- 2.4.10
- 2.4.9
- 2.4.8
- 2.4.7
- 2.4.6
- 2.4.5
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.13
- 2.3.12
- 2.3.11
- 2.3.10
- 2.3.9
- 2.3.8
- 2.3.7
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.0
- v2.1.4
- v2.1.3
- v2.1.2
- v2.1.1
- v2.1.0
- 2.0.11
- v2.0.10
- v2.0.9
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.5-b
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- dev-316-connect-to-microsoft-access
- dev-204-rfc-nette-latte-templates-compatibility
- dev-199-rfc-config-add-env-variables-and-profiles-to-config
- dev-nosql-prepare
This package is auto-updated.
Last update: 2024-11-19 00:02:58 UTC
README
Ubiquity, a powerful and fast framework for efficient design.
Main features
- MVC or Domain Driven Design with MVC
- Dependency injection
- PSR-4 Autoloader
- Router based on annotations/attributes
- ORM implementing Data Mapper
- Multi-databases & multi-database types support (PDO Mysql/PostgreSQL/SQLite, Mysqli, Swoole coroutine Mysql, Tarantool, MongoDB)
- Multi-level cache
- Rest Server
- Web admin interface (Webtools)
- Scaffolding (CRUD, REST, Controllers, views, authentification...)
- Console Admin interface (Devtools)
- Assets & themes management (since 2.1.0, on a proposal from @Gildonei)
- Managed servers: fpm/fastcgi with Apache or nginX, ngx_php, Workerman, Swoole, Roadrunner, PHP-PM with ReactPHP (Dev only)
- Multi template engines support: Twig(default), Latte and Plates since 2.5.2
Upgrade
If Ubiquity devtools are already globally installed, and you want to upgrade to the lastest stable version:
composer global update
For an existing project (in the root folder):
composer update
Project creation
The easiest way to create a project is to use composer create-project command:
Creation of the project firstProject
composer create-project phpmv/ubiquity-project firstProject
This installation adds devtools and webtools to the project.
- Running the server with
vendor/bin/Ubiquity serve
- webtools available at
http://127.0.0.1:8090/Admin
Devtools installation
It is also possible to install devtools globally, to share their use between different projects, and to get more options for a project creation.
- Install Ubiquity-devtools:
composer global require phpmv/ubiquity-devtools
- Create a project:
Ubiquity new firstProject -a
- Start the server:
Ubiquity serve
Need some help?
Ubiquity is a recent project and does not yet have a large community. In the meantime, you can consult:
- Quick-start guide with devtools to discover the framework with the cli program
- Quick-start guide with webtools to discover the framework with the webtools interface
- Documentation to go deeper
- API documentation to search further
For further assistance please feel free to :
- ask your questions directly using gitter
- create an issue if you notice a bug or a suspicious behavior
Performances
Ubiquity is very fast and performs well.
In the PHP world
The various results of the Techempower benchmarks show this conclusively.
TechEmpower Multiple queries test (*) (see PHP frameworks results)
These excellent results have also been confirmed by an independent benchmark site : phpbenchmarks.com
In the world of web frameworks
Ubiquity is optimized for use with asynchronous platforms (Workerman and Swoole). It takes advantage of the recent PHP evolutions (opCache management and preloading). In this context, it performs against the fastest Frameworks written in C, C++, Rust or java:
TechEmpower 20 updates test (*) (see All frameworks results)
(*) Only tests with Framework and ORM are considered.
About design choices
Ubiquity was created in April 2017.
The project tries to simplify the development process, and empowers web developers who delivering value through their applications. It aims to combine performance and ease of handling.
This dual purpose has led to some design choices:
Get inspired by the best practices and successful concepts from other frameworks, but do not try to reproduce things that are not a part of the logic of PHP.
Some PHP frameworks were inspired by the Java world, which has contributed to more professional php development. But java is not PHP : the environments and languages are completely different (though their syntax is similar). What is good in Java is not necessarily in PHP.
Ubiquity wants to keep the essence of PHP and what it does best, for example:
- By using php (packed) arrays because they are effective in php (with php7 optimization)
- By not creating instances of classes to inject for the core part of the framework, to prefer the use of classes with static methods
Overall, Ubiquity wants to keep and use what PHP is good at.
In this perspective, Ubiquity chooses not to respect certain standards: For example, by not creating a Response object implementing an interface (see PSR-7 HTTP message interfaces ) in response to an Http request.
Not multiplying the ways of doing things.
If a method or technique is optimal, there's no reason to implement an alternative version, especially if there is a risk of degrading the performance or complicating the handling of the framework.
Avoiding multiple external dependencies, which are sometimes loaded when they are never used.
- They prevent the developer from optimizing his own code.
- In some applications, the dependency loading time is more expensive than running the application code.
The framework used must give the developer the means to optimize his application and not the other way around.
Ubiquity aspires to never become another labyrinthine system.
Preview of some features
Devtools console program
Ubiquity help
The console mode makes it easy to perform all the repetitive tasks related to the design of projects:
- creations : project, controllers, actions, routes, models, views,
- checking : routes, models, validators
- scaffolding (CRUD + authentification)
Scaffolding
Generation of the CRUD elements for a model class with devtools :
Ubiquity crud --resource=Developers --path=/devs/
The generated route /devs/ provides an entry point for CRUD operations:
Admin interface
Like the console, the administration interface makes it possible to act on the main components of the framework.
When creating a project, it can be installed with the -a option.
ubiquity new firstProject -a
Graphic design
- Ubiquity logos and banner: @richardbmx
Donations
You can tell us your pleasure in using Ubiquity, giving us a star, and you can do even better by contributing...
Thank you!