p. The PHP-Java bridge has been a growing topic of discussion. Zend’s own Kevin Schroeder gave a talk on the subject last month at “CodeMash.org”: called “Caffeinated PHP”. Now BEA is getting into the act.
p. “Using PHP-Java Bridges with WebLogic Server”:http://dev2dev.bea.com/pub/a/2007/02/php-java-bridge.html is a straight-forward tutorial that discusses both version of the Java Bridge that exist; the “Sourceforge.net”:http://php-java-bridge.sourceforge.net/pjb/ version and the version that comes bundled in “Zend Platform”:http://www.zend.com/products/zend_platform/in_depth/php_java_integration.
p. By way of intro, the article tells you what the PHP-Java Bridge is.
bq. The available implementations of the PHP engine (the core interpreter that provides support for the PHP language) that work with WebLogic Server are native code. An instance of the engine runs in its own operating-system process and must somehow communicate with other processes involved in a Web application-for example, with a Web server or a Java application server. In the case of a Java server, technology is available that makes the communication fairly transparent to an application programmer. There is a component that does the work of marshaling data back and forth between the two environments and that offers PHP language constructs an application developer can use to integrate the two languages. This component is the PHP-Java bridge.
p. The article lists 3 reasons why you would want to consider using the Java Bridge.
*(disc) PHP code can instantiate and call methods on a Java object, either a POJO or a Java EE resource like an EJB.
* You can use WebLogic Server as the Web server for pages coded in PHP.
* Java code can invoke PHP scripts.
p. The rest of the article gives you everything you need to get the PHP-Java Bridge setup and to start talking to it.
p. It’s a surprisingly short read but if you have WebLogic installed and want to start integrating PHP into your development mix, it’s an important read.