Peter Wayner examines the platforms and passions underlying today’s popular dynamic languages, and though JavaScript, Perl, PHP, Python, Ruby, Groovy, and other scripting tools are fast achieving the critical mass necessary to flourish into the future, 10 forces in particular appear to be driving the evolution of this development domain. From the co-optation of successful ideas across languages, to the infusion of application development into applications that are fast evolving beyond their traditional purpose, to the rise of frameworks, the cloud, and amateur code enablers, each will have a profound effect on the future of today’s dynamic development tools.
Just read this from Slashdot. They linked to a version that is all on one page….
http://weblog.infoworld.com/archives/emailPrint.jsp?R=printThis&A=/…
The article took the words right out of my mouth.
Some good lines…
“Frameworks are becoming even more dominant. Some people identify themselves as Django developers even though they’re writing Python code.”
Applications are becoming their own worlds. There are 23 job listings for WordPress developers.
I completely agree with those two statements. With languages like this being so easy to learn, its not about the language any more, it is about the framework or the application’s api. That is where you invest your time.
But will PHP be able to shake the casual structure that encourages beginners to whip up spaghetti code? Will it be able to continue to mix the presentation layer and the application layer without driving everyone insane? Will Zend’s collection of server optimizations provide enough performance to overcome any limitations of the language?
That stuff really turned me off of PHP. I just learned Django and am pretty fond of it. Makes you do stuff the right way. You can’t mix html and python. It makes you use it’s own template language that is pretty dumb…just your basic for loops and stuff. This forces you to do anything complicated in a different file in a different language (Python).
In five years, there’s a good chance you’ll be able to imagine you’re writing Python while the code is interpreted by something called JavaScript.
Did someone do something like that before using LLVM. Writing code in one language that gets translated into JavaScript?
But will PHP be able to shake the casual structure that encourages beginners to whip up spaghetti code? Will it be able to continue to mix the presentation layer and the application layer without driving everyone insane? Will Zend’s collection of server optimizations provide enough performance to overcome any limitations of the language?
That stuff really turned me off of PHP.
How does PHP encourage this any more the Python. PHP just happened to get picked up by a lot of people with limited ability. PHP was just too easy. Fast forward to today and PHP5 is a proper object orientated language. The Zend Framework and countless others are what Django / Turbo Gears is to Python.
Now look at the documentation for the Zend Framework, look at the certification, look at the support and its clear if want to build a serious product and maintain it over many, many years PHP/Zend/Zend Framework are clearly superior even if Python is a better language.[i][/i]
That’s just it – PHP is too easy. It’s easy to sit down and start using it – but the downside to that it can easily be used without the skills to do a good job of it. Both good code and bad code can be written in any language, but some encourage good practices more than others do. PHP isn’t one of those.
Thinking about it Python, Perl and PHP are all just as easy in terms of actual programming.
PHP is just easy because its everywhere, the cheapest hosting companies provide on their cheapest accounts. Its was also easy because of globals being on and many other conveniences that were insecure in design.
I’m afraid I find it hard to see the phrases “PHP” and “proper object oriented language” together in the same sentence without gagging.
It’s like saying Visual Basic is a programming language…
PHP was great, up until about PHP3, where it was primarily an HTML Templating language, and it did this very well. After that, shoddy language design — or perhaps uncontrolled feature-creep — meant you ended up with a messy object orientation system and the biggest screw-up since Python disallowed Array.join as well as String.join: PHP’s (in)equality testing…
That alone should get some people removed from the gene pool, three generations ago.
PHP 5 OO is hardly messy. It may not have the purity of OO that Ruby has but its fully featured and works well. Its also fast compared to the competition.
PHP’s biggest problem was always insecure defaults i.e. convenience over security. PHP 6 should fully rectify this issue.
How can you even ask that? Take a BASIC interpreter from the 80s and embed it in a web server. Dump several hundred functions into one global namespace. Bolt on an ill-conceived, half-assed object model. Hand it to a bunch of nonprogrammers… and you’ve got PHP.
You can’t blame all of its many shortcomings on the clods who use it. They’re too busy trading javascript snippets, cookbook fashion, on “web developer” sites to have made the mess that is PHP all by themselves.
Edited 2008-10-14 21:22 UTC
I don’t see how you can compare the two. PHP is a templating language and Python is not, so in order to do a compare, you’d have to compare PHP against a Python based templating system like Mako, Cheetah, Kid, or Django templates.
In the case of Django templates (which is what I’m most familiar with) the business logic is not allowed to be included in the presentation. It simply can’t happen. This is good. With PHP, it does happen and results in some crappy, hard to maintain code.
But will PHP be able to shake the casual structure that encourages beginners to whip up spaghetti code? Will it be able to continue to mix the presentation layer and the application layer without driving everyone insane? Will Zend’s collection of server optimizations provide enough performance to overcome any limitations of the language?
Any language can be made to produce spaghetti code and mix presentation and application layers together. Have a look at the Zend framework and you will see how well it enables MVC design. Views and layouts including being template language neutral.
The problem is that it isn’t enforced as it is in Django, for instance.
Sure, good coders can write good code in any language and beginners can write crap code in any language. The nice thing is that frameworks like Django make it harder to write bad code by encouraging good programming practices whereas languages like PHP offer no such encouragement.
There’s also the CakePHP framework, which looks to be quite nice (http://cakephp.org/). Unless the cake is a lie, of course (sorry, requisite).
Edited 2008-10-15 08:02 UTC