PHP and Ruby Code Integration Problem

Hi,

I am working on the UI for an existing shopping cart which has been done
on Php, I need to set up a front end on RoR. I have these doubts, could
anyone please help me with them…

Is it possible to integrate Php backend with RoR frontend?

Can we use XML to send data backwards and forwards from the UI and the
PHP backend? Can we have data being read by a php processing script,
which updates the db and returns appropriate values?

Please do let me know.

Cheers
Cass

Hi Julian,

Thanks for your reply, well actually, our shopping cart has been built
on PHP and now we are planning to have a UI built on RoR, I was just
wondering if we can use XML to send data backwards and forwards from the
UI and the
PHP backend? Can we have data being read by a php processing script,
which updates the db and returns appropriate values?

Cheers

Cass

Julian L. wrote:

Hi Cass,

What do you mean by backend and frontend?

Ruby is used a server-side language, with the web browser as the front
end, so your words are a little jumbled, I think.

Do you mean you’ll have one (Rails) app doing the interface without
talking to the database?

Julian

Learn Ruby on Rails! CHECK OUT THE FREE VIDS (LIMITED TIME) NEW VIDEO
OUT 3rd APRIL
http://sensei.zenunit.com/

Hi Cass,

What do you mean by backend and frontend?

Ruby is used a server-side language, with the web browser as the front
end, so your words are a little jumbled, I think.

Do you mean you’ll have one (Rails) app doing the interface without
talking to the database?

Julian

Learn Ruby on Rails! CHECK OUT THE FREE VIDS (LIMITED TIME) NEW VIDEO
OUT 3rd APRIL
http://sensei.zenunit.com/

Ah, okay.

Yes, you can do that. You might also want to have the PHP script and
the RAILS app talking to the same database. Not great fun for managing
the source code, but possible.

Julian

Learn Ruby on Rails! CHECK OUT THE FREE VIDS (LIMITED TIME) NEW VIDEO
OUT 3rd APRIL
http://sensei.zenunit.com/

Hi Julian,

Thanks for the reply, thats encouraging for me, if I may ask, could you
help me in getting my app up? I could actually pay your for your
services, for guiding me, if you can give me your email id, I can talk
to you personally…

Cheers
Cass
[email protected]

Julian L. wrote:

Ah, okay.

Yes, you can do that. You might also want to have the PHP script and
the RAILS app talking to the same database. Not great fun for managing
the source code, but possible.

Julian

Learn Ruby on Rails! CHECK OUT THE FREE VIDS (LIMITED TIME) NEW VIDEO
OUT 3rd APRIL
http://sensei.zenunit.com/

I’d recommend you take a look at JSON as an alternative to XML for
communicating between Rails and PHP. The support for JSON on both
sides is good and it supports all the common data types (strings,
numbers, arrays, etc).