Jump to content

Php Lifetime


pritam79

Recommended Posts

Hi all, I am very fond of the PHP language because of its ease of use. I feel that its overall structure gives a coder the ease for coding web pages. But there are lot of articles on the web that say that PHP is losing its ground as far as server-side scripting technologies are concerned. How far is this true and if so what language might replace PHP? Thanks to all

Link to comment
Share on other sites

"Losing ground"?Speed-wise, common benchmark tests put PHP in the ballpark with other scripting languages. Yes, there are differences, but not order-of-magnitude differences. If something significantly faster came along, we'd all probably jump on it. If the Perl 6 engine turns out to be a lot faster than PHP (doubtful, from what I've read so far) then I might return to Perl.Almost certainly, a compiled application will run faster, and some CGIs are written in C++. But that brings tradeoffs, like less portability, especially if your sites are hosted. My host could move my site to a new machine without even telling me, for example. Even if I host myself, I might want to change platforms for any number of reasons. Suddenly, I'm addressing a new chipset. My C++ apps no longer work and must be recompiled. But my scripted apps work with no changes.In any case, the speed of your server app is of trivial importance compared to the speed of your server-client connection, which is totally out of your control.Functionality-wise, PHP can interact fully with file systems and databases, and the built-in function set is enormous, especially compared to a pared-down language like Perl, which requires a gazillion include statements to get the library functions you want. PHP is not wanting for functionality. There's a lot of stuff I've never even tried yet.Technology-wise, PHP is less object-oriented than some other languages. Whether that is significant or not has more to do with your programming philosophy than anything else. OOP got big around the same time that GUI interfaces got big. The API for a GUI is generally object-oriented already, so that fuels the engine, and a lot of folks coming out of computer science programs are dedicated to OOP. If you already program in OOP fashion, then you may want a scripting environment that supports what you know how to do, such as Ruby. Otherwise, I see no great benefit to a massive OOP implementation in a stateless environment with no GUI. The OOP that is available in PHP is probably enough for most applications.There's always someone who wants the newest toys, even when they're no better or less stable than the old toys.Maybe there's something I've missed. Can you link us to one of these articles?

Link to comment
Share on other sites

I've been hearing similar stuff about PHP from my university teachers... Perhaps it is a question of programmer's competitiveness.When PHP was really shiny and new, it was thought of as the thing a true web developer must know. Nowadays, it's a thing any web developer must know. If you open up any forum, you can find a programmer that "knows" PHP. Actually, do you know any web developer that doesn't "know" PHP? And I put "know" in quotes on purpose... as the people that "know" PHP don't always really know it. Opening up a "config.php" file, and editing the MySQL settings in it, plus copy&paste-ing some snippets and doing several lines of "echo" doesn't constitute as "know" if you ask me.*Nowadays, AJAX is thought of as the same thing. When marketing teams worldwide realize it's only a technique (ala DHTML), and not a language, people looking out for a web developer will (hopefully) start treating people with "AJAX" experience as being total newbies (in the same fashion that every civilized employer would look at you if they see you've written DHTML in your resume).So... PHP is loosing its ground in terms of being "cool". It's now too ubiquitous to be so. But that doesn't make it a bad language.* You can say you really know PHP when you can program any algorithm with PHP's existing language constructs (as they are enough), except maybe "PHP internals specific" ones, such as where you need a kind of information from an API which it doesn't expose, though it should (A case I have in mind is a bug in XMLReader that makes it unable to retrieve the DTD in any way... the only way you can get the DTD is with DOM, but if you use XMLReader instead of DOM, like me, you have a good reason for doing so). Plus (and more importantly), you need to be able to read and understand the manual.

Link to comment
Share on other sites

Probably in these articles they've calculated like this:old situation, 99% of all webrelated business supports php, 10% supports alternatives.new situation, 99.99% of all webrelated business supports php, 35% supports alternatives.Conclusion, php is losing ground compared to its alternatives. You see these kind of twisted argumentation a lot, even on the news...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...