We have already seen how easy it can be to changing from one persistence strategy to another. However, the persistence is not the only edge from our Hexagon. What about how the user interacts with the application?
Your CTO has set up in the roadmap that your team is moving to Symfony2, so when developing new features in you current ZF1 application, we would like to make the incoming migration easier. That's tricky, show me your Listing 5:
class IdeaController extends Zend_Controller_Action { public function rateAction() { $ideaId = $this->request->getParam('id'); $rating = $this->request->getParam('rating'); $ideaRepository = new RedisIdeaRepository(); $useCase = new RateIdeaUseCase($ideaRepository); $response = $useCase->execute($ideaId, $rating); $this->redirect('/idea/' . $ideaId); } } interface IdeaRepository { // ... } class RateIdeaUseCase { private $ideaRepository...