http://www.ukuug.org/events/linux2002/papers/html/php/
I just stumbled across this article - any thoughts? From my inexperienced mind, it seems that the author might have some organization issues re development?
http://www.ukuug.org/events/linux2002/papers/html/php/
I just stumbled across this article - any thoughts? From my inexperienced mind, it seems that the author might have some organization issues re development?
It sounds to me like the author has too narrow a view on how a language should be structured, behave, used, etc...
Originally posted by goldbug
It sounds to me like the author has too narrow a view on how a language should be structured, behave, used, etc...
No doubt. I've used PHP on a couple very large sites I have, and wouldn't consider using another language as the core. Most of those weren't really valid problems either. Just a lot of griping about how he thinks PHP compares to a so-called "real" language. Mindless garbage IMHO.
While the author's conclusions are seriously flawed he does raise a number of important issues with php. Any serious php developer should be able to read through the article and at least understand the pitfalls of (for example) majic_gpc and the equality operator.
It's rather unusual to find such a well-written document with such strange conclusions.
Maybe if this babbling fool actually had and real arguments it would be worth taking into consideration. It sounds to me just form the first few paragraphs he is out to put down PHP and not actually give it a fair shake. I use PHP on a fairly large site. We handle thousands of stories and I haven't had a single problem yet with PHP. As for this damn team thing, what the hell is that about.
PHP seems to be aimed predominantly at lone developers, rather than at teams attempting to develop serious websites.
I work with like 3 other people that design the look and feel of the site. I know of several other companies that do the same and use the same languages!
The way it sounds to me is this person has never had to actually use PHP in any type of real web design situations before. The more this guy talks the more I hear Blah blah blah, I am an idiot, blah blah blah!
Uneducated fool babbling against something that he knows nothing about...Similar to the PHP vs. ASP debates, you just make it "sound" like some points are bad, so you start swaying the readers mind.
It all psychological!
Seriously, there aren't a lot of good articles out there for a subject like this. Someone sets their mind either "I like it" or "I don't". We're all biased in the ways that we like PHP, so we'd probably write an article pointing out all of the good points to PHP. This guy obviously doesn't like it, so he's trying to point out the bad points(at least in his mind) of PHP. Really can't take stock in these kinds of articles. Going to have to just try it for yourself and see what your own opinion is.
It is the poor craftsmane who either blames his tools.
PHP is a great glue language, and if you're a disciplined developer, provides a fairly easy structured environment to create sharable libraries and templated systems. If you're a beginner, it's like a lot of languages, in that it ALLOWS you to do some pretty stupid stuff without yelling at you.
Any old C hacker, perl hacker, or ASP developer who has any skills has found PHP quite serviceable when I've introduced them to it and shown them the pitfalls and advantages. And most of them can create good, maintainable code fast.
Beginners, not always so well. But it's somewhat self-correcting. The beginners only have to write one maintable heap of spaghetti code before they learn better ways of doing things, in any language. It's the poor bastards that can't figure that out that are doomed.
Interesting read. Some reasonable points too. It's a bit unfair to compare PHP to C, since PHP is such a young language (even if it is built on top of C)
Originally posted by Shrike
Interesting read. Some reasonable points too. It's a bit unfair to compare PHP to C, since PHP is such a young language (even if it is built on top of C)
... and they are made for two highly different reasons!
There are a few valid points, but most are only sorta-valid and some are just not valid at all.
That said, I agree with the general conclusion. PHP is best suited to web sites that are of simple to moderate complexity. You can use PHP with larger projects, but I wouldn't recommend it.
For small web sites (which is most of them) PHP is the best choice by far. It is widely available, cross-platform, lightweight, and inexpensive (free; you just need to put it somewhere). I can't think of any other language that can make all of those claims, and those are the things that matter most to a small web site.
The more "professional" languages encourage cleaner and more structured code. That tends to get in the way when working on a small project, but larger projects really do benefit. You can write clean and well-structured code with PHP, but the language isn't going to help you. So why not use another language that will?
I don't think there is a one-size-fits-all language. The more languages you have under your belt, the more likely you are to have the right tool for the job.
I guess if its a matter of opinion this is his on Personal opinion of the PHP Language.
I didnt read it all, but he never really said anything good about the language (what did this guy have trouble learning it or something:p )
Also his conclusion C, Java and Python. All can run as a web programming language but are more aimed for Compiled Programming, while PHP isnt. Now this to me sees that he has no idea what PHP is meant for.
Yes PHP has its pitfalls and yes there is always improvement for the language but so does all the other languages. There isnt one language which is perfect.
Originally posted by swr
The more "professional" languages encourage cleaner and more structured code. That tends to get in the way when working on a small project, but larger projects really do benefit. You can write clean and well-structured code with PHP, but the language isn't going to help you. So why not use another language that will?
What is the difference between PHP syntax and C syntax that means that the latter "encourages cleaner code"?
Personally, I think C++ produces some of the ugliest code on the planet (and Javascript isn't that far behind).
That was an interesting read. The most interesting part is how he overlooked everything that could be detrimental to his thesis statement.
For Example:
http://www.ukuug.org/events/linux2002/papers/html/php/#section_2
What if the team used oop methodologies and created objects that encompassed all of the business logic and then created php documents that used those objects. If this is done correctly you are using php as your template language and your backend language thereby making positions within the team more interchangable and increasing overall productivity by having a team that can all help one another on some level. He never even mentions that.
He then spends half the article illustrating why non-typed or loosely-typed languages are satan spawn capable of nothing but evil. This is a religious war that has been on going in the community for many decades. It boils down to a simple answer, if you as a programmer want the freedom of loose-typing you as the programmer must safe-guard against loose-typing mistakes. It doesn't make a language better or worse as long as the functionality to force-typing when necesary is there and it is in php.
Then he covers the scoping issues. Every language has them, they are design decisions or the language and you can't please everyone.
He seems to forget that PHP is a special purpose language and not a general application language. It is designed for web-sites and only for web-sites. Sure, you can do other things with it but it is not ment for that.
He also spends a lot of words covering known security issues with the language. I tell you what, show me a language that intrinsicly prevents all security flaws and I'll use it exclusively for everything and hang stupid signs on everyone who doesn't.
Anyway enough of my rant.
Originally posted by Weedpacket
What is the difference between PHP syntax and C syntax that means that the latter "encourages cleaner code"?
It's not so much a matter of syntax exactly, but the extra checking that the C compiler does.
The other day I was tracking down a bug that caused fields to be nulled out. It turns out I had an array of objects (a result set from a database query) that contained only one object, but was pretending it was the object itself instead of an array containing an object. So I was doing $results->field when I really should have done $results[0]->field. If I had used a language like C or Java (using an array of structs/objects), I would've gotten a compile-time error because of the type mismatch, complete with source file and line number, and I would have gone in and fixed the error. No more than 20 seconds to find and fix. But because I was using PHP, it was quietly evaluated as null, and the null propogated through the system until it was visible. Seeing the null, I had to track the logic back through hundreds of lines of PHP code that looked fine to my eyes, place print_r statements at various points, and figure out where the null was coming from. Over half an hour to track it down.
That example doesn't happen very often, but given that it was a 100x difference in debugging time, it doesn't have to happen often to make a difference. For simpler code the difference would have been less, for more complex code the difference would have been more. At some point the cost of fixing that kind of bug becomes high enough that the gains of using a rapid development language like PHP are no longer worth it.
On the 1st of January, 1998, Bjarne Stroustrup gave an interview to the IEEE's 'Computer' magazine.
Naturally, the editors thought he would be giving a retrospective view of seven years of object-oriented design, using the language he created.
By the end of the interview, the interviewer got more than he had bargained for and, subsequently, the editor decided to suppress its contents, 'for the good of the industry' but, as with many of these things, there was a leak.
Here is a complete transcript of what was said, unedited, and unrehearsed, so it isn't as neat as planned interviews.
You will find it interesting...
LOL
i'd heard about that but never read it.... that's a laugh or 50 :p
hahaha
this thing for real?
Originally posted by planetsim
hahaha
this thing for real?
im scared.
WINAPI OPENGL program is freaking messy. I couldnt imagen writing one in direct X with MFC :eek:
Originally posted by swr
It's not so much a matter of syntax exactly, but the extra checking that the C compiler does.
The other day I was tracking down a bug that caused
<-- snip -->
high enough that the gains of using a rapid development language like PHP are no longer worth it.
Good coding practice would have had you checking that by echoing it out long before you had typed hundred of lines of code. This is more an example of how languages that check-up on the programmer lead to poor coding practices.