开发者

best UI library for PHP [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, 开发者_开发问答references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

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.


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


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:

best UI library for PHP [closed]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜