How do I construct a thin controller with a dependent service?
ContainerInjectionInterface is used as a part of a static factory method pattern.

This way, a class's constructor can specify all of the services it needs, and its factory method, in this case create(), can satisfy the constructor by retrieving services from the container.

The instantiated controller should never have its own copy of the container, if at all avoidable.

A brief example:

&lt;?php

namespace Drupal\book\Controller;

use Drupal\book\BookManager;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

class BookController extends ControllerBase implements ContainerInjectionInterface {
  protected $bookManager;

  public function __construct(BookManager $bookManager) {
    $this-&gt;bookManager = $bookManager;
  }

  public static function create(ContainerInterface $container) {
    return new static(
      $container-&gt;get('book.manager')
    );
  }

  public function bookRender() {
    $book_list = array();
    foreach ($this-&gt;bookManager-&gt;getAllBooks() as $book) {
      $book_list[] = l($book['title'], $book['href'], $book['options']);
    }
    return array(
      '#theme' =&gt; 'item_list',
      '#items' =&gt; $book_list,
    );
  }
}


This would be declared as a controller in a routing file like this:

_content: \Drupal\book\Controller\BookController::bookRender