Linked by Eugenia Loli on Tue 10th Aug 2004 07:24 UTC, submitted by adel
GTK+ PHP-GTK 1.0.1 is seeing the light of day. Vote for it here. Check in for the changelog.
Order by: Score:
What is the point?
by Akbar on Tue 10th Aug 2004 08:19 UTC

Choices are good. But is there any good reason to write client application using php???

RE: What is the point?
by Eugenia on Tue 10th Aug 2004 08:21 UTC

Obviously, the same good reason there is Perl-GTK. Some people prefer it and actually, many program with it.

I can see GTK in browser now?
by Ilyak on Tue 10th Aug 2004 08:30 UTC

PHP is for web scripts. I *can not* understand why one can want to program non-web with it??

It's like trying to saw using spoon...

Re:I can see GTK in browser now?
by verbat on Tue 10th Aug 2004 08:40 UTC

PHP is not so extremely tied with web apps as it used to be.

Obviously I'd never ever ever use a language where you don't have the chance to handle functions seriously and where the OOP is a joke for GUI programming ;)

Client Side PHP
by Motz on Tue 10th Aug 2004 09:07 UTC

To be honest, PHP's structure was not meant for client side applications. With the mentality of adding a new builtin function for every damn thing you want, it wouldn't last a year of serious uptake on the desktop before it collapsed under it's own weight.
What PHP needs for the client side is a complete fork with a module system like Python so that it "fits in your head", not another builtin function for everything.

Seems pretty useful to me.
by Devon on Tue 10th Aug 2004 10:17 UTC

Imagine this:

Your a web developer who setup a nice web app for the company website, and spent a ton of time at the task. Then the boss tells you they also want a stand alone version as well for certain key people or some special reason. Aren't you glad this is available now? Can be a hell of a work saver in many cases.

@ Motz
by Jason Lotito on Tue 10th Aug 2004 11:12 UTC

What PHP needs for the client side is a complete fork with a module system like Python so that it "fits in your head", not another builtin function for everything.

It's already there. You just don't compile PHP with any modules, and then load the modules as you need them. It's just like what a lot of Java apps I see doing; they ship the program with a Java binary included that is probably specially compiled for their program.

OSNews is nothing more than an advert for GnomeFiles...
by Anonymous Coward! on Tue 10th Aug 2004 12:20 UTC

OSNews has become nothing more than a giant advert for one of the editors pet project - GnomeFiles. Why does *every* post that mentions GTK in any way have to mention the blasted site?? Yes, we know, Gnomefiles exists, if you want to promote it more pay for for advert space like everyone else.

If I wanted adverts, I would read the thousands of email containing SPAM that I get each day...

Pah!

End Rant.

I'll stick with...
by poptart on Tue 10th Aug 2004 12:25 UTC

pygtk. Python is a far superior language for this realm.

RE: What is the point?
by Kick The Donkey on Tue 10th Aug 2004 12:27 UTC

Choices are good. But is there any good reason to write client application using php???

The fact that I know PHP like the back of my hand. Writing something in C, Python, or C# would take me much longer than with PHP.

That being said, I wish they could have taken the 'web mentality' with them into the client-gui world. Use some type of markup to define the gui layout, and wrap that with your PHP code for functionality. Programming a website if very straight forward. Do this->Go here->Do that->go there. Why should GUI programming be any different?

re: Why should GUI programming be any different?
by Dewd on Tue 10th Aug 2004 12:37 UTC

I agree that web programming is very straight-forward. One of my tasks is to develop a very straight-forward GUI library that will let me throw away my code if I wish. For that, I want a very dynamic language, that lets me alter even the language or add to it very easily, by using its extensibility to the most, for that I use Ruby. Now I need a cross-platform GUI library that is very good and free, for that I use GTK. Now I just need to develop my custom-sized library, which becomes very easy. GTK is amazing. I hope someone will create an easy library for PHP-GTK. ;)

v the point is..
by Spike on Tue 10th Aug 2004 12:39 UTC
Glade?
by Erwos on Tue 10th Aug 2004 12:53 UTC

"I wish they could have taken the 'web mentality' with them into the client-gui world."

This is basically what you can do with Glade. Load up the Glade XML file and define some functions using the language of your choice.

-Erwos

Why
by th on Tue 10th Aug 2004 13:32 UTC

PHP is for web scripts. I *can not* understand why one can want to program non-web with it??

I write PHP for my job so I can answer this one hopefully.

PHP along with Perl and other scripting languages is very fast to develop. Scripting languages are veery fast to develop, time-to-market is unbeatable to other languages.

PHP/GTK and Perl/GTK are very handy for example for small in-house projects. This is the real feed for them. And you can make them very integrated to your PHP-written intranet site for example too. That's the use for them: small, need-to-get-fast in-house apps.

For *large* apps, No Comments ;-)

The enemy of best is good
by Akbar on Tue 10th Aug 2004 13:44 UTC

The enemy of best is good. Providing support for many language including java-script, php, eiffel so that they can access gtk+ library to build client application is good. But the best effort is put all your energy to improve just primary language binding like C++, java, perl, python, and C# so GTK+ toolkit can compete with qt or something else. Php-gtk is good effort but not best effort to make GTK+ more popular. Remember energy and time is limited. This is just my private opinion.

v RE: The enemy of best is good
by Spike on Tue 10th Aug 2004 13:47 UTC
Without Strict Typing
by Anonymous on Tue 10th Aug 2004 13:52 UTC

It would be a nightmere to program in PHP for desktop (and even web) applications.

PHP is not a toy
by Bryan Feeney on Tue 10th Aug 2004 14:11 UTC

It is perfectly suited for small to medium size projects. If you want to create a database front-end for in-house projects, it's fine.

Being dynamically typed and having a comprehensive library it is possible to rapidly create small applications using PHP.

The time to develop costs a lot of money. For many organisations, PHP is a viable solution.

If you make your money programming, you eventually learn the benefits of using the right tool for the job. For a small application, for either the web or the desktop, I'd use PHP / PHP-GTK over Java any day. For a complex project, involving lots of tranactions with financial liability for failure, I'd use J2EE.

"PHP is a toy", "PHP is only for the web" etc. comments do no-one any good. Its main weakness, in my view, is a lack of language imposed structure, which makes it easier for programmers to create slightly schizo programs - but this is where project management and formal design come in.

RE: Without Strict Typing
by Kick The Donkey on Tue 10th Aug 2004 15:30 UTC

How so? Strict Typing makes the job of the programmer harder. Not easier. Let the compiler/interpretter sort out what type I need the variable to be. Why should I have to worry about it? The computer is much better at that type of accounting than I am.

How so? Strict Typing makes the job of the programmer harder. Not easier.

Your joking right! Let me give you a small example of a problem. Apparently you haven't been biten by the fact that if you think you have:

$var = 5;

but actually have

$var = "5";

and then do the following...

$var += 1;

your result will not be 6.

RE: Without Strict Typing
by Kick The Donkey on Tue 10th Aug 2004 15:50 UTC

your result will not be 6.

Try this in PHP, genius:

$i = 5;
echo $i . '<BR>';
$i++;
echo $i . '<BR>';

$j = '5';
echo $j . '<BR>';
$j++;
echo $j . '<BR>';

Looks like 6 to me...

RE: Without Strict Typing
by Kick The Donkey on Tue 10th Aug 2004 15:53 UTC

Sorry to double post, but I realize what I posted was not exactly what Mr. Anonymous cited... But, you know what? It still works!

I say again: try this, genius.

$i = 5;
echo $i . '<BR>';
$i +=1;
echo $i . '<BR>';

$j = "5";
echo $j . '<BR>';
$j +=1;
echo $j . '<BR>';

rebol
by netless on Tue 10th Aug 2004 22:18 UTC

recently I tried rebol and was impressed with simplicity and power. It took me no time to develop perfectly usable apps http://www.wsbears.com/charts.html
with full gui. Code is extra-small, plus rebol interpreter takes only 400kb. Compare that with other solutions. Recently they even created rebol plug-in for IE.