• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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?

 
You didn't tell me he was so big. Unlike this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic