---
title: "Using services to manage code"
description: "Episode 6 of Ruby on Rails, by Neeraj Singh."
canonical_url: "https://www.bigbinary.com/videos/learn-ruby-on-rails/using-services-to-manage-code"
markdown_url: "https://www.bigbinary.com/videos/learn-ruby-on-rails/using-services-to-manage-code.md"
---

# Using services to manage code

Episode 6 of Ruby on Rails, by Neeraj Singh.

## Details

- Series: Ruby on Rails Videos
- Duration: 14:51
- Published: February 5, 2016
- [Watch on YouTube: https://www.youtube.com/watch?v=Mkx5qjFvQ_o](https://www.youtube.com/watch?v=Mkx5qjFvQ_o)

## Notes

- In all our applications we have a directory called app/services. In this
  directory we put all kinds of services. Now what’s a service.
- A service is anything that a model should not be concerned about. Like How to
  send SMS, how to deliver email, making call to external service, parsing CSV
  file. It all depends on the application what should be in the model and what
  should be in the services.
- The additional job of services is to keep model thin and manageable by
  extracting certain business rule into a service in itself.
- [7 Patterns to refactor fat Active Record models](http://blog.codeclimate.com/blog/2012/10/17/7-ways-to-decompose-fat-activerecord-models/)

## Links

- [Human page](https://www.bigbinary.com/videos/learn-ruby-on-rails/using-services-to-manage-code)
