title: DDD in SF3 folder structure
body: <p>I am thinking through an ad website where Users can login, post new Listings and search existing ones. I am going to make this my first project following DDD principles completely. I have never done any DDD in Symfony before.</p>
  
  <p>Below are my thoughts about this. Could you please tell me if this is correct and advice on better ways?</p>
  
  <p>I can see two domains: User and Listing</p>
  
  <p>Searching/displaying/posting functionality will live in Listing domain. Logging in/out live in a User domain. </p>
  
  <p>SF3 directory example structure is</p>
  
  <pre><code>app/
     ListingBundle/
        src/
           Listing.php
           SearchService.php
           ListingRepositoryInterface.php
           Controller/
              public/
                 ListingController.php
              protected/
                 ListingController.php
           Resource/
             view/
                public/
                   detail.twig.html
                protected/
                   edit.twig.html
  
     UserBundle/
        src/
           User.php
           AuthService.php
           UserRepositoryInterface.php
           Controller/
              public/
                 UserController.php
              protected/
                 UserController.php
           Resource/
             view/
                public/
                   login.twig.html
                protected/
                   dashboard.twig.html
  
     PersistenceBundle
         src/
            UserRepository.php
            ListingRepository.php
  </code></pre>
  
  <p>My main questions are:</p>
  
  <ul>
  <li>Is this structure correct?</li>
  <li>Is it a good idea to have separate protected and public controllers with the same name?</li>
  <li>Where do things go like a page on the User backend part of the website showing recent Listings posted by the User? Where is the boundary between those two domains?</li>
  <li>Is PersistenceBundle a good idea or should I have persistence live inside User and Listing bundle? </li>
  </ul>