PHP-GTK 1.0.1 is seeing the light of day.
Vote for it here. Check in for the changelog.What’s in this release:
Version 1.0.1 “you thought we were done?” 09-Aug-2004
– buildconf script now takes an optional –with-phpize=”path” option to specify the location of phpize script. (Andrei)
– removed support for old build system. PHP 4.3.x is now required to build PHP-GTK. (Andrei)
– implemented append_element(), prepend_element(),
insert_element(), append_item(), prepend_item(), and insert_item() methods of GtkToolbar class. (Andrei)
– exposed the following (read-only) GtkToolbar properties: (Andrei)
* style
* space_style
* space_size
* orientation
– reimplemented Gdk::cursor_new_from_pixmap() so it actually works. (Tom Rogers
Choices are good. But is there any good reason to write client application using php???
Obviously, the same good reason there is Perl-GTK. Some people prefer it and actually, many program with it.
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…
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
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.
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.
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 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.
pygtk. Python is a far superior language for this realm.
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?
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.
“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
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. 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.
It would be a nightmere to program in PHP for desktop (and even web) applications.
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.
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.
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…
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>’;
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.