Click to See Complete Forum and Search --> : PHP: Programming or Scripting ?
khendar
04-03-2006, 04:13 AM
I thought I posted this before but its gone miraculously missing. Lets see if it gets removed again.
I've seen much debate on forums and news sites about PHP's status as a programming language. Most non-PHP developers bag PHP for being a mere scripting language. And yet thousands of PHP developers out there would likely disagree.
PHP's come a long way since its days as a tool for measuring webpage traffic. Tons of advanced, complete, online and offline applications being developed in PHP seem to indicated that its evolved into a fully fledged programming language, and with the further object oriented functionality built into PHP5 this status seems sealed.
So what are your opinions (Probably preaching to the converted here, but anyway)
Scripting language or Programming language ?
MarkR
04-03-2006, 05:21 AM
What's the difference anyway? They're only words.
Anything is proper programming, if done right. It is true that a lot of the mindset of *some* PHP developers, is that PHP is for making little throw-away "scripts" which are often copied & pasted without any thought, and have no dependencies.
But this is not the right way of using PHP, and I refer to a PHP application as a PHP "application". Just because it's written in PHP doesn't mean it's not a proper application which has its own requirements for maintenance, documentation and setup etc.
Clearly these days with the likes of AJAX, XUL, etc, the distinction between a desktop app and a web app are being blurred a lot. I could write a XUL app with a PHP backend and distribute it to desktop clients, and they would not know it wasn't written in a native-compiled language.
Mark
bubblenut
04-03-2006, 06:32 AM
The two are not mutually exclusive. PHP is a scripted programming language.
Weedpacket
04-03-2006, 06:54 AM
The distinction was dreamed up by ... um... forget his name right now ... invented tcl.... anyway, making some silly little technical distinction that doesn't seem to be worth worrying about. I certainly don't see what the point of making the distinction is supposed to be.
laserlight
04-03-2006, 09:12 AM
Well, php.net introduces PHP as "a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML". We often talk about PHP scripts rather than PHP programs.
On that note, I would describe PHP as a scripting language, but only to be consistent with its official description. I think that any rules to distinguish between a 'scripting language' and a 'programming language' is bound to be arbitrary and contain loopholes somewhere, since we deal with a continuum of languages and language features.
The distinction was dreamed up by ... um... forget his name right now ... invented tcl....
John Ousterhout, as in Ousterhout's dichotomy?
Jason Batten
04-03-2006, 10:46 AM
The distinction was dreamed up by ... um... forget his name right now ... invented tcl.... anyway, making some silly little technical distinction that doesn't seem to be worth worrying about. I certainly don't see what the point of making the distinction is supposed to be.
I disagree. It's needed to explain the differences to some people. e.g. clients.
Weedpacket
04-03-2006, 11:01 AM
John Ousterhout, as in Ousterhout's dichotomy?Yup, that's the guy.
laserlight
04-03-2006, 11:24 AM
It's needed to explain the differences to some people. e.g. clients.
Unfortunately even agreeing on what the differences are in the first place is a problem. How can we explain to clients what we dont quite agree on in the first place, unless we explain so much that it becomes useless to have the differences encapsulated in two terms?
Or, we only give our opinion, and the client gets confused when another developer provides another opinion.
EDIT:
Just noticed...
Jason Batten
forever learning...
Jason Batten's Avatar
Join Date: Mar 2005
Location: Perth, Australia
Posts: 666
run!!! :)
Jason Batten
04-03-2006, 12:03 PM
I take back what I said before.
You should never be explaining that stuff to clients. Why would you be? lol
Let me think of a more worthy reply... *puts on his horns :evilgrin: & has a think
dream.scape
04-03-2006, 03:35 PM
why would you talk to your clients in techno babble anyways? You talk to them in ways they can understand; usually this means business babble. Unless you client is a programmer or tech geek, there really isn't much point in speaking a foreign language to them.
Jason Batten
04-03-2006, 10:06 PM
Exactly, hence my "taking back" of the comment.
Although it depends on your clients. E.g. My primary client is not the average "Joe Shmoe".
For some reason, some people tend to see "scripting language" as a degrading term. I don't see it that way, just as a definition of the languages "limitations"?
I wish to back down and away from this topic before someone with more programming knowledge and experience kicks my arse *runs away flailing his arms in the air*
khendar
04-03-2006, 10:15 PM
I think someone needs to explain all this to the ASP/JSP/C++/C# etc programmers who see PHP as a "lesser" language. Just take a look at any PHP story on slashdot for evidence (mind you - everything on slashdot is like this. That site brings out the worst in fanboyism. Fanboys of any persuasion make me sick).
As with anything, PHP is just a tool. I've seen poorly written systems in all languages. The quality of a system is down to the skills of the programmer (at least thats what I tell the boss when trying to justify another pay rise :P)
Doug G
04-04-2006, 01:53 AM
I think someone needs to explain all this to the ASP/JSP/C++/C# etc programmers who see PHP as a "lesser" language
Don't worry, even paranoids sometime have "real" enemies :)
I am primarily a windows programmer, and I hate to tell you, there is little to no "anti-php" noise in any windows developer forums. Extremely vocal advocacy is much more prevalent in the OS world.
I do both worlds, and I like PHP and I like ASP and I like VB. They are all pretty good tools to get stuff done.
thorpe
04-04-2006, 11:21 AM
Just to be clear. ASP is not a language, it is a framework used by scripting languages (vbscript, jscript, python) to build web applications. ASP.NET is also a framework not a language, supporting the C#, and VB.NET languages.
Bit of subject but pff.
Sxooter
04-04-2006, 07:35 PM
And now I think .net supports real languages, like PHP! haha, just kidding (about the real languages part, not the .net supporting it).
I always figured, if your vars have $ in front of them you're like using a scripting language.
OTOH, I've yet to meet the REAL language that handles mixed (numeric / text indexed), unbalanced arrays like php does. It seems weird and goofy at first, but a lot of data structures are naturally pretty danged goofy too.
I love to watch a Java or Perl develop while you explain how an LDAP object that is returned as an array is put together. It's fun to watch people's head asplode (figuratively, of course) when they first encounter that particular bit of weirdness.
Doug G
04-04-2006, 07:47 PM
Just to be clear. ASP is not a language, it is a framework used by scripting languages (vbscript, jscript, python) to build web applications. ASP.NET is also a framework not a language, supporting the C#, and VB.NET languages.
And PHP is a framework used by the php scripting language.
Conceptually asp and php are pretty much the same. PHP relies more on functions built in the php language, ASP relies more on extensible components from outside sources.
Sxooter
04-05-2006, 12:40 AM
Actually, PHP has several real frameworks available for it. One of the more interesting ones is greenorange (http://www.greenorange.org/public/index.php) which is a framework and an IDE via web interface all rolled into one.
I would actually say that php can be used to build its own framework, but PHP in and of itself is kinda a half-framework, considering all the external packages it can incorporate, like libdb, url wrappers, ldap interface, PDO db interface etc...
But a framework generally includes larger things like form builders and such.
Doug G
04-05-2006, 03:26 AM
I just visited the greenorange site. Oops, I can't even look at the documentation without registering first, and I don't intend to register on a site when I don't have a clue what it's about.
Sxooter
04-05-2006, 03:37 AM
That's only the overview doc, and I'm not sure why they implemented that. It wasn't there before. the technical docs which tell you how to actually use it, are free and open.
I'm willing to be this had something to do about people spamming comments or something.
Note that it is licensed GPL...
laserlight
04-05-2006, 03:57 AM
I always figured, if your vars have $ in front of them you're like using a scripting language.
I propose that PHP6 use variables that start with a ! so as to make it a Real Programming Language.
if ($isset(!_GET['foo'])) {
echo "empty";
} else {
echo (!_GET['foo'] == 0) ! "nothing" : "something";
}
khendar
04-05-2006, 04:46 AM
PHP relies more on functions built in the php language, ASP relies more on extensible components from outside sources.
Doesn't PHP use the functions from the Zend platform ?
Weedpacket
04-05-2006, 06:57 AM
And PHP is a framework used by the php scripting language.I thought we were talking about the PHP language, and whether it's a scripting language or a programming language. Who's idea was it to make the runtime environment an issue?
Is that the difference? That a scripting language is interpreted at runtime (and so potentially has the ability to rewrite itself at runtime), and a programming language is compiled to native machine code first? Them's very deep and sticky waters to be getting into - and certainly aren't going to be covered by a single one-or-the-other distinction.
Programming is programming. Trying to make distinctions like that is not worth the bandwidth, imo.
dalecosp
04-05-2006, 11:23 AM
I propose that PHP6 use variables that start with a ! so as to make it a Real Programming Language.
if ($isset(!_GET['foo'])) {
echo "empty";
} else {
echo (!_GET['foo'] == 0) ! "nothing" : "something";
}Yowsa! :cool:
And then, for PHP7, I propose we stop wasting money on wine, women, and song (and anything other than food, clothing, and shelter) and send the extra to Weedpacket as a commission to write an INTERCAL Compatibility Layer/Module...
Jason Batten
04-05-2006, 11:34 AM
I propose we stop wasting money on wine, women, and songYou pay for women eh? well @ 14.95 / month it is a bargain!
dalecosp
04-05-2006, 12:03 PM
You pay for women eh?Well, buddy, I *married* one, and believe me, when you marry one, you pay ... (and, if you've good sense, you don't "pay" anyone else .... ;) )
A few folks argue it might be cheaper, in the long run, and in terms not only financial, but personal, to just work hard and save your cash for an, um, "pro" whenever, as our friends across the pond might say, you get a "fancy" to play "slap and tickle". Can't say as I agree, necessarily; but I'll not come knocking on your door at midnight to see who you're with, either. Suffice it to say that generally, there have been laws about that sort of thing, and most societies would do well to study the issue in depth before they encourage/legalize/normalize it. But now we're way OT, even for the EL ....
Doug G
04-05-2006, 09:34 PM
Quote:
Originally Posted by Doug G
And PHP is a framework used by the php scripting language.
[/quote]
I thought we were talking about the PHP language, and whether it's a scripting language or a programming language. Who's idea was it to make the runtime environment an issue?
Is that the difference? That a scripting language is interpreted at runtime (and so potentially has the ability to rewrite itself at runtime), and a programming language is compiled to native machine code first? Them's very deep and sticky waters to be getting into - and certainly aren't going to be covered by a single one-or-the-other distinction.
Programming is programming. Trying to make distinctions like that is not worth the bandwidth, imo.
When you click reply quotes in the post don't make it to the reply page. And my entire post which you partially quoted was
Quote:
Just to be clear. ASP is not a language, it is a framework used by scripting languages (vbscript, jscript, python) to build web applications. ASP.NET is also a framework not a language, supporting the C#, and VB.NET languages.
And PHP is a framework used by the php scripting language.
Conceptually asp and php are pretty much the same. PHP relies more on functions built in the php language, ASP relies more on extensible components from outside sources.
I was only replying that php and asp are extremely similar environments when used by a web server.
Programming is programming. Trying to make distinctions like that is not worth the bandwidth, imo.
Ditto. I'm even a member of the group that thinks html is programming too :)
Doug G
04-05-2006, 09:37 PM
That's only the overview doc, and I'm not sure why they implemented that. It wasn't there before. the technical docs which tell you how to actually use it, are free and open.
I'm willing to be this had something to do about people spamming comments or something.
Note that it is licensed GPL...
Thanks, it was late and I did bookmark the site for a further look-see, the bits I saw looked interesting.
khendar
04-05-2006, 09:39 PM
Ditto. I'm even a member of the group that thinks html is programming too :)
Do we really want all of those kiddies out there making awful webpages with neon tiled background and yellow text going around calling themselves programmers ? Giving the rest of us a bad name ? :P
May as well call using formulas in Excel programming too while we are at it.
Weedpacket
04-06-2006, 12:33 AM
I was only replying that php and asp are extremely similar environments when used by a web server.And I was saying that we were talking about the PHP language, and you were replying to a post that stated that ASP is not a language.
Ditto. I'm even a member of the group that thinks html is programming too Well, I guess that explains it, then.:evilgrin:
Doug G
04-06-2006, 01:27 AM
And I was saying that we were talking about the PHP language, and you were replying to a post that stated that ASP is not a language.
No, you were quoting me out of context on purpose, to be disagreeable, and I'd like to commend you on succeeding.
Weedpacket
04-06-2006, 06:23 AM
Oh, good. For a moment there I thought I was posting for an entirely different reason. I thought I was pointing out that we were talking about the language, not the "framework". Glad you cleared that up. (How could I quote you out of context? I'm not going to re-post the entire thread just to make it clear what it was I was replying to.)
Since we were talking about the language, and not the framework, and since we established that ASP is not a language, but a framework that supports a few different languages, what point is there in bringing up that the PHP runtime environment supports the PHP language in the same way that ASP supports VBScript? It's a bit of a non sequiter. Maybe I just missed the whole point of your post.
tomdur
04-10-2006, 12:04 PM
Hi, I have questions and really want to know how to build
a specific
directory for web user. I met some of them on the net;
Like: http://www.directoryofmusic.net
http://www.open-sites.net or http://www.click2info.net
thank you.
Sxooter
04-10-2006, 12:33 PM
You should really start a new thread, eh? Give it a subject to go with what you're asking about, and put it in the right forum and you should get an answer right away. Note that this is pretty much a web server configuration issue, so I'd think Echo lounge is defitely not the best place to find help. This forum is kind of like the corner pub.
Look in General Help or Install, or maybe either the Linux or Windows forums, depending on your OS.
Note that with the first link you provided, it's just a matter of creating the directories in the web server's document root and you're done.
Weedpacket
04-20-2006, 05:52 AM
If you want, here's one perspective that may help.
"Scripts" in this context usually refer to programs (it's a subset) that are supposed to start, do their thing and stop all within a short space of time, and preferably with minimal user interaction; as distinguished from "programs" which are started and are expected to run pretty much indefinitely until they are dismissed. Note that the distinction is how the programs are intended for use, not what language they are written in.
"Scripting languages" would be a subset of "programming languages": those that were originally designed to aid the writing of scripts. That "originally designed" is crucial: you can write dynamic web pages with C (and once upon a time this was the norm) in exactly the same circumstances and for exactly the same tasks for which PHP is used now, but C isn't regarded as a "scripting language" despite the fact that that is exactly what it is being used for here.
Now, you can ask whether PHP is up to the task of being used to implement large-scale applications with indefinitely long running times and frequent user interactivity. Of course, you'd have to decide at which point on the scale "lots of interacting scripts" becomes "application" or vice versa. Then you can ask if PHP is a mere scripting language. But it still wouldn't say anything about the programmer (unless they insisted on using a language unsuited for the situation).
But if the question is "PHP: scripting language or programming language?" the answer would have to be "both" - same as if the question was "zebra: equine or mammal?"
PHP Builder
Copyright Internet.com Inc. All Rights Reserved.