I’ve been working on basic personal rails stuff for a bit now and have
reached a point here I have the opportunity to develop something for my
The basic scenario is this, take a half dozen or more php sites which
all have forms; some of which vary, and populate a database. Use that
data, re-assemble it and fire it off in xml to a bunch of other
companies, grossly over simplified but that’s why I want ruby at the
core accepting data from csv, php, java and .net applications
Now ideally I’d like to do it all in rails, clean start you see. Alas
the frontends will stay in php etc for this iteration at least. Now
I’ve been working on restful things for a while, peepcode to thank for
Where I’m stuck is and I’ve seen a few posts on here, but is in how to
glue these islands together. So how to send the data from app x into
the rails app. At first it’s a simple to say do a net::http_post of an
xml block or the post vars into ruby, this works from some curl tests,
but then security pops up, more over opening this up to other
(approved) people/sites to post there form data to us. So I thought,
api token type approach, I’ve never been a fan of storing username and
passwords in streams, a key for some reason feels more acceptable,
although a username is acceptable if it works ;).
So I see these external sites posting data to the rails core, which is
waiting for data, then manipulates it and sends it on again at some
point. The rails app would have no external html interface, all api
driven save for an admin app on another server taling to the same db.
But I’ve got a mental block on how to achieve it, effectively and of
course making it sustainable.
I have my eye on the restful authentication and I’m exploring that this
weekend I suspect.
Does anybody have any pointers or tips, for the above scenario or code
snippets to get me moving again, I’ve not done much integration in this
way, save web services in java with wsdl/snore, just can’t seem to wrap
my head around the ruby way, which is frustrating me a bit…
Thanks for reading, if you’ve got any questions, please ask.