What's the use RestfulController and why doesn't scaffold controllers extend it

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

What's the use RestfulController and why doesn't scaffold controllers extend it

aldrinm
What's the use of grails.rest.RestfulController. When do you extend it? I've noticed that the generated scaffold controllers do not extend it.

thanks
Reply | Threaded
Open this post in threaded view
|

Re: What's the use RestfulController and why doesn't scaffold controllers extend it

bobbywarner
It is simply a base class that can be extended to get the basic CRUD operations needed for a RESTful API without including all the default actions in your controllers.

You should extend RestfulController when you want to modify behavior of some of the actions, but still use the default implementation provided for others or you want to add additional actions beyond what is provided.

If you are going to customize most or all of the actions, then there is no reason to extend RestfulController.


Hope that helps!
Bobby


On Fri, Dec 13, 2013 at 11:00 PM, aldrinm <[hidden email]> wrote:
What's the use of grails.rest.RestfulController. When do you extend it? I've
noticed that the generated scaffold controllers do not extend it.

thanks



--
View this message in context: http://grails.1312388.n4.nabble.com/What-s-the-use-RestfulController-and-why-doesn-t-scaffold-controllers-extend-it-tp4652455.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: What's the use RestfulController and why doesn't scaffold controllers extend it

aldrinm
Thanks Bobby. That helps. Also came across your screencast and that helped too :)