Skinnable, Portable Desktop Apps In PHP
joeldg writes "With the new Zend coding contest getting underway, a lot of PHP coders are hacking out some amazing new test code. In that vein and in response to the lack of skinning with PHP-GTK apps, I just finished up writing a tutorial with source code for doing skinnable desktop applications in PHP that run on both Linux and Windows."
This is probably a good time to mention EncPHP, a program I wrote that encapsulates a PHP script along with most of what it needs to run inside an EXE. Both console and GUI PHP apps are supported, though for GUI apps, if you choose to embed all of GTK inside the app, it's going to be huge.
It hasn't been updated in ages, but you can check out the latest version here: EncPHP on SourceForge
The sourcecode is included... it uses a free BASIC compiler to dynamically compile a dependance-free EXE with the PHP script, PHP interpreter, and required DLLs, inside an EXE. When the EXE is run, it extracts it all and runs the PHP script with the parameters passed on the command line. There are some simple options you can add to the start of your PHP script to tell it to include other files, and if it is a console or GUI app (to show or hide a console).
PHP compiled in CLI mode is pretty good as a quick tool to make other tools. I'm a die hard shell scripter, but the need to interface with web facing code on many servers led me down the path of using it, and it has really proven to be fairly good. There's a lag on slow machines when first executed, as it compiles to memory whenever a script is executed, and that's about my only complaint.
--
Evan "Not as portable as sh, not as common as perl"
"$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
I think it is quite appropriate saying it is for 'rapid' prototyping of windowed apps that can be used by both the developers (linux) and managers (windows) and they are both looking at the same thing.
Besides, in this situation you don't have to have the windows people going in and logging into the unix machines via putty or whatever to see the ncurses version of the monitor.
Just have them download php-gtk which is practically a plugin at this point and they can create desktop icons or whatever for the app.
Makes my life easier and theirs and I can crank out apps and debug them fast with how I have it set it up.
Appropriate is in the eye of the manager in this case.
anime+manga together at last.. in real time.
I'm gonna venture and say that PHP-Qt is not as attractive as PHP-GTK. The PHP people probably want PHP-GTK to spread as far as possible, or at least cross equally well between Windows and Linux. And Qt has those licensing issues for commercial apps on Windows.
i ate crayons when i was a kid and now i have two braincells and the blue ones taste nicer