title: How can I represent this scenrio using Domain Driven Design
body: <p>I have been reading up Domain Driven Design and what they talk about seem to be exactly the opposite of what I have been doing the last ten years. Like a normal developer I was with the idea the following was a good clean architecture</p>
  
  <blockquote>
    <p>client app -> Remote Facade -> Services Layer -> Data Store.
    Domain is something that is shared across all different layers</p>
  </blockquote>
  
  <p>All the DDD experts seem to vehemently oppose this idea. Am trying to wrap my head around applying DDD to a simple problem explained below</p>
  
  <p>Let us say the domain is Human Resources department</p>
  
  <p>The domain (ubiquitous language as they call it) would contain things like</p>
  
  <blockquote>
    <p>Employee, Manager, Salary, Bonus, Incentive, WorkHours etc</p>
  </blockquote>
  
  <p>A store (in my case releational) with tables corresponding to the domain mentioned above</p>
  
  <blockquote>
    <p>Table Employee, Table Manager, Table Bonus</p>
  </blockquote>
  
  <p>Calculations using these domain objects</p>
  
  <blockquote>
    <p>CalculateBonus, CalculateWorkHours, CalculateSalary, ProcessPay, CalculateVacationLeft etc.</p>
  </blockquote>
  
  <p>And ofcourse there is UI, in which the user (what he/she can do is based on roles) can do</p>
  
  <blockquote>
    <p>Login, Add a new Employee, Make an employee manager, Add incentive to
    a manager etc.</p>
  </blockquote>
  
  <p>I have laid those things out to the best of my knowledge. With that particular context in mind, here are my questions</p>
  
  <ol>
  <li><p>DDD talks about domain and business logic existing together. Does this mean my Domain objects like Employee and Manager should contain logic like (calculateDiscount or calculateVacationLeft)? I have always separated out those logic into some sort of service, is that a bad idea? (Some even go to the extent of saying CRUD can also be part of the domain_</p></li>
  <li><p>What is the business logic in this scenario? Is CalculateBonus() a business logic or application logic? and where should it actually reside?</p></li>
  <li><p>Is applying DDD for a simple problem even worth it?</p></li>
  </ol>
  
  <p>I wanted this to be a short post, but ended up being long. I hope to have a good discussion around this</p>
  
  <p>Thanks
  Kay</p>