# WHY Rest

**URL:** <https://www.ruby-forum.com/t/why-rest/124981>\
**Category:** Rails\
**Created:** [January 4, 2008, 9:34am UTC](https://www.ruby-forum.com/t/why-rest/124981 "2008-01-04T09:34:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 9:34am UTC](https://www.ruby-forum.com/t/why-rest/124981/1 "2008-01-04T09:34:55Z")

</div>

Should I care to design my application in RestFull manner if donot  
want to use it as a webservice.  
If yes then why? What specific advantages would it offer?

Also if i plan to use it as a web service then, using ActiveResource  
CRUD operations can be performed on the resources but suppose there is  
another another action (eg Approve) in my controller. Is it possible  
to access custom actions(approve) through Active Resource?

Pankaj

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 10:26am UTC](https://www.ruby-forum.com/t/why-rest/124981/2 "2008-01-04T10:26:30Z")

</div>

Is it enough to not type something as horrible as:

link\_to @topic.name, { :controller =\> “topics”, :action =\> “view”, :id  
=\> @  
topic.id }

when Restful Routing gives you:

link\_to @topic.name, topic\_path(@topic)

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 1:26pm UTC](https://www.ruby-forum.com/t/why-rest/124981/3 "2008-01-04T13:26:56Z")

</div>

Ryan B. said the following on 04/01/08 04:25 AM:

> Is it enough to not type something as horrible as:
> 
> link\_to @topic.name [http://topic.name](http://topic.name), { :controller =\> “topics”,  
> :action =\> “view”, :id =\> @topic.id [http://topic.id](http://topic.id) }
> 
> when Restful Routing gives you:
> 
> link\_to @topic.name [http://topic.name](http://topic.name), topic\_path(@topic)

No, its not.  
Unless you are _just_ dong a CRUD.

Anything with more complex actions (a wiki: search, attach, roll-back,  
access control …; a game: many functions!) you ARE going to have to  
specify the actions and quite possibly the controller.

The benefits of Rest are far from clear.  
Or perhaps I should say they are far from being stated well and clearly  
and in a form that allows them to be applied situations beyond the basic  
CRUD.

No doubt there are, to quote a famous novel and movie “minds superior to  
(this) man’s” that can and do use REST in more general situations.  
Perhaps they could explain it to us duffers and newbies, then.

But to date, for all my drilling down (“google is you .. if not friend  
then a least ally”), I find a lot of “its great stuff” from people who  
have simplified applications but very little details of the “HOW”.

–  
The state can’t give you free speech, and the state can’t take it away.  
You’re born with it, like your eyes, like your ears. Freedom is  
something you assume, then you wait for someone to try to take it away.  
The degree to which you resist is the degree to which you are free…  
–Utah Phillips

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 3:32pm UTC](https://www.ruby-forum.com/t/why-rest/124981/4 "2008-01-04T15:32:54Z")

</div>

Use a separate controller for searching. Then it can be place in the  
restful way too. Then you have separated searching out from the other  
controllers.

On Jan 4, 2008 6:33 AM, Jason R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > :action =\> “view”, :id =\> @topic.id [http://topic.id](http://topic.id) }  
> > > access control …; a game: many functions!) you ARE going to have to
> > 
> > The state can’t give you free speech, and the state can’t take it away.  
> > making a web-service-like website, but more of what thinking RESTfully does
> > 
> > Jason
> > 
> > > >

## – Amos K. A. King Software Development and Consulting, L.C. [http://dirtyInformation.com](http://dirtyInformation.com)

Looking for something to do? Visit [http://ImThere.com](http://ImThere.com)

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 4:04pm UTC](https://www.ruby-forum.com/t/why-rest/124981/5 "2008-01-04T16:04:01Z")

</div>

Amos K. said the following on 04/01/08 09:31 AM:

> Use a separate controller for searching. Then it can be place in the  
> restful way too. Then you have separated searching out from the other  
> controllers.

## While that’s plausible, I still don’t see how it makes sense. Please see may later reply to Jason. I don’t see what advantage this has over putting the search code in ‘lib/search.rb’.

“Current economics is merely refining the obsolete. Economic theory is  
still based on the scarcity axiom, which doesn’t apply to information.  
When I sell you a phone, I no longer have it. When I sell information  
to you, I have more information by the very fact that you have it and I  
know you have it. That’s not even true of money.”  
– Peter Drucker, WiReD6.03 Mar-1998

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 1:35pm UTC](https://www.ruby-forum.com/t/why-rest/124981/6 "2008-01-04T13:35:42Z")

</div>

On Jan 4, 2008 7:26 AM, Anton J Aylward [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ## CRUD.
> 
> The state can’t give you free speech, and the state can’t take it away.  
> You’re born with it, like your eyes, like your ears. Freedom is  
> something you assume, then you wait for someone to try to take it away.  
> The degree to which you resist is the degree to which you are free…  
> –Utah Phillips
> 
> >

REST, and especially Rails REST, is quite capable of specifying new  
actions  
for resources. Aka, search\_topics\_url() will call the #search method on  
the  
TopicsController ( with map.resources :topics, :collection =\> {:search  
=\>  
:get} ). In my months of learning to do a more RESTful site, I’ve found  
out  
that it’s not about making a web-service-like website, but more of what  
thinking RESTfully does to your design.

In short, RESTful web design is cleaner and much easier to understand.  
It  
keeps your controllers small and the logic seperated out. So instead of  
one  
massive WikiController, you’d have a WikiController, TopicController,  
AccountController, etc, which is much easier on: future developers of  
the  
product, people trying to bookmark parts of the wiki, the webserver for  
not  
having to deal with so much code at once, etc. It’s just a good idea.

Give it a try, you’ll see what I mean.

Jason

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 4:29pm UTC](https://www.ruby-forum.com/t/why-rest/124981/7 "2008-01-04T16:29:54Z")

</div>

Amos K. said the following on 04/01/08 09:31 AM:

> Use a separate controller for searching. Then it can be place in the  
> restful way too. Then you have separated searching out from the other  
> controllers.

??  
And why not have separate controllers for ‘edit’ and ‘tag’ and ‘attach’  
and view’ and …

Sorry. I don’t see it.

–  
Never forget: The road to Hell is paved with good intentions.  
So tread hard on good intentions. – rjd4

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 4:45pm UTC](https://www.ruby-forum.com/t/why-rest/124981/8 "2008-01-04T16:45:06Z")

</div>

You can add custom methods to a REST controller, and any custom method  
is usually GET unless it’s destructive (POST) or edits a resource  
(PUT).

REST allows you to have a conventional layout to your controllers,  
expose web services easily, get nice named routes in Rails (including  
for your custom methods), and because of its conventional layout, you  
can abstract it very easily (e.g., make\_resourceful reduces the CRUD  
portion of your controllers to 4 lines rather than 100).

If you’re concerned about your URLs, then customize the routing.  
There’s nothing saying you can’t have routing aliases for browser  
clients of your RESTful actions so long as the RESTful one is still  
available for web services.

–Jeremy

On Jan 4, 2008 10:03 AM, Anton J Aylward [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > ```
> > out. So instead of one massive WikiController, you'd have a
> > 
> > ```
> 
> I’ve plugged “restful authentication” into my wiki and that’s fine  
> and you don’t ‘delete’ a topic you ‘rename’ it to the waste-bin Web.  
> like a “fashion” and “proof by assertion”. As I’ve said, there are blog
> 
> for ‘rename’.)  
> Do you want the truth, or a well-designed machination brought  
> into existence solely for the stroking of your ego?  
> – Empty [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) on alt.goth
> 
> >

–

> **[Jeremy McAnally](http://www.jeremymcanally.com/)**

My books:  
Ruby in Practice

> **[Ruby in Practice - Jeremy McAnally and Assaf Arkin](https://www.manning.com/books/ruby-in-practice)**
>
> Like Ruby itself, Ruby in Practice will make you more productive. The book shows you practical techniques and strategies for small projects and large-scale…

My free Ruby e-book

> **[Site not found · DreamHost](http://www.humblelittlerubybook.com/)**
>
> The owner of this domain has not yet uploaded their website.

My blogs:

> **[Site not found · DreamHost](http://www.mrneighborly.com/)**
>
> The owner of this domain has not yet uploaded their website.

[http://www.rubyinpractice.com/](http://www.rubyinpractice.com/)

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 4:04pm UTC](https://www.ruby-forum.com/t/why-rest/124981/9 "2008-01-04T16:04:01Z")

</div>

Jason R. said the following on 04/01/08 07:33 AM:

> ```
> much easier on: future developers of the product, people trying to
> bookmark parts of the wiki, the webserver for not having to deal
> with so much code at once, etc. It's just a good idea.
> 
> Give it a try, you'll see what I mean.
> 
> ```

I have and I don’t.  
Obviously I “don’t get it”.

I’ve plugged “restful authentication” into my wiki and that’s fine  
because its compartmentalized, but the rest of the wiki works entirely  
on urls of the form

```
      http://hostname.com/Webname/TopicName

```

with an optional “/:action” - edit, history … you know the rest  
(sorry, I can’t resists puns)

Intrinsically there ARE methods. Strictly speaking there isn’t even  
CRUD, since editing a previously non existent topic causes its creation  
and you don’t ‘delete’ a topic you ‘rename’ it to the waste-bin Web.

So there’s WikiController and no TopicController or WebController. (Oh,  
there was when experimenting and as an admin interface, but they are  
long gone, their function wasn’t relevant to the wiki interface.)

The authentication function is completely orthogonal to the Wiki space  
so having ‘/login’ and ‘/register’ is not an issue.

You say “RESTful web design is cleaner and much easier to understand”  
but I don’t see that. So many people say that and its getting to sound  
like a “fashion” and “proof by assertion”. As I’ve said, there are blog  
postings where people claim this simplification by don’t show the ‘how’  
and don’t show it in a way that I can learn from the process.

Now and in the past I’m thinking in terms of what the application looks  
like to the user. Navigating the wiki, the wiki’s functionality is one  
thing and the ‘login/registration’ is a “popup” (if only I could get  
popups to work the way I want) in the workflow (aka “You need to login  
to access this topic” type popups). This has led me to think in terms  
of the routing and the mapping of the actions, of which there are many  
beyond CRUD.

So, even if I somehow REST-ificate the WikiController, how do I decide  
what GET/PUT are ‘history’, ‘alter metadata’, ‘diff r1=n, r2=m’, rename,  
‘search’, ‘upload’, ‘view attachment’ and so on.

Please, I’m seeking a methodology and approach. I’d love to have a  
simpler WikiController. I’d love to have a UiController that handles  
the commonality of access control, dealing with exceptions and so on  
(right now its 'lib/ui\_wrapper.rb) that ‘view’, ‘edit’ and so on are  
parameters for (modules?). But what value of WebController or  
TopicController? (All I can see for them is web services to give lists  
for ‘rename’.)

I’m sorry, Jason, without some explanation it all seems like “proof by  
assertion” or “the latest fashion” to me.

I’m finding this very frustrating since I can’t see how this is relevant  
to me without a lot of jigging the routing, like you illustrate, Jason.  
At which point I say “Why bother? How is this different from what I’m  
doing now with all the methods?”

–  
Do you want the truth, or a well-designed machination brought  
into existence solely for the stroking of your ego?  
– Empty [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) on alt.goth

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 6:00pm UTC](https://www.ruby-forum.com/t/why-rest/124981/10 "2008-01-04T18:00:33Z")

</div>

On Jan 4, 2008, at 9:03 AM, Anton J Aylward wrote:

> I have and I don’t.  
> Obviously I “don’t get it”.

Just an observation: you seem really confrontational about REST.  
That’s going to make it hard to get people to answer you.

But, here’s my take on it.

Following the RESTful patterns gives you immediate benefits and long-  
term benefits.

Immediate benefits:

- Web services for basically free
- Cleaner controllers, although possibly more of them
- Easier maintenance for future developers, because of following  
the conventions

Long-term benefits:

- By thinking in terms of resources, you end up composing your  
application differently. Lots of people have found, through  
real experience,  
that this “different” is better, for them.
- ^^ this gets more and more obvious over time.

The reason you’re getting lots of “try it, you’ll like it” is because  
this isn’t an obvious “X is better than Y because Z”. It’s more,  
“Man, I did Y, and I really felt like things went better than when I  
did X.”

If you want to honestly find out more about the experiences of people  
who have used RESTful patterns and found value from them, I’m more  
than happy to go into more detail.

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 5:16pm UTC](https://www.ruby-forum.com/t/why-rest/124981/11 "2008-01-04T17:16:53Z")

</div>

Jeremy McAnally said the following on 04/01/08 10:44 AM:

> You can add custom methods to a REST controller, and any custom method  
> is usually GET unless it’s destructive (POST) or edits a resource  
> (PUT).

OK, so back to my wiki. The ‘edit’ is the only thing there, nothing  
destructive.

> REST allows you to have a conventional layout to your controllers,

You don’t mean ‘/views/layouts’? So what does ‘conventional’ mean in  
this context? (more below)

> expose web services easily,

What if I don’t HAVE them? Why bother?

> get nice named routes in Rails (including for your custom methods),

Let me try again: I don’t WANT what I’ve seen as nicely named routes  
I don’t WANT URLs like

[http://example.com/web/Webname/topic/TopicName](http://example.com/web/Webname/topic/TopicName)  
or ‘id’ instead of ‘name’

As I said, apart from out-of-ban things like login its just

[http://example.com/Webname/TopicName[?params]](http://example.com/Webname/TopicName%5B?params%5D)

> and because of its conventional layout, you  
> can abstract it very easily (e.g., make\_resourceful reduces the CRUD  
> portion of your controllers to 4 lines rather than 100).

But I don’t see what I’m trying to address as ‘conventional CRUD’.  
As I said at the beginning, I understand RESTfulnesss for that  
invoice-item type, CRUD type applications, but there are a lot of web  
based things that don’t follow that model. Wikis and games being a few.

> If you’re concerned about your URLs, then customize the routing.

I am. And its very simple. Just one line. (see above)

> There’s nothing saying you can’t have routing aliases for browser  
> clients of your RESTful actions so long as the RESTful one is still  
> available for web services.

Amos K. suggested what seems to be mapping each method onto a  
controller. That doesn’t make sense to me either.

I can understand a Search Controller in the context of a page with a  
form for the search parameters then submitted to that controller, but  
its still drawing on the basic wiki functionality for rendering, so why  
bother.

If a search is embedded in a page (see TWiki, Xwiki, MoinMoin and many  
other wikis) then I can’t see it being a web service instead of a  
library utility. The Search Page calls this library too. So why bother  
with the controller to move the code out of the WikiController?

If I have a search controller to move the search code out of the  
WikiController (where it wasn’t in the first place 'cos it was in a  
library) the its only going to have one method.

So why, reductio ad absurdem, don’t I convert everything that is a  
method in the WikiController into a controller with one method, get rid  
of the WikiController and do everything from  
‘app/controllers/Application.rb’ ?

Let me ask all this another way.  
I’ve asked this before in another wording and got no reply.

The user tries to ‘view’ a page. The WikiController’s ‘view’ method  
gets to the point where it finds the topic and checks accessibility.  
Right now if a login is required to view that page it does a redirect  
with return-to to the login page. Its irrelevant whether the login  
mechanism is RESTful or not. I’ve installed ‘restful authentication’  
and its happy with the redirect & return-to, as was the old acts\_as ..  
with no RESTful-ness. So what’s the benefit?

Please don’t say ‘extending functionality’. I pasted in code to do p/w  
change into both versions of the authenticator with ease.

Can I do some magic pop-up with ‘restful authentication’ that I couldn’t  
with the old version? I’ve asked about that as well and again got no  
reply. Wouldn’t a popup authenticator be a ‘web service’ of some kind?

–  
“I think there is a world market for about five computers.”  
Thomas J. Watson, chairman of the board of IBM, 1943

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 6:02pm UTC](https://www.ruby-forum.com/t/why-rest/124981/12 "2008-01-04T18:02:18Z")

</div>

> OK, so back to my wiki. The ‘edit’ is the only thing there, nothing  
> destructive.

OK, so it’s a GET request. A web service usually won’t ever call edit  
because it doesn’t need a form; it will submit XML representations  
straight to create/update.

> You don’t mean ‘/views/layouts’? So what does ‘conventional’ mean in  
> this context? (more below)

No, I don’t.

> 

I don’t mean on the front end; I mean things like `wiki_entry_path` or  
`edit_user_path`. It makes your code MUCH cleaner.

> But I don’t see what I’m trying to address as ‘conventional CRUD’.  
> As I said at the beginning, I understand RESTfulnesss for that  
> invoice-item type, CRUD type applications, but there are a lot of web  
> based things that don’t follow that model. Wikis and games being a few.

Right, but if you have resources (e.g., entries, pages, users), then  
you can use it. No one is forcing you to use it. It’s just an  
easier, cleaner way to structure your application.

> I am. And its very simple. Just one line. (see above)

OK, keep that line. Problem solved.

> other wikis) then I can’t see it being a web service instead of a  
> library utility. The Search Page calls this library too. So why bother  
> with the controller to move the code out of the WikiController?

You don’t have to. You can have a search method on WikiController.  
Nothing is stopping you.

> Please don’t say ‘extending functionality’. I pasted in code to do p/w  
> change into both versions of the authenticator with ease.
> 
> Can I do some magic pop-up with ‘restful authentication’ that I couldn’t  
> with the old version? I’ve asked about that as well and again got no  
> reply. Wouldn’t a popup authenticator be a ‘web service’ of some kind?

You’re completely missing the point of REST. I’m not even sure what  
you’re asking there. The benefit of REStful Authentication is that  
clients that aren’t web browsers can create a session and access  
resources just like a browser. The point is extending functionality  
or something. It’s giving things a structure that is consistent and  
accessible by clients without a lot of overhead and complicated API.

ActiveResource is one such client. If I’m making a remote client to  
your wiki, I will need to create an ActiveResource model for Session,  
Entry, and so on. When I try to access an Entry that I don’t have  
permission for, your app will throw me a permission denied error.  
Then my app will know to create a Session (through REST, mind you, so  
using POST to create with the right params) and then continue on with  
what it was doing. If this was a random RPC interface, I’d have all  
kinds of socket madness going on and parsing of XML by hand and so on.

If you’re not convinced by now, then perhaps you need to read a book  
or article or just not worry about it. REST may offer no benefit to  
you.

–Jeremy

–

> **[Jeremy McAnally](http://www.jeremymcanally.com/)**

My books:  
Ruby in Practice

> **[Ruby in Practice - Jeremy McAnally and Assaf Arkin](https://www.manning.com/books/ruby-in-practice)**
>
> Like Ruby itself, Ruby in Practice will make you more productive. The book shows you practical techniques and strategies for small projects and large-scale…

My free Ruby e-book

> **[Site not found · DreamHost](http://www.humblelittlerubybook.com/)**
>
> The owner of this domain has not yet uploaded their website.

My blogs:

> **[Site not found · DreamHost](http://www.mrneighborly.com/)**
>
> The owner of this domain has not yet uploaded their website.

[http://www.rubyinpractice.com/](http://www.rubyinpractice.com/)

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 7:59pm UTC](https://www.ruby-forum.com/t/why-rest/124981/13 "2008-01-04T19:59:00Z")

</div>

I don’t see what extra work you were having to do; I can write a  
RESTful app far faster than I could write a “regular” CRUD  
application.

Maybe it’s just because I’m used to it now or something.

–Jeremy

On Jan 4, 2008 1:18 PM, Mark W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m definitely missing something. 🙂
> 
> ///ark
> 
> >

–

> **[Jeremy McAnally](http://www.jeremymcanally.com/)**

My books:  
Ruby in Practice

> **[Ruby in Practice - Jeremy McAnally and Assaf Arkin](https://www.manning.com/books/ruby-in-practice)**
>
> Like Ruby itself, Ruby in Practice will make you more productive. The book shows you practical techniques and strategies for small projects and large-scale…

My free Ruby e-book

> **[Site not found · DreamHost](http://www.humblelittlerubybook.com/)**
>
> The owner of this domain has not yet uploaded their website.

My blogs:

> **[Site not found · DreamHost](http://www.mrneighborly.com/)**
>
> The owner of this domain has not yet uploaded their website.

[http://www.rubyinpractice.com/](http://www.rubyinpractice.com/)

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 8:08pm UTC](https://www.ruby-forum.com/t/why-rest/124981/14 "2008-01-04T20:08:24Z")

</div>

On Jan 4, 10:58 am, “Jeremy McAnally” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I don’t see what extra work you were having to do

The work would be to convert a working application to REST. I really  
should do it anyway, then maybe I’d get a better feel for REST’s  
advantages. But at the time, I couldn’t see a justification for doing  
that work instead of putting the time toward some other facet of the  
app. But thanks for the push. I’ll convert it today. Should take like  
an hour, tops?

///ark

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 9:25pm UTC](https://www.ruby-forum.com/t/why-rest/124981/15 "2008-01-04T21:25:02Z")

</div>

Mark W. said the following on 04/01/08 01:18 PM:

> I don’t “get” REST, either. Web service for free? Great - if you need  
> a web service. Skinnier controls? Nonsense. Model stuff should go in  
> the model - it doesn’t matter whether you’re using REST.
> 
> The thing is, though, that almost all the smart people I know like  
> REST. That’s indicative, and I’m going to try to keep an open mind.  
> But at one point I made up my mind to convert my app to REST, and I  
> couldn’t for the life of me see any justification for doing the work.
> 
> I’m definitely missing something. 🙂

## Thank you so much, Mark. You’ve expressed a few points that I’ve omitted.

If God had intended Man to Watch TV, He would have given him Rabbit  
Ears.

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 7:19pm UTC](https://www.ruby-forum.com/t/why-rest/124981/16 "2008-01-04T19:19:01Z")

</div>

I don’t “get” REST, either. Web service for free? Great - if you need  
a web service. Skinnier controls? Nonsense. Model stuff should go in  
the model - it doesn’t matter whether you’re using REST.

The thing is, though, that almost all the smart people I know like  
REST. That’s indicative, and I’m going to try to keep an open mind.  
But at one point I made up my mind to convert my app to REST, and I  
couldn’t for the life of me see any justification for doing the work.

I’m definitely missing something. 🙂

///ark

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 9:26pm UTC](https://www.ruby-forum.com/t/why-rest/124981/17 "2008-01-04T21:26:15Z")

</div>

Jeremy McAnally said the following on 04/01/08 12:01 PM:

> It’s just an  
> easier, cleaner way to structure your application.

OK, but HOW?

–  
Skill without imagination is craftsmanship and gives us many useful  
objects such as wickerwork picnic baskets. Imagination without skill  
gives us modern art.  
– Tom Stoppard

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 9:26pm UTC](https://www.ruby-forum.com/t/why-rest/124981/18 "2008-01-04T21:26:51Z")

</div>

Jeremy McAnally said the following on 04/01/08 12:01 PM:

> I don’t mean on the front end; I mean things like `wiki_entry_path` or  
> `edit_user_path`. It makes your code MUCH cleaner.

## ‘Named routes’? Surely you don’t need RESTful design for that. I have named routes anyway.

If the errors of the past were good enough for  
our ancestors, they re good enough for us!

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 9:28pm UTC](https://www.ruby-forum.com/t/why-rest/124981/19 "2008-01-04T21:28:01Z")

</div>

Michael D. Ivey said the following on 04/01/08 11:58 AM:

> On Jan 4, 2008, at 9:03 AM, Anton J Aylward wrote:
> 
> > I have and I don’t.  
> > Obviously I “don’t get it”.
> 
> Just an observation: you seem really confrontational about REST.

I’m sorry if I seem confrontational; I’m just frustrated on a number of  
counts.

Over the past months I’ve asked more specific questions that are related  
to this and not got any answers. None.

And as I say, I see plenty of “isn’t it great” postings in blogs but  
very little that actually explains how to transform anything beyond a  
CRUD.

And it all seems to be coming out at once.

Surely I can’t be the only person so afflicted?

–  
It is against the grain of modern education to teach children to  
program. What fun is there in making plans, acquiring discipline in  
organizing thoughts, devoting attention to detail, and learning to be  
self-critical?  
– Alan Perlis

---

<div class="post-metadata">

**Author:** ![pankaj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Post date:** [January 4, 2008, 9:34pm UTC](https://www.ruby-forum.com/t/why-rest/124981/20 "2008-01-04T21:34:27Z")

</div>

No but you get a bunch of them generated for free.

Why _not_ use them?

–Jeremy

On Jan 4, 2008 3:26 PM, Anton J Aylward [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > >
> 
> our ancestors, they re good enough for us!
> 
> >

–

> **[Jeremy McAnally](http://www.jeremymcanally.com/)**

My books:  
Ruby in Practice

> **[Ruby in Practice - Jeremy McAnally and Assaf Arkin](https://www.manning.com/books/ruby-in-practice)**
>
> Like Ruby itself, Ruby in Practice will make you more productive. The book shows you practical techniques and strategies for small projects and large-scale…

My free Ruby e-book

> **[Site not found · DreamHost](http://www.humblelittlerubybook.com/)**
>
> The owner of this domain has not yet uploaded their website.

My blogs:

> **[Site not found · DreamHost](http://www.mrneighborly.com/)**
>
> The owner of this domain has not yet uploaded their website.

[http://www.rubyinpractice.com/](http://www.rubyinpractice.com/)

[Next page](https://www.ruby-forum.com/t/why-rest/124981.md?page=2)
