Compiled PHP? GUI?

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Compiled PHP? GUI?

Post by Eric! »

I've noticed a few tools are starting to emerge that allow you to compile PHP as a stand-alone programs. Since I like PHP more than most languages I've used in the past 30 years, I would love to see something like Netbeans Java GUI builder interfaced with PHP that could be run in a virtual engine (PRE?) or even cross-compiled. The GUI could handle the states/events and the underling php could do the work.

I write a lot of scripts that would be nice tools as a binary (even with no GUI) and while I wouldn't expect high speed performance, something portable without the need for installing php would make my code much more useful to people who don't want to install all the php and libraries and learn the CLI.
Last edited by Eric! on Tue Sep 06, 2011 8:25 am, edited 1 time in total.
jonesi
Forum Newbie
Posts: 8
Joined: Tue Aug 23, 2011 2:15 pm

Re: Compiled PHP? GUI?

Post by jonesi »

I don't get you.

Isn't HTML is the natural GUI for PHP? Aren't there WYSIWYG design tools for HTML? I don't use any though as I prefer to hand code the presentation layer pages to keep them simple.
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: Compiled PHP? GUI?

Post by Eric! »

No. I'm talking about moving php away from html mentality and into a gui environment like QT4 or gnome or something where you could use PHP as the language. Right now if I write a nice backend tool in php that I want to share with others I usually have to convert it to Java and add a gui to it so it is cross platform and executable and people can interface with it without running it from a command line and options.

Sure if you're using php as it was originally intended on a server then you're not interested and you don't need a gui, but php has grown much more powerful that I think it is time to be able to write cross platform aps with it with gui's. I know I would love it.

I mean anything that I write in python or java I could easily do in php, but there's no gui or cross platform environment for it.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Compiled PHP? GUI?

Post by Weirdan »

There's php-gtk (fairly stagnant project if you ask me) and I've seen recent announce of wxWidgets for php on these forums.
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: Compiled PHP? GUI?

Post by Eric! »

Thanks. The php-gtk is probably the closest thing to what I would use. It seems there is a lot of discussion about how the development tools for PHP are way behind others mostly because OOP wasn't really solidified until PHP5 making GUI's more realistic for php.

http://wxphp.org/ looks interesting too.
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: Compiled PHP? GUI?

Post by greyhoundcode »

Bit late seeing this post - but this is something that was interest to me a while back. As it happens, right now I am involved in some work that is utilizing PHP for desktop applications via Phalanger, which targets the .Net platform.

It's not 100% PHP as you know it, but it's an excellent effort and comes very close.

There are also some other projects that aim to compile to native code (rather than an intermediate bytecode, as is the case with Phalanger). Raven is one, but I'm not sure if it is quite up to speed yet.

Finally, I actually posted this link some time back but since it is appropriate to this thread I'll post it again. Paul Biggar on PHP compilers which is an interesting viewpoint with regards to the state of PHP compilers.
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Re: Compiled PHP? GUI?

Post by Mordred »

Oh god, why? PHP is not the best language for tool writing, nor desktop apps. In fact the best quality the language has is market penetration, which is the only thing keeping it alive for web development.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Compiled PHP? GUI?

Post by Weirdan »

Mordred wrote:Oh god, why?
Why not? PHP, as a language, is not that bad. Certainly not worse than VB.
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Re: Compiled PHP? GUI?

Post by Mordred »

Horrible and inconsistent API, cumbersome $syntax['around']=>'containers', the cool features are only in the latest 5.3 branch (finally first-class functions!). Sure, you *can* do everything you want, but it's not ... nice.
"Not worse than VB" is an argument of the "not worse than hammering nails in your arms" type :)
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Compiled PHP? GUI?

Post by Weirdan »

Mordred wrote:Horrible and inconsistent API
API is not a part of the language.
, cumbersome $syntax['around']=>'containers',
Pardon?
the cool features are only in the latest 5.3 branch (finally first-class functions!).
In the only supported branch, you mean?
Sure, you *can* do everything you want, but it's not ... nice.
I'd call that subjective, and to talk about niceness you have to compare something to something. So, what are you comparing PHP to?
"Not worse than VB" is an argument of the "not worse than hammering nails in your arms" type :)
Think of it in a different way: if there's a language worse than PHP why shouldn't PHP extend its functionality in a way that it would be possible to replace that inferior language?
Post Reply