Skip to Content
Ruby on Rails® for Microsoft Developers
book

Ruby on Rails® for Microsoft Developers

by Antonio Cangiano
April 2009
Intermediate to advanced content levelIntermediate to advanced
479 pages
12h 55m
English
Wrox
Content preview from Ruby on Rails® for Microsoft Developers

Chapter 10. ActiveResource and Web Services

Your paradigm is so intrinsic to your mental process that you are hardly aware of its existence, until you try to communicate with someone with a different paradigm.

—Donella Meadows, Environmental Scientist

Web Services are systems used to allow machines to interact over a network. Within the context of Web development, the network is the Internet itself, and the interaction is between at least one computer that exposes a Web API and other machines that use this API to require services.

The previous chapters analyzed how you can define resources through ActionController::Resources and hence easily define a RESTful service that exposes an API. When the format requested was XML, Rails would formulate a response in XML that was suitable for other computers to understand.

Historically XML has been the lingua franca for communicating among machines. Another younger contender is JSON (JavaScript Object Notation).

What you did not explore yet, and what will be the main subject of this chapter, is how to consume REST Web Services that are defined through Rails. Enter the world of ActiveResource (also known as ARes).

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ruby on Rails™ 3 Tutorial: Learn Rails™ by Example

Ruby on Rails™ 3 Tutorial: Learn Rails™ by Example

Michael Hartl

Publisher Resources

ISBN: 9780470374955Purchase book