tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <r...@apache.org>
Subject Re: [Fwd: PHP/JSR223]
Date Thu, 08 Apr 2004 21:12:14 GMT
Mark Roth wrote:
> 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 high level summary is nice, but more detail is needed for this 
discussion.
What does it mean exactly ?
The RI for the JSR is with PHP ? Does the code work already ? Is it OSS ?
;)

> 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.

Rémy


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message