Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

best UI library for PHP [closed]

Tags:

php

I am new to webdevelopment,we are developing a quiz game using PHP and MYSQL.I would like to know what would be the best library for PHP for UI development. The library which could handle the compatablity issues across the browsers and provide rich UI.

Thanks in advance.

like image 202
karthik Avatar asked Jan 18 '11 06:01

karthik


2 Answers

PHP has nothing to do with client-side UI thus there are no PHP libraries for this task. This is typically handled using JavaScript or CSS frameworks

like image 142
Jani Hartikainen Avatar answered Nov 19 '22 09:11

Jani Hartikainen


The same quest has prompted me to start this project: Agile UI - a PHP UI Component Library.

My goal is to let developers focus on the business tasks and use standard UI implementation for a web/responsive application. This won't solve 100% of use-cases, but it is a quick-and-effective solution. (For more complex scenarios, I recommend using ReactJS with RestAPI).

Agile UI is a relatively new project but it is maturing very quickly and you are welcome to try it out. There are no heavy dependencies and code is designed to work out-of-the-box.

  1. composer require atk4/ui

  2. Add this code to a file:

    include 'vendor/autoload.php';

    $app = new \atk4\ui\App('My App'); $app->initLayout(new \atk4\ui\Layout\Admin());

    $db = \atk4\data\Persistence::connect($DSN);

    class User extends \atk4\data\Model { public $table = 'user'; function init() { parent::init();

        $this->addField('name');
        $this->addField('email', ['required'=>true]);
        $this->addField('password', ['type'=>'password']);
    }
    

    }

    $app->layout->add(new \atk4\ui\CRUD()) ->setModel(new User($db));

The result should look like this:

enter image description here

like image 40
romaninsh Avatar answered Nov 19 '22 08:11

romaninsh