Any good PHP compatible PHP frameworks?

I am looking for a PHP based web reporting platform that works with MySQL.

Here's my problem (besides being too lazy to program this myself): I have a large table (50k + rows) that stores log data for several clients. These customers should be able to sort and search and do all these grandiose things.

I really would have liked something with a decent amount of power behind him, so I fear building it myself. This is not enough to deserve an excessive amount of time, but it is a necessary function for my clients.

Ideally, I need some kind of infrastructure that I can either transfer or receive the data itself using the template engine (so this will make the whole presentation). I could get the presentation presented and drop it on my website.

Something so nice probably doesn't exist, but maybe I'm lucky.

+3
source share
6 answers

I found a decent replacement that suits me very well: a symfony plugin called laiguExtGridPlugin . This is not a framework, but it uses JSON calls to retrieve data and display it with sorting and pagination. I have not implemented it yet, I am going to read this code tonight to see how to do it - there is very little documentation on the plugin, go figure. As a result, I will post something on my blog when I implement it.

Update: laiguExtGridPlugin was implemented, but it sits ontop of the Javascript library called ext . This library is massive, over 27 megabytes. This is for the whole library. The part I'm using is about 100KB. I also use jQuery, so loading both of these libraries (which, fortunately, is only for one page) is completely unacceptable. I will switch to jQuery grid system.

I also found a commercially licensed jQuery plugin called jqGrid from Trirand. This is a bit out of my price range of $ 599 for a single seat license with subscription, source and priority support, or $ 450 for a license. However, it looks pretty good and reminds me a lot of the new user interfaces of Msoft Office.

At the moment, the first will be very good; however, I am going to look back at the framework. I can just do it myself.

+1
source

You can try KoolReport .

Disclaimer: I am working on this project.

This is a frame framework, exactly what you are looking for. You can download the framework via the website, the clone project from github, or use the composer to install: composer require koolphp/koolreport .

After installation, here is a basic example of creating a sales report

index.php : This is a bootstrap file

 <?php require_once "SalesByCustomer.php"; $salesByCustomer = new SalesByCustomer; $salesByCustomer->run()->render(); 

SaleByCustomer.php : this file defines the connection and data transfer process

 <?php require_once "koolreport/autoload.php"; use \koolreport\processes\Group; use \koolreport\processes\Limit; use \koolreport\processes\Sort; class SalesByCustomer extends \koolreport\KoolReport { public function settings() { return array( "dataSources"=>array( "sales"=>array( "connectionString"=>"mysql:host=localhost;dbname=db_sales", "username"=>"root", "password"=>"", "charset"=>"utf8" ) ) ); } public function setup() { $this->src('sales') ->query("SELECT customerName,dollar_sales FROM customer_product_dollarsales") ->pipe(new Group(array( "by"=>"customerName", "sum"=>"dollar_sales" ))) ->pipe(new Sort(array( "dollar_sales"=>"desc" ))) ->pipe(new Limit(array(10))) ->pipe($this->dataStore('sales_by_customer')); } } 

SalesByCustomer.view.php : this view file in which you can visualize data

 <?php use \koolreport\widgets\koolphp\Table; use \koolreport\widgets\google\BarChart; ?> <div class="text-center"> <h1>Sales Report</h1> <h4>This report shows top 10 sales by customer</h4> </div> <hr/> <?php BarChart::create(array( "dataStore"=>$this->dataStore('sales_by_customer'), "width"=>"100%", "height"=>"500px", "columns"=>array( "customerName"=>array( "label"=>"Customer" ), "dollar_sales"=>array( "type"=>"number", "label"=>"Amount", "prefix"=>"$", ) ), "options"=>array( "title"=>"Sales By Customer" ) )); ?> <?php Table::create(array( "dataStore"=>$this->dataStore('sales_by_customer'), "columns"=>array( "customerName"=>array( "label"=>"Customer" ), "dollar_sales"=>array( "type"=>"number", "label"=>"Amount", "prefix"=>"$", ) ), "cssClass"=>array( "table"=>"table table-hover table-bordered" ) )); ?> 

And here is the result .

In principle, you can simultaneously receive data from many data sources, translate them through processes, and then save the result in a data warehouse. Then the data in the data warehouse will be available in the view for visualization. Google charts are integrated inside the frame, so you can immediately use beautiful charts and graphs.

Ok, here are some good links:

Hope this helps.

+2
source

PHPRunner - PHP code generator

There is also this , but I don’t know if you want it to be free.

There is also this tool for creating a cross platform (which is not in PHP).

+1
source

This can be done simply in the Agile Toolkit , which will also integrate jQuery and AJAX.

1.git clone git: //github.com/atk4/atk4.git

(alternatively you can download the kit)

2.config.php:

 <?php $config["atk"]["base_path"]="./atk4/"; $config["dsn"]='mysql://root: root@localhost /project'; $config['url_postfix']='.php'; 

3.index.php:

 <?php include'atk4/loader.php'; class MyApp extends ApiFrontend { function init(){ parent::init(); $this->add('jUI'); $this->add('BasicAuth')->allow('demo','demo')->check(); $this->add('Menu',null,'Menu') ->addMenuItem('report','index') ->addMenuItem('logout'); } function page_index($p){ $this->dbConnect(); $f=$p->add('Filter',null,null,array('form_empty')); $f->addField('line','name'); $f->addField('line','surname'); $f->addSubmit('Search'); $g=$p->add('Grid'); $g->setSource('user'); $g->addColumn('text','gender')->makeSortable(); $g->addColumn('text','name')->makeSortable(); $g->addColumn('text','surname')->makeSortable(); $g->addPaginator(25); $f->useDQ($g->dq); } } $api=new MyApp('myapp'); $api->main(); 

Features: pagination, sorting, filtering, and you can customize everything. Agile toolkit has extensive documentation and a training book.

You can login using u: demo, p: demo

+1
source

If you haven’t already, I would ask for a Roman proposal. For everything agiletoolkit requires, it is less than 6 MB and only downloads the parts you need on the page, but the example that it provided in the above code is all you need to create a grid containing data from tables.

The setSource line determines which table will be retrieved from mysql, in this case the 'user' table

  $g->setSource('user'); 

and if you need to force a restriction on returned rows, and not allow the user to filter them, for example. just by listing the guys you can add

  $g->addCondition('gender','M'); 

I think there are several export options for MVCGrid in the atk4-addons directory, so you can add the export of Excel or PDF data to the grid, although I did not have time to examine these parameters myself - I just noticed the export. php in the addon directory.

+1
source

There are several tools that I think can help you:

http://mydbr.com/ : Can help you convert your SQL queries to professional reports

http://mysqlreports.com : a wizard-style interface that can help you create PHP reports for MySQL (you can search and sort), it supports member Loggin

0
source

Source: https://habr.com/ru/post/1346637/


All Articles