title: What are the differences of using service pattern and using standalone repository Spring Data REST?
body: <p>What are the differences of using Spring Data REST repository alone and implementing the “service” pattern around it (that is <code>ItemService</code>, <code>ItemServiceImpl</code> and so on)?</p>
  <p>At the first glance the functionality is more or less the same with the difference that the service approach allows for a better customization but it also produces loads of boilerplate code (the implementation and the controller). Here is <a href="https://github.com/odrotbohm/spring-restbucks/tree/master/server/src/main/java/org/springsource/restbucks/payment" rel="noreferrer">an example</a> (look <code>Payment</code> and <code>CreditCard</code> entities) of using both approaches - RESTBucks of Oliver Drotbohm.</p>
  <p>The payment abstraction there uses the &quot;service&quot; pattern used (PaymentService, PaymentImpl and then PaymentController with all methods in web folder) while the orders are exposed via Spring Data REST directly.</p>