Skip to content

Tiippex/ubiquity

 
 

Repository files navigation

img

Scrutinizer Code Quality Code Coverage Documentation Status Total Downloads Latest Unstable Version Latest Stable Version License Join the chat at https://gitter.im/ubiquity-framework/community

Ubiquity, one of the fastest frameworks, with the main features of the bests

Main features

  • MVC
  • Dependency injection
  • PSR-4 Autoloader
  • Router based on annotations
  • ORM implementing Data Mapper
  • Multi-level cache
  • Rest Server
  • Web admin interface (UbiquityMyAdmin)
  • Scaffolding
  • Console Admin interface (Devtools)
  • Assets & themes management (since 2.1.0, on a proposal from @Gildonei)

Upgrade

If Ubiquity devtools are already globally installed, and you want to upgrade to the last stable version:

composer global update

Installation

The easiest way to install Ubiquity is to use devtools

  • 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 community. In the meantime, you can consult:

For further assistance please feel free to :

  • ask your questions directly using gitter
  • create an issue if you notice a bug or suspicious behavior

Performances

Ubiquity executes its own benchmarks, especially for the ORM part:

This test involves loading from a Mysql database:

  • 2100 instances of the Host class
    • each host is associated with 1 user, who can have configured some virtualhosts
    • each host has multiple servers, of a certain type.

Approximately 6000 objects are loaded, in this intuitive line with Ubiquity:

$hosts=DAO::getAll(Host::class,"",["user.virtualhosts","servers.stype"]);

In regards to this type of related object loading that can be very time consuming with an ORM, Ubiquity is 3,1 times faster than Codeigniter associated with Doctrine, 3,6 times faster than Symfony, 20 times more than Laravel-Eloquent!

Unlike Doctrine, for this data loading, Ubiquity:

  • does not perform any SQL joins
  • executes only 123 queries, against 3190 for Doctrine

ORM benchmarks

see for yourself orm-benchmarks

These excellent results have been confirmed by an independent benchmark site : phpbenchmarks.com

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

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.

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:

crud index

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

Admin interface

Graphic design

Donations

You can tell us your pleasure in using Ubiquity, giving us a star, and you can do even better by contributing...

Thank you!

Packages

No packages published

Languages

  • HTML 92.5%
  • PHP 4.3%
  • JavaScript 2.9%
  • Other 0.3%