News

Where PHP can still pack a punch against Node.js

talent-banner

The old adage of the young upstart versus the old timer tends to end one way in reality: with the old guard putting up a good fight, but ultimately losing out. However, it’s always dangerous to underestimate the old timer.

Which brings us to PHP vs. Node.js. Developers are moving over to Node.js in their droves, having been developing web applications using PHP for the past decade.

However, there might be life in the old timer yet, suggests InfoWorld. Contributor Peter Wayner pits the two together to see where PHP might still outdo the new framework, Node.js.

Mixing code with content

If you want to add a branch to the process while midway through compiling text for your website, or if you want to mix in text or data from a database, with PHP, you can start writing code within seconds.

Compatibility

Lest we forget that most popular platforms for building websites (WordPress, Drupal, Joomla) are written in PHP, with open source plugins to tap in to.

Simplicity

Web app development is not meant to be complex. With only a few variables and basic functions, PHP stands out for its simplicity, concerned only with moving the data from port 80 to the database and back.

HTML

If you ship your data in HTML, avoiding any misfiring JavaScript threads that try to create a page on the browser from two dozen web service calls, it’s worth remember that PHP is optimised for that way of working.

SQL

Built to co-exist with MySQL and its many variants, like MariaDB, PHP gives developers access to some of the most stable, well developed code.

Speed of coding

PHP cannot be beaten on speed, with no compilers, no deployment, no JAR files or preprocessors to worry about, meaning a project can be completed on deadline.

Competition

PHP is not just going to be dropped as a result of Node.js’s arrival, with the HHVM team and the Zend team working hard to deliver fast code for everyone.

However, PHP is going to struggle with the fact that Web applications are nowadays heavily – if not solely – based on Javascript.

Also, PHP cannot compete with Node.js in offering developers the ability to work on the same language on the server and the client side. No more switching back and forth between languages will save a lot of time.

The old adage looks likely to play out once again…

If you’re looking for a new role in Front End Development speak to George! george.hall@talentinternational.com