title: Domain models in front end
body: <p>I have been reading about the Domain driven design lately but I rarely see it in the web applications(or I may have failed to google it), I think we now have enough complexity to deal with in web application too.</p>
  <p>I need a way to keep my models and business logic clean and least coupled and framework/library agnostic. For example today I am using AngularJS and tomorrow I may switch the UI to ReactJS.</p>
  <p>Having said that I am trying to learn this with a simple example. Suppose I am trying to create Quote application with the following features:</p>
  <p><strong>Given a Quote</strong></p>
  <ol>
  <li>Can be upvoted / downvoted.</li>
  <li>Can be starred.</li>
  <li>Can be created by User (Goes in the review Queue).</li>
  <li>An user can share it via (Twitter, Facebook etc).</li>
  </ol>
  <p><strong>Given an User</strong></p>
  <p>When not logged:</p>
  <ol start="5">
  <li>Can see random quote.</li>
  <li>Can upvote / downvote a quote.</li>
  <li>Can search a Quote by Title or Author.</li>
  </ol>
  <p>When logged in:</p>
  <ol>
  <li>Can create a Quote.</li>
  <li>Can star a quote.</li>
  </ol>
  <p>I am interested in how the above requirements can be achieved in keeping UI and business logic clean and separate.</p>
  <p>I am not an expert but at present I can come with these requirements which may well change in future.</p>