Deskshell PHP

117 views
Skip to first unread message

Kevin Ingwersen

unread,
Oct 1, 2013, 7:00:22 PM10/1/13
to appj...@googlegroups.com
Hey everyone, that enthusiastic PHP dude talking right here :)

It happened, and it is extremely amazing! First, a picture for all of you to look at...

Bildschirmfoto 2013-10-02 um 00.46.11.JPG

Simon Horton

unread,
Oct 2, 2013, 3:30:47 AM10/2/13
to appj...@googlegroups.com
Hi Kevin,

I just logged into the forum: https://groups.google.com/forum/#!topic/appjs-dev/1IpYoE6MGNQ and I don't see all of your post, something has been messed up. I suggest you post again so that everyone gets the full message :-)

/Simon


On Wed, Oct 2, 2013 at 1:00 AM, Kevin Ingwersen <ingwi...@googlemail.com> wrote:
Hey everyone, that enthusiastic PHP dude talking right here :)

It happened, and it is extremely amazing! First, a picture for all of you to look at...


--
You received this message because you are subscribed to the Google Groups "appjs-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appjs-dev+...@googlegroups.com.
To post to this group, send email to appj...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


And now the explanation.


What you are seeing there, is the output of a PHP backend into the browser. No, it is not a nodejs+router trick, it is PURE PHP. There is no extra trickery or anything :).
The PHP used to make this possible is being driven by the pthreads extension, so we have a multithreading PHP. That way, we have one thread for the Browser execution, and another for the webserver. The main thread belongs to the running script, including the main sript that is supplied via the .desk file.

Currently I am always just returning a dump of $_SERVER. However, that is going to be changed ASAP. I will be implementing a full webserver that way and have it act just like you are used to from nodejs and such - with the difference that this is PHP.

The main script can add/remove event listeners that are fired off when a message thru the remote debug protocol comes in. Like:

Event::on("CSS.styleSheetAdded", function($params){
echo "A new style was added. Src: ".$params->href."\n";
});

Whenever the browser sends the named event, this callback will be executed.

The next steps
- Providing an API to interact with the Remote Debugging Protocol.
- A Windows port. I am sure Simon is going to litterally jump on this :)
For the windows port, we need to have pthreads and curl extension.
For this, libcurl and pthreads are required to be installed on the OS.
Download the libraries, compile them. Then do the following, assuming you downloaded a copy of PHP 5.5.3 like I did:
$ cd php-5.5.3/ext
$ cd ../
$ rm configure
$ ./buildconf --force
$ ./configure --enable-maintainer-zts --with-curl --enable-pthreads --enable-sockets
$ make
$ make install
Please note, I never built on windows, its your task to adopt these UNIX instructions :)
- Finally developing the appIO extension in PHP and JavaScript to provide an layer above the rDebug protocol to do more crazy stuff - mainly to simulate the old "v8 bridge" ;)

A stable release will come out soon... ^^

Another todo
- Modifying the Chromium .xib files on Mac OS to ensure that the end-user will not have all the controll we'd like to give him. :)

Regards, Ingwie

PS. Now that this is done, and the webserver is soon going to be completed, we will have a port of drag0n soon :)


Simon Horton

unread,
Oct 2, 2013, 3:31:21 AM10/2/13
to appj...@googlegroups.com
To be clear I just get the first paragraph: 
Hey everyone, that enthusiastic PHP dude talking right here :)

It happened, and it is extremely amazing! First, a picture for all of you to look at...

Then nothing more.

Kevin Ingwersen

unread,
Oct 2, 2013, 4:33:57 AM10/2/13
to appj...@googlegroups.com
Hey everyone, that enthusiastic PHP dude talking right here :)

It happened, and it is extremely amazing! First, a picture for all of you to look at...

<!-- Picture at bottom since it f'kd the email X3 -->

sihorton

unread,
Oct 2, 2013, 1:41:54 PM10/2/13
to appj...@googlegroups.com, ingwi...@googlemail.com
This is really excellent! Ingwie has really managed to solve some tough problems to get the base for this port working. It needed to have support for websockets (as opposed to pure sockets) and then threading, both of which are not standard out of the box functionality.

I am 100% behind this port of the architecture to php. I think it will lead to a much higher quality software project. It will help us to avoid making the design hardcoded to a particular platform and it will also enable us to copy the best bits from the various ports and so make a better end product.

/Simon
Reply all
Reply to author
Forward
0 new messages