User Interface
Business Model

PHP is a server-side language. That prompted us to implement server-side UI actions. They are very easy to define - no need to create any routes or custom routines, simply define a PHP closure like this:

$button = \atk4\ui\Button::addTo($owner, ['Click for the greeting!']);
$button->on('click', function () {
    return 'Hello World!';
Click for the greeting!

A component of Agile Toolkit (callback) enables seamless communication between the frontend components (which are often written in VueJS) and the backend. We also support seamless reloading of any UI widget:

$seg = \atk4\ui\View::addTo($owner, ['ui' => 'segment']);

\atk4\ui\Text::addTo($seg)->set('Number of buttons: ');

$paginator = \atk4\ui\Paginator::addTo($seg, [
    'total' => 5,
    'reload' => $seg,
    'urlTrigger' => 'count',

\atk4\ui\View::addTo($seg, ['ui' => 'divider']);

for ($i = 1; $i <= ($_GET['count'] ?? 1); ++$i) {
    \atk4\ui\Button::addTo($seg, [$i]);
Number of buttons:

This demo also shows you how to create composite views. The '$seg' above contains text, paginator, divider and some buttons. Interestingly, Paginator view also consists of buttons and Agile Toolkit renders everything reliably.