Frage

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?

War es hilfreich?

Lösung

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. ;)

Andere Tipps

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

This should be what you are looking for :)

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

there is an awesome extension called WinBinder, I used to work on it. its very easy and straightforward... here is what you can do with it VBM2 sample

also there is PHP-GTK which is a bit hard to learn for people who didn't code Desktop Apps before. however, PHP-GTK is powerful and has better support and you can develop apps on cross-platforms.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top