In many cases, uniting routing with admin path definition makes things easier, but not when it comes to Views because their routes are generated dynamically. The solution I have come up with is to use a RouteSubscriber.
If you are trying to get to grips with Dependency Injection in Drupal 8 then here is a walk-through of how I applied it in one of my Drupal 8 test projects.
I have a project I have been using to investigate Drupal 8 since alpha10 which has been invaluable in my learning process. But as a result, some of my code is over 2 years old and written when I barely had a grasp of Drupal 8 concepts.
In the past week a very old @todo jumped out to me:
Welcome to part two of our miniseries on Drush commands! Do check out part one if you haven't already. There you'll see what we've been up to with our pretend module, my_awesome_module.
If you're writing a custom Drush command, it's pretty much guaranteed that you're needing to do something more complicated than write 'Hello World' to your database 5,000 times. Let's take a look at some Drush essentials.