A good example of learning rest in ror: Beast

Source: Internet
Author: User

Original article: http://www.javaeye.com/topic/39355

Today, we found that the implementation of this forum basically uses the restful style. After reading the code, I feel that it is helpful for learning rest,

URL:

Http://beast.caboo.se/

Source code:

Http://svn.techno-weenie.net/projects/beast/trunk/

Installation instructions:
Http://beast.caboo.se/forums/1/topics/381


Description of the rest service that calls beast. caboo. SE:

Http://weblog.techno-weenie.net/2006/12/13/taking-ares-out-for-a-test-drive

You can use the curl tool for testing. (A test instruction document)

Http://blog.inquirylabs.com/2006/08/04/how-to-use-curl-to-test-restful-rails/

My understanding of rest: Rest simplifies the interoperability between different applications (systems. The rest Implementation of ROR is more concise and simpler. If several systems adopt ror development (the latest version 1.2), it is very easy to implement interoperability between systems.

Miscellaneous: I have always thought that URLs on the Internet in a broad sense are equivalent to functions in C, C ++, And. Java, and are passed to URL parameters (? PRAMA = A & pramb = B) is equivalent to the function parameter. If you want to implement callback, you can pass a URL as a parameter, of course, the "function signature (or Convention)" on the URL is far less "secure" than the local function call. The callback party must understand the convention of the callback URL. In earlier versions of rails, some parameter information (/controller/show/1) is hidden in the URL, and many function signature rules are set in rails. Rails1.2's rest implies some parameters or semantics (post, get, put, delete) in the HTTP header ). Rails1.2's rest implementation has done a lot of work for programmers, making it as convenient to call the URL "function" as calling a local function.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.