Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/epeios-q37/atlas-php

Web technologies for all your apps.
https://github.com/epeios-q37/atlas-php

Last synced: 24 days ago
JSON representation

Web technologies for all your apps.

Awesome Lists containing this project

README

        

# Discontinued

Because this library requires threads, it does not work with the usual version of *PHP*. The required version of *PHP* (https://www.php.net/manual/en/book.pthreads.php) is not easy to install (https://www.php.net/manual/en/pthreads.installation.php), hence probably the fact that nobody has ever used the *PHP* version of the *Atlas* toolkit.

As a result, the development of this library is interrupted, but could be resumed if the situation regarding the ZTS (https://www.php.net/manual/en/pthreads.requirements.php) version ever improves .

# *PHP* version of the *Atlas* toolkit

![For PHP](http://q37.info/download/assets/PHP.png "PHP logo")

[![Version 0.10.0](https://img.shields.io/static/v1.svg?&color=90b4ed&label=Version&message=0.10.0)](http://q37.info/s/gei0veus)

A fast and easy way to write *PHP* programs with a graphical user interface ([*SPA*](http://q37.info/s/7sbmxd3j) like program).

With the *Atlas* toolkit, you obtain hybrid programs. Like desktop applications, the same code can handle both [front and back ends](http://q37.info/s/px7hhztd), and, like web applications, the programs will be reachable from all over the internet.

## *Hello, World!*

Here's how a [*Hello, World!*](https://en.wikipedia.org/wiki/%22Hello,_World!%22_program) type program made with the *Atlas* toolkit looks like:

![Little demonstration](http://q37.info/download/assets/Hello.gif "A basic example")

- `git clone http://github.com/epeios-q37/atlas-php`
- `cd atlas-php`
- `php Hello/Hello.php`

(with the [*pthreads*](http://php.net/manual/book.pthreads.php) extension)

For a live demonstration: .

Source code:

```php




Submit
Clear

EOT;

public function handle($dom, $action, $id) {
switch ($action) {
case "": // Action label for a new connection.
$dom->setLayout("", self::$body);
break;
case "Submit":
$dom->alert("Hello, " . $dom->getContent("input") . "!");
break;
case "Clear":
if ($dom->confirm("Are you sure?"))
$dom->setContent("input", "");
break;
}
$dom->focus("input");
}
}

function hello() {
return new Hello();
}

Atlas::launch('hello');
?>
```

## *TodoMVC*

And here's how the *Atlas* toolkit version of the [*TodoMVC*](http://todomvc.com/) application looks like:

![TodoMVC](http://q37.info/download/TodoMVC.gif "The TodoMVC application made with the Atlas toolkit")

For a live demonstration: .

## Content of the repository

The `Atlas` directory contains the *PHP* source code of the *Atlas* toolki, which is not needed to run the examples.

`Atlas.phar` is the file which is needed to use the *Atlas* toolkit in your own program.

All other directories are examples.

To run an example, launch `php /main.php`, where `` is the name of the example (`Blank`, `Chatroom`…).

NOTA: **You need *PHP* with [*pthreads*](http://php.net/manual/book.pthreads.php)!**

The *Atlas* toolkit is also available for:

- *Java*:
- *Node.js*:
- *Perl*:
- *Python*:
- *Ruby*:

For more information about the *Atlas* toolkit: .