Перевод "Rails in a nutshell Chapter 4. Active Resource"

Cody Fauser, James MacAulay, Edward Ocampo-Gooding, John Guenin, “Rails in a nutshell Chapter 4. Active Resource”, public translation into Russian from English More about this translation.

See also 28 similar translations

Translate into another language.

Participants

mellior442 points
unionups93 points
shopov.vitaliy85 points
And others...
Join Translated.by to translate! If you already have a Translated.by account, please sign in.
If you do not want to register an account, you can sign in with OpenID.
Pages: ← previous Ctrl next next untranslated
1 2 3 4 5 6 7 8 9 10 11 12 13 14

Rails in a nutshell Chapter 4. Active Resource

Chapter 4. Active Resource

Глава 4. Active Resource

History of edits (Latest: shopov.vitaliy 2 years ago) §

Today more than ever, applications need to be able to interoperate not only with browser based clients, but with other applications. In order to accomplish interoperability web applications commonly offer a web service API. A web service API offers remote access to an application over a network, such as the internet. In the past web service APIs were commonly offered using complex and bulky SOAP based web services that were slow to implement and hard to understand. With the advent of Rails and the rise of REST based web services there has become a faster, simpler way to offer and consume web services.

Сегодня, более чем когда-либо, приложения должны уметь работать не только с клиентами на основе веб-браузеров, но и с другими приложениями в качестве клиентов. Для достижения такого взаимодействия веб-приложения обычно предлагают веб-сервисные API. Веб-сервисные API реализуют удаленный доступ к приложению через сеть, такой как Интернет. В прошлом веб-сервисные API обычно реализовывались с помощью сложного и большого SOAP-протокола, который сложен для понимания и реализации. С появлением Rails и развитием REST веб-сервисов мы получили более быстрый и простой способ реализации и работы с веб-сервисами.

History of edits (Latest: shopov.vitaliy 2 years ago) §

Rails makes it easy to offer multiple different content types, or representations, of a particular resource through a single controller action. Being able offer multiple representations of a resource through a single controller action makes adding support for non browser based HTML clients as simple as adding a few lines of code that returns the resource in the representation the client requested. The controller layout and logic of the application is preserved with the added benefit of interoperability with new clients.

Rails позволяет легко предоставить несколько различных типов контента, или представлений, как ресурсов предоставляемых действием контроллера . Возможность предоставить несколько представлений ресурса
через одно действие контроллера позволяет включить поддержку клиентских приложений, не работающих на базе HTML браузера , путем добавления нескольких строк кода, который возвращает ресурс в нужном клиенту представлении.
При этом логика и структура контроллера сохраняется, что дает преимущество в совместимости с новыми клиентами.

History of edits (Latest: unionups 1 year, 1 month ago) §

Active Resource provides the tools to quickly and easily consume REST based web services conforming to the Rails RESTful URI structure and protocol conventions. Active Resource automatically maps the response from any conforming service to rich Ruby objects. Active Resource also provides all the lifecycle methods needed to easily find, create, update, and delete resources without having to write any code.

Following is a simple definition for an Active Resource model:

class Person < ActiveResource::Base

self.site = "http://webservice.example.com"

end

With only this simple subclass of ActiveResource::Base and a site definition, which tells Active Resource the base endpoint URI of the remote web service, it is possible to find, create, update, and delete resources :

# Build and save a new person

Pages: ← previous Ctrl next next untranslated
1 2 3 4 5 6 7 8 9 10 11 12 13 14