title: A CMS have multiple modules with same functional, as manage comments and categories. What should I do to avoid duplicate code?
body: <p>I am developing a CMS based on Zend Framework which have many modules, for example News and Gallery.
  Each module has some part with same function as manage categories and comments (Categories and comments for News, Photos, Albums - cames from News and Gallery modules - are separate).
  Can somebody give me the advise to avoid making duplicate code? </p>
  
  <p>Thanks.</p>