For those that are interested, here's a summary of JSR-223, straight from the spec lead.

---
Mark Roth, Java Software
JSP 2.0 Specification Lead
Sun Microsystems, Inc.

--- Begin Message ---
Hi Mark

Here's a little essay on the relationship between the JSR and PHP.  Feel free to 
forward it.

JSR 223 defines an API used to embed scripting engines in Java applications.  As a 
special case, it defines a class of Servlets that  host scripting engines. The engines 
generate web content by executing scripts.

One of the implementations uses the native open source PHP code and the corresponding 
Servlet executes that code.  There is a PHP SAPI whose callback functions are 
implemented using JNI calls into the Servlet and Servlet Container.  The PHP scripts 
can also instantiate Java Objects using the Web Application's ClassLoader and invoke 
the public methods of the objects.  In cases where it makes sense, native PHP syntax 
can be used to do enumerations/iterations and access collections at indexes.

The spec can also be implemented (more easily, in fact) using any of the many 
Java-based scripting engines.. Rhino, Jython, BeanShell, Groovy, etc.

The spec won't specify how  particular scripting languages call Java.  We assume that 
all of them can do it in their own fashion.  With all of the Java-based scripting 
engines, this is a built-in feature.  To do an implementation with PHP, we did it 
ourselves. 

The JSR also does not deal specifically with native applications.  It just so happens 
that one of the implementations uses the native PHP sources to implement the Java API 
that the JSR does deal with.

The Java support in PHP4 is experimental and labeled as such.  It contains a lot of 
good ideas, some of which we used,  but as it stands, it probably isn't usable.

//mike



--- End Message ---
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to