HiveMind on PHP and Java
Our buddies over at hivemind.co.uk have published another PHP article. This time, instead of decrying PHP, they show how to use the PHP-Java bridge. The article itself, titled How to Bridge PHP and Java for Powerful Web Solutions it technically solid for the most part. I wonder about the advice on creating an autoexec.bat file to set your PATH and Java’s CLASSPATH but it is technically accurate, you can do it this way.
Beyond that, there is a good primer for getting the JDK setup and operating on your machine in a minimum number of steps. (and since it’s Windows based, it’s important to know that no reboots are required for this installation.) Once you have the JDK installed, they walk you through a quick “hello world” of creating a Java class and using it in PHP.
All in all it’s a good article for those curious about how to get things up and running with PHP and Java.
The unnamed author couldn’t help but take a swipe at PHP though. Near the bottom of the article is this little backhanded jab.
The PHP code here is simple and straight forward. It is not OOP. But you probably got enough of that while doing the Java code.
Hint to author: It could have been OOP if you wanted it to be.
Still, I’ll have to conclude that if you are thinking about using Java inside of PHP, reading the article and following along with the examples will be time well spent.
=C=

Comments