Designing Java applets to work with PHP server scripts

K

K.J. Williams

I want to know, in general, how easy is it to design a Java applet to work with PHP for use on the internet?

thanks
 
A

Arne Vajhøj

I want to know, in general, how easy is it to design a Java applet to work with PHP for use on the internet?

Rather easy.

Applet with builtin (Http)URLConnection or Apache HttpClient or
another HTTP client lib and a PHP script returning XML/JSON/CSV
is very simple to implement.

Arne
 
R

Roedy Green

I want to know, in general, how easy is it to design a Java applet to work with PHP for use on the internet?

They have nothing to do with each other. You trigger an Applet with
ordinary HTML. You don't have to dynamically generate anything.

--
Roedy Green Canadian Mind Products
http://mindprod.com
Mathematicians and computer scientists are far more interested
in impressing you than informing you. If this were not
so, the tutorials on building a robots.txt file, for example,
would consist primarily of an annotated example. What you get
instead are nothing but inscrutable adstract fragments in some
obscure dialect of BNF.
 
N

Nigel Wade

I want to know, in general, how easy is it to design a Java applet to work with PHP for use on the internet?

You need to be more explicit. Java applets are normally delivered from a
web server, and run client-side. PHP is a general purpose scripting
language which happens to be used on some web servers for CGI and other
server-side operations.

In what do you want an applet to "work with" PHP?
 
R

Roedy Green

In what do you want an applet to "work with" PHP?

Maybe you mean have the applet send in transactions that look like CGI
forms?
--
Roedy Green Canadian Mind Products
http://mindprod.com
Mathematicians and computer scientists are far more interested
in impressing you than informing you. If this were not
so, the tutorials on building a robots.txt file, for example,
would consist primarily of an annotated example. What you get
instead are nothing but inscrutable adstract fragments in some
obscure dialect of BNF.
 
A

Arne Vajhøj

You need to be more explicit. Java applets are normally delivered from a
web server, and run client-side. PHP is a general purpose scripting
language which happens to be used on some web servers for CGI and other
server-side operations.

In what do you want an applet to "work with" PHP?

Having an applet communicate with a web service is rather common.

Arne
 
A

Arne Vajhøj

I know it is, but that is just one rather specific instance of "server
scripts".

But in the context of "Java applet to work with PHP" it is a pretty good
fit.

Arne
 
N

Nigel Wade

But in the context of "Java applet to work with PHP" it is a pretty good
fit.

I would think CGI is a far more common fit than web service. But it
would still be an assumption which may mean wasting time providing
advice on heading down blind alleys. Better to get a more definitive
context from the OP first (which has still not been provided).
 
A

Arne Vajhøj

I would think CGI is a far more common fit than web service.

I can not see where CGI fits in.

Running PHP via CGI instead of FastCGI or Apache module is
not related to applets.

Arne
 
N

Nigel Wade

I don't understand where CGI comes in.

We know we have applet and PHP.

Where does CGI get involved?

If you use the applet to communicate with a CGI PHP script.
 
A

Arne Vajhøj

If you use the applet to communicate with a CGI PHP script.

I still don't get it.

CGI is a protocol used between web servers and scripts/scriptengines.

You can do:

applet----(HTTP)----web server----(CGI)----PHP

or:

applet----(HTTP)----web server----(something else than CGI)----PHP

But whether PHP is integrated via CGI or FastCGI or Apache module
(in process call) does not impact how the PHP code looks and not
how the Java applet code look like - it is purely a server
configuration issue.

I don't think the original poster is asking on how to integrated PHP
with his web server.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top