Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Writing windows applications in php example

I recently discovered that it is possible to write windows applications in php. Can someone provide a link to an windows (windows 7) application written in php so I can install and run. I am still kind of sceptical that this is possible. Seeing is believing

Edit There are a lot of broken links on the apps page of the phpgtk community site mentioned in a couple of answers. I am looking for an exe that I can download and install to prove to me that it is possible(and practical). A lot of the applications on the phpgtk site are a bit of a joke(tick tac toe, click a button as fast as you can etc), are there any serious desktop applications being written in php or should I just give up on the idea now and pursue c++ for desktop applications?

like image 619
andrew Avatar asked Feb 01 '12 20:02

andrew


3 Answers

As far as I know, PHP-GTK is sort of dead, or at least very inactive. Not that it ever had a very active community anyway ...

There are also a few other PHP GUI projects out there, personally I wouldn't use any of them, for the simple reason that IMHO PHP is lacking features to write serious GUI applications, the biggest is probably the lack of threads, or any other serious multi-processing capabilities for that matter...

There is pcntl_fork(), which works (used it a few times), but it has the major the drawback that it doesn't work on Windows. One might also argue that using fork()is inferior to using threads, but that's a different discussion.

Especially with a GUI you'll probably want some sort of threading support, let's say your GUI is doing some operation that'll take 20 second (copy files, download something, etc.), you typically don't want the user interface to freeze while this operation to happen, and you may also want to run multiple operations at the same time. I'm not sure how PHP-GTK solves these problems, if they solve them at all, but lack of real built-in language support would still cripple you.

There are also other drawbacks to PHP, but those are more general, although you will probably run into them sooner on desktop apps than on web applications (for example, error handling, OS portability, proper UTF-8 support, etc.).

There are many other programming languages which are much better suited for this particular job, and most of them have the advantage of having a (much) larger community than PHP-GTK, which means more docs, more example, more people to ask for help, etc.

C++ might be a good choice, Python, Perl, Ruby, C#, etc, etc. can also be considered. Wikipedia has an extensive list: http://en.wikipedia.org/wiki/Comparison_of_programming_languages

My advice: Choose one that looks Ok and meets your needs, and start hacking. If you don't like it, try something else. ;)

like image 137
Martin Tournoij Avatar answered Nov 05 '22 06:11

Martin Tournoij


WinBinder is an open source extension for PHP, the script programming language. It allows PHP programmers to easily build native Windows applications.

like image 24
Martin Jovial Avatar answered Nov 05 '22 06:11

Martin Jovial


This should be what you are looking for :)

http://php-gtk.eu/en/apps

like image 45
Janis Peisenieks Avatar answered Nov 05 '22 07:11

Janis Peisenieks