Re:PHP, the web’s most popular programming language, is comi...
by modarts on Tuesday October 02, 2012 @05:40PM
(#4604504)
I'm sure it's all fun and enjoyment while you're writing the code; but what about going back 2-3 months later, or worse, hiring additional developers on the project? How enjoyable is it to have reams of inline server script across multiple pages with no clear structure or intent?
Re:PHP, the web’s most popular programming language, is comi...
by danso on Tuesday October 02, 2012 @05:41PM
(#4604508)
Thanks for the answer. I agree with the ease part. And not touching the HTML, if that's how the app is arranged, is also good...I think my worst memories involved maintaining PHP that I (not knowing better) just threw into HTML when it seemed right.
It is still immensely satisfying to write in any text editor <?php echo (2 + 2); ?> and then see 4 on your screen. And then to wrap that in HTML and really get going. No compiling, no libraries to include, that's it. After writing code in Java and C (12 years ago), that is a breath of fresh air, and that's what got developers of my generation interested in PHP.
Do you have more options today? Absolutely. Python and Ruby were extremely obscure back then. No longer. You have Node.JS and of course, good templating libraries for all of the above.
But PHP is a templating language at heart and it's still the easiest to embed into HTML and see immediate results. That's pure joy.
Funny part? None of my production PHP code touches HTML or any client side stuff in any way. It just pumps data from the database to the client-side JavaScript.
And it's still immensely enjoyable. Why? Because PHP is aimed at the lowest common denominator. It has to work for that dude in India and it has to work for the 50 year old guy who just decided to switch careers. Which means the base language has to be dead simple. And it is. It's pretty much C with a few web-centric functions thrown in. That simplicity is enjoyable.