Slashdot Mirror


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."

11 of 36 comments (clear)

  1. Slashdot by coyote4til7 · · Score: 4, Funny

    ... leading cheerleader for in-appropriate php apps

    --

    the clock on the wall says 4 til 7
    1. Re:Slashdot by JabberWokky · · Score: 3, Interesting
      Several of my CLI apps are now PHP. It is a good language for interfacing to databases and especially good at creating CLI tools to manage websites written in PHP. From there it was a natural jump to do things like manage my mp3 collection in PHP, a couple cron jobs and things like that.

      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
    2. Re:Slashdot by joeldg · · Score: 2, Interesting

      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.

    3. Re:Slashdot by turnin · · Score: 2, Insightful

      >in-appropriate php apps
      you are correct, BUT, the struggle for existence will force us to take many directions, independent of the appropriateness.
      The struggle here is to find a means to deliver apps on to multiple platforms(OSs).
      Existence of such a means are getting closed, due to *PURE* commercial interests.
      The developers are finding those means for their better life, appropriate or in-appropriate doesn't matter here.

  2. Embedding PHP scripts in an EXE by Guspaz · · Score: 4, Interesting

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

    1. Re:Embedding PHP scripts in an EXE by unixbum · · Score: 2, Informative
      "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)."
      So your saying this is basicly a self-extracting archive that executes when run? PriadoBlender (not for production use still in alpha) is a open-source php-compilier/packager that uses the cross-platform PHP Embed API and PECL's bompiler to package the whole shebang in to a execuatable, totally self included and modified to run without conflicts to existing PHP installations. There was a old program (non-opensource) PHPCompilier that did the same thing.
    2. Re:Embedding PHP scripts in an EXE by Guspaz · · Score: 2, Informative

      Pretty much, yeah, it's a glorified self-extracting archive. Of course, you can't acheive the same functionality with WinZIP or WinRAR, as they can't hide the PHP console for GUI apps, or pass command line parameters to the PHP script.

      I'm sure all those programs are vastly superior to mine; Mine was only a kludge designed to fill a specific need to which I could not find a usable solution.

      I should point out that my program, EncPHP, which was released under the LGPL, predates PriadoBlender by over a month; the oldest version in SourceForges archives, the second release, was timestamped "2003-08-07 21:00", with the first release having been finished several days/weeks before then :p

      Anyhow, PriadroBlender looks very promising (Certainly superior to my kludge!), and I'll be interested to see how it turns out.

  3. I want PHP-Qt dammit! by bergeron76 · · Score: 2

    What ever happened to PHP-Qt? I saw an implementation of it a few years ago, and it's since been stagnant...

    Anyone know what's up with that?

    --
    Don't think that a small group of dedicated individuals can't change the world. It's the only thing that ever has.
    1. Re:I want PHP-Qt dammit! by Crayon+Kid · · Score: 2, Interesting

      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
  4. Re:As a sometime PHP user, let me say... by lscoughlin · · Score: 2, Informative

    Or perhaps it's simply another language written by people who do not want to have the issues that perl has, and perhaps want a language that lends itself to knowing what you were doing 15 minutes after you started doing it.

    Go away perl fanboy, or come up with somethingbetter, after all TIMTOWTT (There Is More Then On Way To Troll).

    -T

    --
    Old truckers never die, they just get a new peterbilt
  5. Re:As a sometime PHP user, let me say... by CTachyon · · Score: 2, Informative

    Or perhaps it's simply another language written by people who do not want to have the issues that perl has, and perhaps want a language that lends itself to knowing what you were doing 15 minutes after you started doing it.

    Oh, come on. On what planet does it make sense to require e.g. generating SWF (Macromedia Flash) files to either be built in to the core language, or excluded altogether requiring a recompile to install that functionality?

    Is adding a use Module; line *really* that much harder for a newbie? He/She still needs to read the documentation anyway to figure out what the available function calls are.

    --
    Range Voting: preference intensity matters