O'Reilly logo
  • Patryk Sagan thinks this is interesting:

For example, a comment thread or discussion could exist across many pages of a site. Instead of using a partial in the application to render HTML, a call could be made to a comment service that renders the full HTML snippet for the comments section of the page. Generally, services are responsible for data and business logic. However, in applications that contain many pages, it may be necessary to split the partial page rendering out into services that can be run and tested independently.


Cover of Service-Oriented Design with Ruby and Rails


Services can return html