Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8598805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:14:33+00:00 2026-06-12T01:14:33+00:00

we are planning a REST api for our application and are trying to make

  • 0

we are planning a REST api for our application and are trying to make
a decision on if we should implement separate controllers for the REST
functionality or not.

We could use the withFormat{} in our current controllers but
separating the REST functionality in different controllers feels
somewhat cleaner..

In that way we can build our API seperate from the current controllers
and we could even take the REST controllers into another application
etc.

Any thoughts on this subject? Any real world experience in what the
best practice would be?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:14:34+00:00Added an answer on June 12, 2026 at 1:14 am

    We recently faced the same decision and we decided to go for separate controllers for the REST API.

    Advantages of separate controllers include cleaner/clearer controller actions and the possibility to support different versions of the REST API later on.

    We also would like to keep the option to host the REST API on separate server instances open. These servers would use exactly the same .war, but with different configuration settings for the feature toggles.

    A disadvantage of separate controllers might be the DRYness of the controller code. Although this should be limited, since IMHO you should keep the controllers as thin as possible and extract shared logic to Grails services or helper classes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm planning to make a WCF rest api but I am confused about something.
Planning to migrate our existing application to Azure. Our existing architecture with security flow
I'm planning a site with Django and Tastypie for the REST API, and I'm
I'm planning to make an API (as a web service) for validating user input.
I'm in the process of planning an application that would make use of the
I am planning a REST interface for an iOS app with Restify + Nodejs
Planning to create a new website for our product using ASP.NET MVC 4. Site
Currently planning on making the installation process for a .NET application I'm selling smoother
I planning to split my systems into front-end and back-end. Currently my application directly
Iam planning to create an app, and not to publish it at the google

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.