Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Announcing PHP-GTK

michael posted more than 13 years ago | from the proving-grounds dept.

PHP 141

whyDNA? sends us this news bit: "I found this on the PHP page: The first release of PHP-GTK is now available. PHP-GTK is a PHP extension that provides an object-oriented interface to GTK+ toolkit and enables you to write client-side cross-platform GUI applications. For more information, visit gtk.php.net."

cancel ×

141 comments

Sorry! There are no comments related to the filter you selected.

Re:What's wrong with Java? (2)

Anonymous Coward | more than 13 years ago | (#389906)

I agree with your first comment. Outside of browser applets, my view on Java is: "what's the point?". Especially for server-side stuff...

But, PHP is interpreted, too. There's nothing necessarily wrong with interpreted languages, particularly for DB-based apps where the SQL engine and queries are the bottleneck. For small apps or for rapid development, interps allow for fast code-then-run loops. May not be an adequate method for kernel coding, but for gotta-be-done-yesterday business apps it makes a difference. Also, I believe both PHP and Java have caching products that will speed them up once development is over and you need more performance.

Of course, I believe the original poster misunderstood the point of the story... PHP-GTK is not intended to run in a web browser. This is intended for local apps using the php command-line interpreter to quickly create GUI apps, similar to Perl-Gtk, Python-Gtk, etc...

Re:Only Americans are stupid enough to use PHP. (1)

Synn (6288) | more than 13 years ago | (#389909)

Could that be because PHP is really just a 'toy' language.

With php I've developed two full-bore web application that were each 20-30k lines of code with about another 10-20k lines of support code. Php scaled extremely well for those apps and I've since passed the first 30k project off to another coder(who learned the language in a couple weeks). My apps are also the fastest things on the market, linux + php + mysql + apache just screams.

But then I also use perl, about 5k-10k worth of system level support code. I use perl's reg expressions to crunch data into my databases, to automate maintenance and push/pull information and files across multiple servers.

You can either sit around bemoaning how your language is the "best" language and code just in that, or you can use multiple languages, code to their strengths and go home from work early each day.

Re:Stay focused, PHP... (3)

Angst Badger (8636) | more than 13 years ago | (#389912)

One of the greatest things about PHP is that it is easy for people with little/no programming skills to pick up and create web applications. To push it to a full fledged language defeats the purpose, in my opinion.

It's called "room for growth". It's not a bad thing. Otherwise, all those people who learned PHP will discover that they wasted their time when they run into the limits of the language.

We try to push everything (languages, OS's, apps) to try to be everything to everyone. PHP is great for what it is. If you want to create a GUI, use something that was built for it the ground up for it.

Oh, piff! With the exception of Visual Basic and kindred proprietary RAD languages, there are no significant languages out there that were "designed from the ground up" for GUIs. (Java is arguable, but still...) I'm not even sure what it would mean for a language to be designed for GUIs, or how it would differ from any existing procedural or OO language. Make window a reserved word? Whatever.

The fact of the matter is that most GUI API's are grotesquely complex and present a steep learning curve for a beginner or someone who just wants to write a simple graphical frontend for a tool. Tcl/Tk has heretofore been the only exception worthy of note, but Tcl has its own host of problems including limited compatibility between versions and its DOS-batch-language-gone-wild syntax. Python is probably a better language (than PHP or Tcl), but PHP has the advantage of presenting a gentler learning curve for anyone who already knows C, minus all of the implicit syntax that makes Perl so difficult for newbies.

If you want to create an interactive database driven website (and you don't know perl) use PHP.

PHP is a lot easier to use than mod_perl or Mason for lightweight tasks. I use all of the above, and only use Perl when the situation is sufficiently complex to call for it. It's also a helluva lot easier to configure.

I hope this doesn't ever work itself into the main distribution of PHP... More bloat.

Consider learning to edit your makefiles if it ever does. A Gtk extension to PHP would only be appropriate to the standalone build, not the Apache module.

--

¹Better Java environment than MS's (1)

yerricde (125198) | more than 13 years ago | (#389914)

Now, I'm not supporting Microsoft on it, but I haven't seen a better implementation of Java support yet.

Not even Sun's J2SE? What about IBM's extremely fast recompiler? I guess you haven't seen them because you aren't looking.

"Like any trademark, Java is an adjective."
All your hallucinogen [pineight.com] are belong to us.

Cross-platform and other whines by moi (1)

Niscenus (267969) | more than 13 years ago | (#389916)

GTK has been written for Win32 systems, but, ironically, not for the older Macintosh systems. Since MacOS X is BSD, which, believe it or not, is Linux, GTK should work with few problems as is on the new MacOS X.
Furthermore, there are Windows libraries, mostly dynamic link, that will allow on-system support for the 9x series, and NT supports it from 2k^.
I mention that as I'll remind you, when you programme using GTK, or should that be if, the language formats available are for cross-platform. As there is primary C++ for ICE systems, or as you call them, *nix, there is Qt for Windows and Mac.
Now, personally, I like Java, but have you noticed how long it takes for Star Office or Netscape to load? And these are already in binary format. PHP, as it stands, takes slightly less time to do more complex things, and it's in run-interpretation non-compiled form. Now that it can be turned into machine code, I'm sure the limits on its power will disappear like the validity of your argument.
Now that that's out of the way, who's up for volleyball!?

¹Fixing the icon with free software (1)

yerricde (125198) | more than 13 years ago | (#389918)

It'd be possible to fix the icon with a GTK+-based (but not PHP) paint program called GIMP [gimp.org] . It even runs on Windows. [gimp.org]
All your hallucinogen [pineight.com] are belong to us.

HTML used to own PHP. (2)

yerricde (125198) | more than 13 years ago | (#389919)

What language used to own it?

In a sense, HTML used to "own" PHP just as it effectively owns EcmaScript [www.ecma.ch] . Go to OSDN SourceForge [sourceforge.net] and follow any of the Show Source links at the bottom of the pages.


All your hallucinogen [pineight.com] are belong to us.

Re:Cross platform, eh? (1)

Chandon Seldon (43083) | more than 13 years ago | (#389920)

It's a relitively well/cleanly designed modern GUI toolkit that is licenced under the LGPL, and supported by a zillion programming languages. There's nothing terribly wonderful about it, but it's the most-free GUI toolkit if you want your app to look/feel reasonably modern.

All of the other GUI toolkits avalible eithor A.) Are less free, B.) Are less modern, C.) Are less powerful, or D.) Are supported by less languages.

Taco, change that PHP icon.. (1)

Anonymous Coward | more than 13 years ago | (#389921)

That has got to be the yoogliest /. icon in the whole bunch!

What next? :-) (1)

Anonymous Coward | more than 13 years ago | (#389922)

I really didn't see that coming. PHP is really cool and, due to the existence of a binary executable, can be used for shell scripting. But a GTK-Binding for PHP is indeed a very nice idea. (Moderate down any troll that says it's bad; if they don't like it, they just shouldn't use it).

I'm thinking that in a short while we'll see bash bindings to GTK or something. :-)

Most of the posts here seem to have misunderstood! (5)

Jules Bean (27082) | more than 13 years ago | (#389923)

I'm pretty sure you're getting this totally wrong.

This is nothing to do with using PHP in web pages at all. In fact, it's nothing to do with web pages.

This about using PHP as a script interpreter, just like you use perl or python as a script interpreter.

So this certainly won't allow you to embed GTK applications in web pages: that would be neat, but would require a browser-plugin at the client end, and require the PHP code to be send to the client end. So the client would need the PHP interpreter.

It won't allow you to embed gtkhtml in IE, either ;-)

Jules

Re:Just what we need... (2)

Pfhreakaz0id (82141) | more than 13 years ago | (#389924)

well, disclaimer IANALP (I am not a Linux programmer). I'll tell you one use for it. Most of our C++ coders in our Microsoft shop use VB for playing around with a new library/version/whatever. They prototype functions in VB then bounce them to C++ later. Or maybe they decide that, performance isn't a key issue in this COM object (like it's dependent on database access or other disk access for speed) and can just as easily stay in VB without a performance penalty and hand off the object (usually with an interface defined) to one of the VB programmers like me :) Just thought I'd give you the view from the other side :)
---

Re:Man... what -can't- you do (1)

Anonymous Coward | more than 13 years ago | (#389925)

Well, you can write little apps and distribute them with 3 CDs - one for apache, one for php and one for mysql. Once all that is installed and mastered, you can "Click here!" to display the sqare root of 2, or something.

I'm the troll! (1)

Niscenus (267969) | more than 13 years ago | (#389928)

Cliff has marked me as troll, and by gum-golly if someone thinks they can just have that title on a silver platter.

Re:Hardly any details (1)

Chandon Seldon (43083) | more than 13 years ago | (#389929)

How's that?

A variable has:

A.) A known trustable value because you assigned to it yourself.

B.) A known trustable value because PHP automagically asigns something reliable to it.

or

C.) A known untrustworthy value, because it it could have been modified by the user.

I miss how this is any more problematic than say CGI.pm in perl.

I like it (1)

Niscenus (267969) | more than 13 years ago | (#389930)

And Rob didn't select it.
And, personally, I don't care much for the nut. The PHP icon is important. It means...well, it's just nifty, and I stole for use on another site, so :P

You're the previous AnonCow, aren't you? (2)

Niscenus (267969) | more than 13 years ago | (#389931)

If so, I already yelled at you. If not, well...FOOEY ON YOU!

Hey, here's a thought, why not run a "Make the Best Widgets for Slashdot" Campaign?
Winner enters the circle of advanced moderators, and gets Rob's autograph on any shirt from Think Geek.

Branching out (3)

AppyPappy (64817) | more than 13 years ago | (#389934)

Looks like PHP is looking to become a "real" language. Good to see. Our library folks wrote a time-card entry system using swipe cards with PHP and didn't know squat about the language when the wrote it. It's a great language for beginners and experts alike

Re:GTK ? (1)

Chandon Seldon (43083) | more than 13 years ago | (#389936)

GTK is a GUI toolkit for The X Window System (also ported to Win32 I believe). The homepage is gtk.org [gtk.org]

Enoch Root I presume? (1)

Niscenus (267969) | more than 13 years ago | (#389937)

We get the point, you don't need to keep posting.

.oO(Fluff for brains, I swear)

what about Basic-GTK? :) (1)

n00qx (315014) | more than 13 years ago | (#389939)

...or COBOL-GTK? Or .bat-GTK?

Re:Not really object oriented is it ? (2)

cyber-vandal (148830) | more than 13 years ago | (#389940)

What? Qt is the Trolltech widget set and is available under the GPL for non-commercial development. And what has OO got to do with the quality of the language? Somebody mod this down as -2 (Dumbass)

Re:Mozilla within IE (1)

Drone-X (148724) | more than 13 years ago | (#389941)

I'm not sure if gtkhtml was written from scratch or based on the KDE alternative but I'm pretty sure it isn't based on Gecko (the Mozilla engine). It's more meant as a lightweight alternative I believe.

Re:Man... what -can't- you do (2)

larien (5608) | more than 13 years ago | (#389942)

My personal preference is for PostgreSQL, but that's more because it's what I used first (no, I don't want a flamewar between mysql/PostgreSQL/whatever; it's been done to death already).

However, there's still a lot you can do very easily with PHP and a DB backend, whether it's Oracle, PostgreSQL or MySQL. We've got stuff like a web-based coursework submissions system I hacked together using PHP and Postgres. PHP is a damn good language and very easy to learn if you've had any exposure to perl; a lot of the syntax and usage is similar, even easier under PHP.
--

PHPs cool and free PHP IDE (1)

bleeeeck (190906) | more than 13 years ago | (#389943)

Great post Ananova.

I just started using PHP in January. It was easy to learn and does lots of stuff. I used a small PHP script to change a 50,000 row database from fixed width columns to tab deliminated (so I could import it into mySQL (I couldn't find a way to import it straight into mySQL), then used PHP to output the data from the database to the web pages.

I found a free PHP IDE at PHPEd [soysal.com] . It only runs on Windows, has syntax highlighting, and lets you run and debug the programs you're writing right in the editor. I like it pretty much.

Funny, I know more European PHP users than US... (2)

Cardinal (311) | more than 13 years ago | (#389946)

Only Americans are stupid enough to use PHP, eh? That's funny, I know more European PHP users than American ones. Not to mention how many members of the PHP Group are European.

And [php-kongress.de] then [phpwizard.net] of [kill-9.dk] course [phpfacile.com] , there's [phpfrance.com] the [php-resource.de] proliferation [troebsfamily.de] of [ilovephp.com] PHP [phpinfo.net] sites [phpindex.com] in [phpwelt.de] Europe [php-center.de] .

Why this is a good thing. (1)

Rippman (259681) | more than 13 years ago | (#389949)

I'm a 17 year old student. I used to be fairly afraid of programming. But PHP is simple enough for a programmer to get good at. Once I learned PHP well enough, and became comfortable with it, I viewed programming in a new light. And with this GTK extension, there is little you can't do with PHP. I like it.

Re:Mozilla within IE (1)

ksheff (2406) | more than 13 years ago | (#389950)

Didn't someone create a DCOM/ActiveX/whatever Gecko component? If so, couldn't a person have IE use that for displaying HTML instead of it's original component?

Re:Stay focused, PHP... (2)

Andrey (8819) | more than 13 years ago | (#389951)

It will not make it into the main PHP distribution. That's why I set it up as a separate CVS module and with a separate webpage and release schedule.

Re:Only Americans are stupid enough to use PHP. (1)

jdaily (35368) | more than 13 years ago | (#389952)

Strongly-typed Pearl [uni-hannover.de] for your edification.

Re:Branching out (1)

seann (307009) | more than 13 years ago | (#389953)

I made a object class in PHP for console interaction on UNIX type systems, it could get /dev/stdin stdout, parse it and you could have input and output! I was working on having it recoize the mouse, but I lost interest. it was a fun project, some of it is still on www.phpbuilder.net

Germans too! (1)

maybelline (153054) | more than 13 years ago | (#389954)

PHP Coder [phpide.de] is an PHP IDE written for Microsoft platforms by a German High School student. Of course, he does state that he spent a year in the United States ...

Re:Just what we need... (1)

seann (307009) | more than 13 years ago | (#389955)

vb2c check it out, it's kinda nifty *search your local www.freshmeat.net repository*

As an aside... (1)

Enoch Root (57473) | more than 13 years ago | (#389956)

...the PHP Slashdot logo is damn ugly, and looks like a brand tag you'd find on clothes made by 6 year-old Malaysians.

Re:Only Americans are stupid enough to use PHP. (2)

green pizza (159161) | more than 13 years ago | (#389957)

Perhaps if you don't consider the performance hit. From all of the figures I've seen, PHP is much faster than perl. Especially on websites. Mod_Perl does speed things up by a HUGE margin, but unfortunatly my company does not allow webservers other than Netscape/iPlanet Enterprise... so we must run our perl script CGIs the old fashioned slow way. If you know of any way around this, it would be of help! We do like perl!

Re:Only Americans are stupid enough to use PHP. (1)

vidarh (309115) | more than 13 years ago | (#389958)

What a troll. It would help if you'd at least spell Perl correctly. And I know of lots of PHP users in Europe. In fact, I'd never ever consider allowing anyone to use Perl for serious web development on projects I'm responsibility for, but PHP would be another matter.

However choosing either language depends on what experience you have available in your organization, and on personal preference much more than on the languages themselves.

And the main reason it might be easier to get Perl developers is because Perl is much older. PHP, on the other hand, is catching up fast.

And to many C/C++ developers like me, PHP is a lot more familiar and easy to learn, and a lot less irritating, than Perl.

change the SGI logo (1)

green pizza (159161) | more than 13 years ago | (#389959)

And while you're at it, replace the Silicon Graphics cube logo with the new "sgi" logo. Sure, the cube logo was cooler, but it's long gone these days.

Dork (1)

codepunk (167897) | more than 13 years ago | (#389960)

Yes that is what I want to do use perl, my god man it just lends it self to such nice readability. Yea Right!

Yikes (1)

mholve (1101) | more than 13 years ago | (#389961)

Talk about trying to go for too much. Do we need another language? Sure, if it fills a need. Should we make PHP into it's own language? I think that'd be overkill, adding complexity and fluff where none is needed...

Re:Only Americans are stupid enough to use PHP. (1)

Lord Hugh Toppingham (319381) | more than 13 years ago | (#389962)

If you know of any way around this, it would be of help!

Your company does not allow ??? What kind of anti-technical BS is this ? Surely your company is interested in the most cost-effective appropriate solution for the job. Unless you work for one of those huge corporations that requires 'standards' above all else, even at the expense of profitability.

The best thing to do here (Apart from changing jobs) is to simply bypass the stupidity. Set up apache on a separate machine. Have the 'front door' running on netscape, but redirect to the performant solution on apache with mod_perl at the earliest opportunity.

I had the misfortune to work for a place that banned mod_perl. Unfortunately, they 'just didn't get it' (tm) so I had to take my services elsewhere. Remember, its a sellers market for tech skills, even now after the dotcom slump...

Re:Mozilla within IE (1)

MonkeyMagic (118319) | more than 13 years ago | (#389963)

One interesting thing you could do would be to use the gtkhtml widget which I believe is based on mozilla.Thus you could open a mozilla browser from within IE.

No you couldn't. This is about using PHP to control a GTK application front end (all on the one machine), it has nothing to do with website features.


DILBERT: But what about my poem?

Re:Mozilla within IE (1)

Nodatadj (28279) | more than 13 years ago | (#389964)

Yeah, thats why all the copyright notices don't meantion KDE...

This is just wrong though... (4)

Ron Harwood (136613) | more than 13 years ago | (#389965)

Don't get me wrong, I love PHP - I wrote "BlackNova Traders [blacknova.net] " using PHP and MySQL... and the language rocks for web programming... but that was its intended use.

I don't want to see PHP lose its focus and purpose - it isn't a general use language... if you want one, there are plenty (C/C++, perl, and even java for example). PHP is meant for dynamic kick-ass web-page creation.

Clearly a troll, but what the heck.... (1)

JiveDonut (135491) | more than 13 years ago | (#389970)

Perl's strong typing? Bwahahaha!

Stay focused, PHP... (3)

gyp (312559) | more than 13 years ago | (#389971)

One of the greatest things about PHP is that it is easy for people with little/no programming skills to pick up and create web applications. To push it to a full fledged language defeats the purpose, in my opinion.

We try to push everything (languages, OS's, apps) to try to be everything to everyone. PHP is great for what it is. If you want to create a GUI, use something that was built for it the ground up for it. If you want to create an interactive database driven website (and you don't know perl) use PHP.

I hope this doesn't ever work itself into the main distribution of PHP... More bloat. My webserver doesn't like it already...

Gyp.

Re:change the SGI logo (1)

fitsy (22336) | more than 13 years ago | (#389972)


No way, the original SGI logo -is- way kewler.

Re:Hardly any details (1)

hey (83763) | more than 13 years ago | (#389973)

Hello, R Ford [tulane.edu] .

Re:Yikes (2)

Fervent (178271) | more than 13 years ago | (#389974)

"An icon so bold, so blatantly thrown together at the last minute that you have to wonder, 'What was Taco thinking when he put this together?'"

Not exactly a strong testament to Gimp (although it's more the artist's fault).

Re:Cross platform, eh? (2)

Tet (2721) | more than 13 years ago | (#389975)

C'mon.. GTK+ is cool and all for being a nice cross platform (well, at least cross-*nix), but Java is a nice tool thats already there for the major browsers.

I'm reasonably sure you're looking at this all wrong. I don't think this is related to web browsing at all. I think it's just a means of letting you use GTK+ from *any* PHP script. That would place it in the same class as dtksh, tcl/tk, tkperl, or tkpython.

Re:Branching out (1)

Betcour (50623) | more than 13 years ago | (#389976)

What's wrong with PHP ? It is not the best designed language around but I've seen worse (like C++ ;)

FastCGI (2)

hatless (8275) | more than 13 years ago | (#389977)

Uh, there was a commercial FastCGI module available for the Netscape servers. Does the same thing most people use mod_perl for: it allows slightly-modified CGI code to be compiled and cached by a persistent Perl interpreter.

The only problem is that it was sold to another company, which was in turn acquired, and it was taken off the market. You may want to contact Adero [adero.com] to see if they'd be so kind as to point you in the right direction.

If you're running the Netscape/iPlanet webserver on NT or Win2K, you can also use ActiveState's PerlEx, which is another similar persistent-Perl engine.

There also appears to be a reasonably modern Perl NSAPI module, which is philosophically the closest thing to mod_perl in that it lets you get close to the metal and write true server modules in Perl. It's here. [canoe.ca]

Velocigen [velocigen.com] , another commercial product, isn't exclusively a Perl engine. It's a logic and content caching engine that uses XML tags that can hook to cached and embedded code--including Perl. It's probably a different development experience from these other systems, but if persistent Perl is your goal, this should do it too.

Ever tried searching the Web?

Re:Stay focused, PHP... (1)

mansemat (65131) | more than 13 years ago | (#389978)

Fist you say use something that was built from the ground for [GUI development], then you say: If you want to create an interactive database driven website (and you don't know perl) use PHP. .

If I recall, PERL was *not* built from the ground up for creating interactive database-driven web sites. PHP was. Perl was no built from the ground up to even support Databases, hence Perl::DBI.

Re:Hardly any details (1)

Lord Puppet (300347) | more than 13 years ago | (#389979)

Mailing list: http://www.topica.com/lists/php Scripts: http://www.evilwalrus.com/ More info: http://www.oreillynet.com/php/ http://www.onlamp.com/ Book (with reviews): http://phpclasses.UpperDesign.com/products.html/id /1861002963

Re:Hardly any details (1)

jonbrewer (11894) | more than 13 years ago | (#389980)

gee. it's like ColdFusion but without the IDE. :-)

Re:Only Americans are stupid enough to use PHP. (1)

c+era (102193) | more than 13 years ago | (#389989)

Do a search for nsapi and perl. I haven't used netscape/iPlanet for a while, but it worked then and should work now.

You may also want to look at fast-cgi, it isn't free, but it does work.

Re:Not really object oriented is it ? (2)

mindstrm (20013) | more than 13 years ago | (#389990)

How can something be availableu nder the GPL for non-commercial development. the GPL forbids such restrictions.

watch your language! (2)

fons (190526) | more than 13 years ago | (#389991)

I can't code Perl nor PHP, but I DO now that there's no need te start insulting people over this.

And if you do want to start insulting, please only speak for yourself. I'm European and I don't want American PHP coders to think I find them stupid.

(I could go on and on about how the Internet should be international and free from any regional prejudices, but i won't, i'm pretty sure everybody but you gets that)

GUI Programs (1)

mholve (1101) | more than 13 years ago | (#389992)

Writing GUI apps in a primarily non-event driven language is a PITA. Look at Perl/Tk for example. Yeah, it works. Would I want to write applications in it? No...

I wrote TkApache [eunuchs.org] in Perl/Tk. It works and works well, but it's just not the way to go about coding GUI apps. Perl is not meant to write event-driven applications such as this. What it is good for is giving scripts a quick interface for variables or input.

I don't think PHP needs to incorporate this technology into itself. It's great for what it does - dynamically driven sites. Leave it at that and leave the bloat out.

Before you troll... (1)

TobyWong (168498) | more than 13 years ago | (#389993)

...at least learn how to spell the technologies you are trolling about.

"perl"

If you ever feel like hanging up your trolling underpants and doing something productive, check out www.perl.com [perl.com] for more info.

hah it's like that old SNL sketch where the actor goes on about how he takes his roles very seriously and does a lot of research, then when they show a clip of him in action as a doctor he badly mispronounces all the medical terms.

Re:Man... what -can't- you do (1)

Betcour (50623) | more than 13 years ago | (#389994)

I think it is easier to install your app on a single server and let the world use it with any browser. No deployment, no configuration, no upgrades to distribute, totally cross-platform, etc... I love this :)

Re:Hardly any details (5)

LetterJ (3524) | more than 13 years ago | (#389995)

I'm the author of PHPTriad and would like to point out that I've got a testing version of PHPTriad 2.0 available which I consider much more stable and complete than the version that download.com is pointing to. It's linked from a news story on www.phpgeek.com [phpgeek.com] .

LetterJ
Head Geek

Re:Man... what -can't- you do (1)

tzanger (1575) | more than 13 years ago | (#389996)

I too prefer Postgres but I've given up on PHP; I do all my scripting in Perl now. I'd been looking for arguments to keep my PHP skills up but haven't found anything besides "just to know another language" so I dropped it. Perl just works for me... Heaven forbid if I were an actual Perl zealot. :-)

Mind you, for any real work I turn to C. Interpreted languages are great for quick hacks but when performance is key you need compiled code. Maybe that's just my embedded background talking though. :-)

Re:Not really object oriented is it ? (2)

AugstWest (79042) | more than 13 years ago | (#389997)

you got the wrong guy.

Hardly any details (1)

ishrat (235467) | more than 13 years ago | (#389998)

I know Html very well and am a web designer, but I do not know what PHP is all about. Can someone suggest a suitable address for info on PHP for a beginner.

Re:Hardly any details (2)

Betcour (50623) | more than 13 years ago | (#389999)

www.php.net

and you can look at www.phpbuilder.com too for tutorials

Re:Hardly any details (1)

Anonymous Coward | more than 13 years ago | (#390002)

http://www.phpbuilder.com or you take take the online class I teach at Tulane University.

Re:Hardly any details (2)

ickyfreak (181280) | more than 13 years ago | (#390004)

www.php.net (and download the manual... its my bible)

also www.devshed.com :)

Re:Yikes (2)

1010011010 (53039) | more than 13 years ago | (#390009)

... an icon so completely just copied off the PHP page...

- - - - -

Re:Yikes (2)

jfunk (33224) | more than 13 years ago | (#390010)

Should we make PHP into it's own language?


What do you mean? What language used to own it? I don't understand...

I'm a PHP guy, though I've been preferring Python lately. I still really like PHP.

Re:Taco, change that PHP icon.. (2)

fons (190526) | more than 13 years ago | (#390011)

Use this one [rug.ac.be] . It's the same as the one you're useing but anti-aliased especially for you.

Re:Cross platform, eh? (2)

AugstWest (79042) | more than 13 years ago | (#390012)

how is this a troll? someone compares java to php, i point out the stengths versus weaknesses, and BAM it's a troll.

no, only english... (1)

simpl3x (238301) | more than 13 years ago | (#390013)

with that and mcdonald's, we'll be just fine.

Re:Stay focused, PHP... (2)

jfunk (33224) | more than 13 years ago | (#390014)

If you want to create an interactive database driven website (and you don't know perl) use PHP.


Wow, methinks we have a troll here.

For the record, I know Perl and PHP.

If you want to do a large project, using an OOP implementation that isn't fscked and a language that is actually readable, use PHP.

Actually, it's Perl that didn't stay focused. It was meant for more powerful shell scripts. Now people are writing web sites, email clients, MAME frontends, etc...

PHP originally was meant for web sites, but it was designed to be C-like for a reason. I, the other day, was wondering why nobody had written bindings.

Re:Only Americans are stupid enough to use PHP. (2)

istartedi (132515) | more than 13 years ago | (#390015)

Pearl would be much better suited for this type of application, due to its strong typing and oo-features.

I didn't know there was a strongly typed language called Pearl. Is it anything like the weakly typed language called Perl?

Re:AAAAHHhhhhhh.... (2)

Mike Hicks (244) | more than 13 years ago | (#390016)

Those words are computer jargon, but I wouldn't call them buzzwords.
--

Re:Not really object oriented is it ? (2)

JabberWokky (19442) | more than 13 years ago | (#390017)

How can something be availableu nder the GPL for non-commercial development. the GPL forbids such restrictions.

Qt, like many other very common packages like Ghostscript[1] is available under two licenses. The Qt code is identical, but the GPL version can only be used to develop GPLed applications (duh, that's the point of the GPL). The QPL version gives you the source without the restrictions of the GPL, so people can write Windows, Mac or Linux apps that can be distributed under their choice of license (including traditional commercial licenses).

So, yes it is dual licensed, GPL for Free Software purists, and QPL for Open Source purists. I really can't think of another company that has gone to greater lengths to satisfy the community and has gotten a worse rep for licenses.

[1] Of course, Ghostview releases the source under GPL a few versions behind the commerically available version. Qt's source is up to date on both sides of the license.

--
Evan

Re:Cold Fusion without the IDE. (1)

bobv-pillars-net (97943) | more than 13 years ago | (#390018)

I've used both Cold Fusion and PHP. There are many differences between the two:
  1. In PHP it is possible to store more than one function per file. It is not possible to store more than one Cold Fusion "custom tag" per file.
  2. In PHP you can access Oracle, MS-SQL, Postgres, and MySQL with equal ease. Cold Fusion is designed mainly to interface with MS-SQL.
  3. PHP can be integrated into Apache or IIS, but it is also small enough to be launched as a script interpreter. Cold Fusion runs as a server-side process, and tends to bog down a Pentium-3 550 with 256 meg of ram.
  4. PHP is free software; Cold Fusion is not.
  5. PHP is available for a much wider variety of hardware and operating systems, and may be ported to others if it's worth your time. Cold Fusion is only available from Allaire; if they go under or don't want to develop for your system, you're out of luck.
  6. PHP has had a slightly better track record of being upwardly compatible through version changes.
Both languages have an IDE [zend.com] available, but I haven't used either one.

Re:Yikes (1)

bare_naked_linux (306356) | more than 13 years ago | (#390019)

Well, they've done it on there own time to fill their own need (or ego). Why should I or you care if it 'needed' to be done. Many other languages that are used main-stream now got their start this way... They filled a nitch market, were good at it, and their market expanded.

If this is a good thing, it'll stick around and get better and better. If it's not needed, it'll be swollowed in the sands of time.

Myself, I'm rooting for them. It's another tool in my tool box. I may not ever need it, but if I do, it's there.

--

Re:Cross platform, eh? (3)

AugstWest (79042) | more than 13 years ago | (#390020)

Have you ever written a GUI in Java? Swing is still a horrible pile of crap.

The GTK toolkit for Windows is rather stable in my experience. I've used it with an IDE and for some MySQL tools on nt4 and 2000. It isn't yet used very often, but that doesn't mean that a) it doesn't exist or b) it isn't stable.

I think this is great news. I've been dealing with signed Java applets for years now, and they're a needlessly difficult thing.

Just what we need... (1)

b0z (191086) | more than 13 years ago | (#390021)

A Visual Basic for linux.

I say that with sarcasm, but I guess it could be useful. I know VB is useful to a lot of people that just want to make small programs and don't want to deal with coding all kinds of crap in C++ or anything.

- Mirror - (3)

Diclophis (203740) | more than 13 years ago | (#390022)

Well since its php related, I setup a mirror incase of any slashdot like effect. This seems really useful. the mirror is locate here:http://dev.sig.mine.nu/~jbardin/php-gtk-0.0.1 .tar.gz [sig.mine.nu] . I hope this helps.


behold the power of SiG [sig.mine.nu] .

Re:Cross platform, eh? (1)

ickyfreak (181280) | more than 13 years ago | (#390023)

ummm... can someone PLEASE tell me whats so good about GTK+????

Re:Cross platform, eh? (1)

bildstorm (129924) | more than 13 years ago | (#390024)

The problem I have with Java is those "dot in .com" people...

I mean, aside from creating horrible ads that I end up seeing every weekend on CNN International, they also haven't helped companies to develope great browser support for Java, and then, when Microsoft did have good support (plus their own tweaks), they went after them.

Now, I'm not supporting Microsoft on it, but I haven't seen a better implementation of Java support yet.

Re:Not really object oriented is it ? (3)

AugstWest (79042) | more than 13 years ago | (#390025)

Yeah, seriously, I mean... this license ISN'T THE GPL. Somebody get a rope. [/sarcasm]

Why is OO the holy grail? Why does everything have to be done by the GPL? Why must everything that comes out fit into the little box that you find acceptable?

Re:Not really object oriented is it ? (1)

sfraggle (212671) | more than 13 years ago | (#390026)

Qt is the trolltech toolkit, not gtk. In any case I believe that it is released under the GPL now (correct me if i'm wrong)

Re:Cross platform, eh? (1)

Salsaman (141471) | more than 13 years ago | (#390027)

Yeah but java, much as I love it for server side apps., has a visually very poor set of gui components.

Also it's not always suitable for client side apps. If you just want to pop up a couple of windows with a menu gtk+ would be a much better option. Plus you have all the inbuilt skinnability of gtk.

Re:Hardly any details (1)

bad-badtz-maru (119524) | more than 13 years ago | (#390031)

===
It's convenient - all form variables get put into variables of the same name:
===

Autovivification of form variables is indeed quite convenient... for writing exploitable scripts.

maru

Re:Cross platform, eh? (1)

Bob[Bob] (60151) | more than 13 years ago | (#390032)

You might not be rated as a troll if perhaps you explained a little bit about why you think "Swing is still a horrible pile of crap"... so?

GTK ? (1)

enrico_suave (179651) | more than 13 years ago | (#390033)

I'm familiar w/PHP .. what's the down low on GTK? What are the requirements/benefits/uses? Thanks in advance (for not being snide) e.
www.randomdrivel.com [randomdrivel.com] -- All that is NOT fit to link to

PHP shell scripts are great (2)

phutureboy (70690) | more than 13 years ago | (#390036)

There are times when a dynamic web site needs to do stuff in the background, or on a regular schedule, or without worrying about a browser timeout, independent of whether the site is being accessed.

For example, on an auction site you might want to have a script that runs once every minute to close out auctions that just ended, and email announcements to the seller and highest bidder.

Or you might want to update the weather forecast on your home page every hour by downloading a page from National Weather Service, parsing it, and inserting the info into a database.

Running PHP shell scripts from cron is great for that sort of thing. It allows one to develop the whole site in the same language, instead of switching to Perl or bash for the background stuff.

Not that any of this has anything to do with PHP-GTK...

--

there's no bloat (2)

rm -rf /etc/* (20237) | more than 13 years ago | (#390037)

Go to your php source directory. Do ls ext/. Look at all of it and think, "Gee, look at all these extensions which I can choose to compile into my php binary, leave out alltogether, or build as shared modules." PHP will never be any more bloated than you want it to be because almost everything outside of the core language and server interfaces are modules.

read the page (2)

rm -rf /etc/* (20237) | more than 13 years ago | (#390038)


It's not incorperated, it's an add on dynamically loaded module. Geez, it's a simple concept really... And even if the php folks rolled it into the dev tree, as long as you don't compile with --enable-gtk, who the hell cares if it's there or not? It won't affect your server, you can just pretend it doesn't exist.

license wars (3)

bobv-pillars-net (97943) | more than 13 years ago | (#390039)

According to Gnu, [gnu.org] the license [php.net] for PHP Version 4 [php.net] is not GPL-compatible [gnu.org] because it includes a BSD-like advertising clause [gnu.org] . For this reason, GNU recommends that free software developers write for PHP version 3 [php.net] instead, because it is also licensed under the GPL [gnu.org] .

Apparently, PHP-GTK [php.net] gets by with linking to version 4 because GTK [gtk.org] is released under the LGPL. [gnu.org]

I'm surprised Richard Stallman [stallman.org] hasn't released a blistering condemnation of the project yet.

Re:Branching out (2)

irony nazi (197301) | more than 13 years ago | (#390040)

It looks like GTK is becoming a "real" widget set. Good to see. Out GUI folks wrote a time-card entry system using drop-down menus with GTK and didn't know squat about the widgets that they used. It's a great library for beginners and experts alike.

I only wished that we had a way to use PHP with these GTK widgets... oh... nevermind.

AAAAHHhhhhhh.... (1)

OlympicSponsor (236309) | more than 13 years ago | (#390041)

"PHP-GTK is a PHP(1) extension(2) that provides an object-oriented(3) interface(4) to GTK+(5) toolkit(6) and enables you to write client-side(7) cross-platform(8) GUI(9) applications."

Must...resist...buzzwords... ...can't...keep...brain...from...exploding
--
Non-meta-modded "Overrated" mods are killing Slashdot

Man... what -can't- you do (1)

green pizza (159161) | more than 13 years ago | (#390042)

with php, mysql, and some spare time...

Mozilla within IE (2)

Salsaman (141471) | more than 13 years ago | (#390043)

One interesting thing you could do would be to use the gtkhtml widget which I believe is based on mozilla.

Thus you could open a mozilla browser from within IE.

Re:Hardly any details (3)

Ananova (255600) | more than 13 years ago | (#390044)

Sure.

www.php.net/manual [php.net] . The manual is great. You can learn everything you need to know about specific things from there. Before that, you need a basic tutorial.

A PHP page looks like this:

<html>
<title>Hello</title>
<form action=<?php print $PHP_SELF; ?>
<input name=message>
<input type=submit>
</form>
<?php
print $message;
?>

Try that. Also, to get hold of PHP, use PHP Triad [cnet.com] (on Linux, you can probably install it from your distribution CD), a win32 installer of PHP, Apache and MySQL.

Basically:

PHP is HTML with the code embedded between blocks starting
<?php

and ending
?>

within that you put your PHP code.

For example:

<?php
print "hello";
?>
would display hello - just like perl.

Similarly, as in Perl, variables are preceded by $.

So:

<?php
$message="chese";
print "I like $message";
?>

It's convenient - all form variables get put into variables of the same name:

<form action=apage.php>
<input name=thing>
<input type=submit name=action value=Submit>
</form>

would send apage.php two variables - $action='Submit'; and $thing= whatever you typed in there.

You should investigate PHP's object-orientation functions too. Here's an example class [class omitted due to slashdot's lameness filter :-(], which should be pretty explanatory.

Anyway, start here [php.net] ; read here [phpbuilder.com] for more, as well as here [zend.com] . Also subscribe to the mailing list at php-general@lists.php.net for help from others.
--

he he he (1)

mirko (198274) | more than 13 years ago | (#390045)

Seems they didn't have enough time to draw a proper con for this topic ;-)
--

Re:Cross platform, eh? (1)

Anonymous Coward | more than 13 years ago | (#390046)

GNU/Absofuckinglutelynothing
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?