I am developing an application with Sprintboot + REST + Angular. While I am working on the REST API, I am trying to design as RESTful as possible. I'm encountering certain pages where the Angular UI must send multiple requests to the service to display the page like a User Approval page. I'm worried this would slow down the application or create complexity in Angular code base. Should I just have an end point /orderapproval that would do every thing related to order approval functionality or have bunch of APIs that need to be called for like /order /inventory /user etc. It is awful to consider /orderapproval as a REST API. But is it acceptable to just work as an API for applications that have both Back End and UI running in same web server.

  • 1
    Not sure if complete duplicate of programmers.stackexchange.com/questions/224373/… but trying to read more minds as Angular has developed in last 2 years.
    – TechCrunch
    Feb 10, 2016 at 22:18
  • I think the crux of this problem comes down to the following statement: "I am trying to design as RESTful as possible" Can you explain why that is? The answer to your question is likely follow on from your explanation. Feb 10, 2016 at 23:21
  • Just in a hypothetical situation when I've to expose the API to a third party who want to construct their own UI.
    – TechCrunch
    Feb 11, 2016 at 5:03

1 Answer 1


To answer your question directly. No, a pure RESTful web service is not required for an angularjs app. It will work just fine with more RPC like interfacing also.

I would never recommend anyone to pursue pure RESTfulness, especially the HATEOAS part is just a waste of time and effort. Noone will work with your API that dynamically. Until you have concrete requirements in this area I would stay far away from it.

I prefer a 'back-end for front-end' strategy, if you need a 'orderapproval' resource cause it would help reduce the amount of chatting with the back-end that would be more then fine.

Building one web app and simultaneously a 'generic general purpose Web API' is a really hard thing to do, I typically recommend customers against this strategy.

The general purpose Web API is really something you should look at separately or something that could emerge after your 3rd app using a common interface.

  • Thank you for making this comment. Would have done it this way if it were 6 months earlier. Already halfway in the project and decided to do RESTful as much as possible and doing RPC like interface wherever it gets complex.
    – TechCrunch
    Jul 24, 2016 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.