• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Spring In Action: Spring REST services vs JAX-RS

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Craig,

I'm developing a single page application using angular.js and it communicates with the server using REST web services. I'm new to spring and wondering if I should use spring REST services or JAX-RS. What are the pros and cons for both?
 
author
Posts: 422
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Either choice is fine, but I'm biased toward Spring MVC for REST. That's because Spring MVC integrates *completely* with the rest of the Spring platform. Many JAX-RS implementations do integrate with Spring, but it's hit-n-miss on how well they integrate.

Certainly, the programming models for Spring MVC and JAX-RS are different, but they're more similar than they are different. Given that I have the richness of the rest of the Spring platform at my disposal, I favor Spring MVC. That said, another valid option is to use Spring Data REST to automatically expose Spring Data repositories as REST APIs...an option that may make sense for a great number of API needs.


D Tom wrote:Hi Craig,

I'm developing a single page application using angular.js and it communicates with the server using REST web services. I'm new to spring and wondering if I should use spring REST services or JAX-RS. What are the pros and cons for both?

 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic