On Mon, 2008-03-31 at 10:27 -0600, Joshua Lutes wrote: > Here is a question about PHP, though. Why is it not so desirable? What > ought to be used in its place?
The biggest problem with PHP is that it encourages poor development practices. Creating a page that mixes DB access, business logic and presentation is so easy, PHP makes developers feel wasteful when they try to architect a proper application. Before you know it, you've got a mountain of spaghetti code you're afraid to touch for fear the app will never work again. addslashes? magic quotes? register globals? The mind boggles at the blatant ignorance of proper development practices. It's no wonder so many PHP apps have an abysmal security history. The vast majority of open source PHP applications are festering cesspools. Based on the code they produce (and I include myself because I've suffered at PHP's hands too) you'd think all PHP developers must be degenerates. And yet I've known several that are pretty smart, so it must be the language. There's something inherent to PHP that makes even smart people stupid. In the past I've needed to customize and integrate applications written in PHP, Perl and Python. The Perl and Python apps weren't hard. The PHP apps... well, I don't even bother with PHP apps anymore. So many turned out to be terminally brain dead that I don't even waste my time checking anymore. In summary, what's wrong with PHP? It's a language that encourages bad design and a community that teaches bad design. If you haven't had enough experience with various languages to form an opinion of your own, let me recommend Python. I prefer Perl and Ruby, but I have deep respect for Python because it's a language deliberately designed to encourage good design and a community that teaches good design. /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
