PHP Integration

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

PHP Integration

Colin Seaman
Hi,

I'm new to learning Orbeon Server and my main use of it will be to
develop and deploy XForms.  However, the application which I am writing
is done in PHP.  Is there any sensible way in which I can get PHP to
communicate with the Orbeon server so that I can send data to and from
my XForms?

Many thanks for any help! :-)

--
Colin Seaman





--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

AW: PHP Integration

Oliver Charlet
Hi Colin,

I see two way to do so.
1. Use PHP to provide a web service like interface to the application and
use OPS only to serve the xforms. This way you can load the data coming from
the application as XML into the Xform (via an initial submission triggered
by the xforms-ready event) and submit the resulting XML back to the PHP app.
2. Use OPS only and write a PHP processor, that allows you to process PHP
requests, possibly integrating it all using a technology like
http://php-java-bridge.sourceforge.net/. I am courious to see, if you can
make this work. Post your results to the list.

Number 1 would be my favourit, since it involves minimal coupling and allows
you to completely exchange your back end system with another implementation,
although it reduces OPS to "no more" than an server side Xform engine.

Good luck
:olli

> -----Ursprüngliche Nachricht-----
> Von: Colin Seaman [mailto:[hidden email]]
> Gesendet: Freitag, 18. August 2006 09:05
> An: [hidden email]
> Betreff: [ops-users] PHP Integration
>
> Hi,
>
> I'm new to learning Orbeon Server and my main use of it will
> be to develop and deploy XForms.  However, the application
> which I am writing is done in PHP.  Is there any sensible way
> in which I can get PHP to communicate with the Orbeon server
> so that I can send data to and from my XForms?
>
> Many thanks for any help! :-)
>
> --
> Colin Seaman
>
>
>
>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: PHP Integration

Hank Ratzesberger
In reply to this post by Colin Seaman
Colin,

"off the top," I think it would be possible to
use Apache as a front end so that you can
run php. You would use the ajp connector to
talk to tomcat.  

You would need to isolate the xforms into
the directory mapped to the OPS servlet.

As suggested, you may want more than one
servlet, one for xforms and another for
web services that your php app can call
upon.

I guess a question is whether, within the
ajp mapped urls you can have php content, and
I presume the answer is no.  In page-flow.xml
(the controller) you can specify that files
are passed through, but then they would not
get processed by php.

--Hank Ratzesberger
UCSB


----- Original Message -----
From: "Colin Seaman" <[hidden email]>
To: <[hidden email]>
Sent: Friday, August 18, 2006 12:05 AM
Subject: [ops-users] PHP Integration


> Hi,
>
> I'm new to learning Orbeon Server and my main use of it will be to
> develop and deploy XForms.  However, the application which I am writing
> is done in PHP.  Is there any sensible way in which I can get PHP to
> communicate with the Orbeon server so that I can send data to and from
> my XForms?
>
> Many thanks for any help! :-)
>
> --
> Colin Seaman
>
>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: AW: PHP Integration

Erik Bruchez
Administrator
In reply to this post by Oliver Charlet
Colin,

I agree with Oliver's suggestions. I think it boils down to what we
could call:

1. The "service" approach (where OPS calls services written in PHP).

2. The "proxy" approach (PHP's output containing XForms is sent to OPS
for processing, and OPS sends the result to the client)

I think the service approach is really good. In most cases, you can just
write static XForms pages, however, either those pages get initial data
from URL parameters, xforms:instance/@src, or XForms submissions that
execute upon xforms-ready.

With the service approach, PHP only receives and send data, not entire
XForms pages. This also allows OPS to better cache XForms pages, as
those in effect are static.

-Erik

oliver charlet wrote:

> Hi Colin,
>
> I see two way to do so.
> 1. Use PHP to provide a web service like interface to the application and
> use OPS only to serve the xforms. This way you can load the data coming from
> the application as XML into the Xform (via an initial submission triggered
> by the xforms-ready event) and submit the resulting XML back to the PHP app.
> 2. Use OPS only and write a PHP processor, that allows you to process PHP
> requests, possibly integrating it all using a technology like
> http://php-java-bridge.sourceforge.net/. I am courious to see, if you can
> make this work. Post your results to the list.
>
> Number 1 would be my favourit, since it involves minimal coupling and allows
> you to completely exchange your back end system with another implementation,
> although it reduces OPS to "no more" than an server side Xform engine.
>
> Good luck
> :olli
>
>> -----Ursprüngliche Nachricht-----
>> Von: Colin Seaman [mailto:[hidden email]]
>> Gesendet: Freitag, 18. August 2006 09:05
>> An: [hidden email]
>> Betreff: [ops-users] PHP Integration
>>
>> Hi,
>>
>> I'm new to learning Orbeon Server and my main use of it will
>> be to develop and deploy XForms.  However, the application
>> which I am writing is done in PHP.  Is there any sensible way
>> in which I can get PHP to communicate with the Orbeon server
>> so that I can send data to and from my XForms?
>>
>> Many thanks for any help! :-)
>>
>> --
>> Colin Seaman
--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: AW: PHP Integration

Colin Seaman
Thanks for all the replies guys.  I'm going to have a go at the web services integration as this seems the most logical and most interoperable solution.

I'll post my results to the list when I've achieved this! :-)

Colin Seaman
Senior Developer
 
Tradocs Ltd,
Tower Point,
44 North Road,
Brighton,
BN1 1YR

email:     [hidden email]
telephone: 0870-1417031
website:   http://www.tradocs.net

This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity to 
whom they are addressed. If you have received this email in 
error please contact Tradocs. Please note that any views or 
opinions presented in this email are solely those of the author 
and do not necessarily represent those of the company. Finally, 
the recipient should check this email and any attachments for 
the presence of viruses. The company accepts no liability for 
any damage caused by any virus transmitted by this email.
This content of this email is without prejudice.


Erik Bruchez wrote:
Colin,

I agree with Oliver's suggestions. I think it boils down to what we could call:

1. The "service" approach (where OPS calls services written in PHP).

2. The "proxy" approach (PHP's output containing XForms is sent to OPS for processing, and OPS sends the result to the client)

I think the service approach is really good. In most cases, you can just write static XForms pages, however, either those pages get initial data from URL parameters, xforms:instance/@src, or XForms submissions that execute upon xforms-ready.

With the service approach, PHP only receives and send data, not entire XForms pages. This also allows OPS to better cache XForms pages, as those in effect are static.

-Erik

oliver charlet wrote:
Hi Colin,

I see two way to do so.
1. Use PHP to provide a web service like interface to the application and
use OPS only to serve the xforms. This way you can load the data coming from
the application as XML into the Xform (via an initial submission triggered
by the xforms-ready event) and submit the resulting XML back to the PHP app.
2. Use OPS only and write a PHP processor, that allows you to process PHP
requests, possibly integrating it all using a technology like
http://php-java-bridge.sourceforge.net/. I am courious to see, if you can
make this work. Post your results to the list.

Number 1 would be my favourit, since it involves minimal coupling and allows
you to completely exchange your back end system with another implementation,
although it reduces OPS to "no more" than an server side Xform engine.

Good luck
:olli

-----Ursprüngliche Nachricht-----
Von: Colin Seaman [[hidden email]] Gesendet: Freitag, 18. August 2006 09:05
An: [hidden email]
Betreff: [ops-users] PHP Integration

Hi,

I'm new to learning Orbeon Server and my main use of it will be to develop and deploy XForms.  However, the application which I am writing is done in PHP.  Is there any sensible way in which I can get PHP to communicate with the Orbeon server so that I can send data to and from my XForms?

Many thanks for any help! :-)

--
Colin Seaman


-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws