<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi Pranav,<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 10/12/2016 04:36 AM, Pranav Gore
      wrote:<br>
    </div>
    <blockquote
cite="mid:CADriryZDauCx+Y5Z17+4+vnEPdhh-_Lr9Uq9cnLoCSt2MyZzQA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div> When we say a system-layer., is it a bunch of related
              packages ? Or a layer is a package.<br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    No, a layer is more abstract: for example the API layer would take
    care of handling json requests via htttp, the database layer stores
    things in the db. The characteristics of a layered approach is that
    you can only call things from layers "beneath" you, not above you.
    The package structure must follow this layering to some extent in
    order for build system to know what to compile first. <br>
    Structuring a system in layers is a design choice we are free to
    make or not. Layering imposes certain restrictions on the code you
    write. The reason you would want those restrictions is to separate
    the system into parts with controlled interfaces. This reduces
    coupling between the layers. Code with uncontrolled coupling
    everywhere is what is generally referred to as "spaghettig code". It
    gets hard to change and to understand the possible consequences.<br>
    <br>
    <blockquote
cite="mid:CADriryZDauCx+Y5Z17+4+vnEPdhh-_Lr9Uq9cnLoCSt2MyZzQA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>@Thomas, is <a moz-do-not-send="true"
                href="https://github.com/almighty/almighty-core/issues/110">this
                (#110)</a> existing architecture issue for the same ? If
              yes, I will update the same.<br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Issue #110 talks about something related, but slightly different:
    the structs we use for storage with gorm are adapted to the purpose
    of storage. The structs generated from our goa design are adapted
    for use in the API. The structures in both layers are not what we
    would come up if we tried to design our data model free of
    constraints. #110 raises the issue whether we need that "ideal"
    layer between the API and the db. <br>
    <br>
    /Thomas<br>
  </body>
</html>