How to use Rails and REST

Hi,

I just wrote an article on how to easily create a REST API for
Ruby on Rails applications:

Putting REST on Rails

It describes how to create everything from the ground up and includes
information on testing your API too.

Thanks,

Dan K.

Dan K. wrote:

Hi,

I just wrote an article on how to easily create a REST API for
Ruby on Rails applications:

Putting REST on Rails

It describes how to create everything from the ground up and includes
information on testing your API too.

Thanks,

Dan K.

Rock solid stuff, did the whole thing. Especially awesome for Code to
Test Ratio: 1:2.7 which for a tutorial is the most tests I have seen.

One critique is I think it could use a bit of info about REST. I didn’t
know much about REST before this, so I wasn’t sure why I was doing these
things. Maybe just a paragraph about the principals and how it uses the
request types and stuff.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Alex,

I just wrote an article on how to easily create a REST API for
Ruby on Rails applications:

Putting REST on Rails

Rock solid stuff, did the whole thing. Especially awesome for Code to
Test Ratio: 1:2.7 which for a tutorial is the most tests I have seen.

Thank you. I wanted to provide a set of test cases for a simple
application so that I could enhance it in further articles, adding
conditional GET support and supporting HTML and JSON in addition
to XML. I haven’t written it yet, but I think I can do it with
maybe 5 to 10 lines of controller code, and maybe a dozen or so
lines of view and test code.

One critique is I think it could use a bit of info about REST. I
didn’t
know much about REST before this, so I wasn’t sure why I was doing
these
things. Maybe just a paragraph about the principals and how it
uses the
request types and stuff.

To tell you the truth when I saw the article I was disappointed that
the part where I gave real world examples of why REST architecture is
important was edited out. IMHO the article is a little weak without
it – people need to be told the why behind something before being
told the what.

Ah well, it was my favorite part of the article so I’m posting it
here anyway :wink: Let me know what you think:

The problem was that many applications were designed so that
from side effects. There’s a part of the HTTP specification that
became a standard feature in mainstream browsers someday because
they ever happen.
This would’ve appeared immediately between the second and third
paragraphs of the article. Its a little rough, but I think it
makes the point a little better…


Thanks,

Dan


Dan K.
Autopilot Marketing Inc.

Email: [email protected]
Phone: 1 (604) 820-0212
Web: http://autopilotmarketing.com/
vCard: http://autopilotmarketing.com/~dan.kubb/vcard


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)

iD8DBQFESdZt4DfZD7OEWk0RAormAJoCDzXsNBvxdwC9VrD15Qq6OABTggCfTmaf
LQiyipOr41IhGlb2WDspZ0I=
=gRS5
-----END PGP SIGNATURE-----

Dan K. wrote:

the part where I gave real world examples of why REST architecture is

illustrates a perfect example where going against the grain will
Accelerator follows those state changing links it causes
specifications, either intentionally or ignorantly.
Its not just prefetching we should be thinking about. In the
paragraphs of the article. Its a little rough, but I think it
Autopilot Marketing Inc.
Version: GnuPG v1.4.2.2 (Darwin)

iD8DBQFESdZt4DfZD7OEWk0RAormAJoCDzXsNBvxdwC9VrD15Qq6OABTggCfTmaf
LQiyipOr41IhGlb2WDspZ0I=
=gRS5
-----END PGP SIGNATURE-----


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Is all the code provided?


Berlin B.
(ramaza3 on freenode)
http://www.newspiritcompany.com
http://www.newspiritcompany.com/newforums
also checkout alpha version of botverse:
http://www.newspiritcompany.com:8086/universe_home