Ruby on Rails Thursday, April 28, 2011

On Thursday, April 28, 2011 12:00:37 AM UTC-6, AL wrote:

Hi,

and thanks for the information.

I have searched information about Ruby mapscript but I found only few
articles so I'm not sure about maintenance and support of Ruby
mapscript. PHP mapscripts are widely used and there is lot of
documentation available, I'd prefer Ruby but I have to stay in PHP for
now because of those reasons ;(

Totally understandable.
 

My PHP scripts implements WMS GetMap api (http://en.wikipedia.org/wiki/
Web_Map_Service), so it is a Web Service. GetMap request (http GET)
includes some location, size and format parameters and returns map
image. Map image is used by OpenLayers library in browser (http://
openlayers.org/).

I think alternative 3. sounds suitable for my case. I have to
implement GetMap api to Rails application, after authentication Ruby
script sends request to PHP service. PHP service returns map image to
Ruby script and Ruby / Rails returns it to browser, did I understand
the point correctly?

Yeah, this is a pretty normal setup. For instance, I have a rails app. that allows our employees to "ship" packages via Fedex. Fedex provides a web service that clients can use to get rates and create/schedule shipments (including allocating tracking numbers, generating labels, etc.). So, my rails app simply includes client code (a folder w/several code/class files in my rails' "lib" directory and some models in "app/models") for talking to and saving fedex shipment web service "objects".

Then my controller has simple code in various actions to create or otherwise modify or operate on my "fedex shipments" (FedexShipment model class for example) which, in some instances just works against my local database and in others calls library code to make actual web service calls.

I used the savon gem to help implement my SOAP client but there are other gems that may work better for all I know.

Anyhow, this setup make it so all auth(entication/orization) is done normally in the rails app. which app. also happens to be a SOAP/web-services client.

Have fun!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment