<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="99512" data-post-id="99512">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This is just a case of internal team culture and practices – and prominently, of code reviews and approval processes. If my endpoint apps (Phoenix controllers, GraphQL resolvers etc.) only use my domain app – via <code>in_umbrella: true</code> for example – and do <em>not</em> use the app with the direct storage helpers in it (Ecto et. al.), then that’s a very clear sign for the programmers not to take shortcuts.</p>
<p>Ultimately, I do not think there is a way to fully enforce clean boundaries. It’s up to us to facilitate practices that make our work more predictable and productive. The pursuit of academic purity is something I wish we had more time for but as it is, the modern IT business is heavily against it.</p>
<p><em>(<strong>EDIT</strong>: This reminds me that a pre-commit hook that makes sure your <code>phoenix_controllers</code> app does not call anything from your <code>storage</code> app – via grep’ing <code>mix xref</code> – is something I wanted to do for a long time.)</em></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="99512" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/on-structuring-and-configuring-a-web-application-project-in-elixir/16543/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-99512" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="99512"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="99536" data-post-id="99536">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jeremyjh" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jeremyjh/120/5995_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jeremyjh
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Then you <em>don’t</em> disagree with me when I said:</p>
<aside class="quote no-group" data-username="jeremyjh" data-post="2" data-topic="16543">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jeremyjh/48/5995_2.png" class="avatar"> jeremyjh:</div>
<blockquote>
<p>It does not offer any additional abstraction or information hiding beyond what the module system gives you.</p>
</blockquote>
</aside>
<p>I mean, if you just want to keep your modules in separate directories to make it easier to enforce coding standards, you can. There is no rule they all have to be in lib. Just add them to your compilation path. What I think is more important is how those modules collaborate with each other, and making them separate “apps” imposes no restrictions on that. It doesn’t draw a bright-line around your modules, but it <em>does</em> introduce certain complications of sharing non-code resources and it seems like there is a new question on the forums every week about how to work-around that.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="99536" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/on-structuring-and-configuring-a-web-application-project-in-elixir/16543/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-99536" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="99536"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="99539" data-post-id="99539">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="jeremyjh" data-post="13" data-topic="16543">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jeremyjh/48/5995_2.png" class="avatar"> jeremyjh:</div>
<blockquote>
<p>I mean, if you just want to keep your modules in separate directories to make it easier to enforce coding standards, you can. There is no rule they all have to be in lib. Just add them to your compilation path. What I think is more important is how those modules collaborate with each other, and making them separate “apps” imposes no restrictions on that.</p>
</blockquote>
</aside>
<p>All true. It is mostly related to human perception IMO; if things are separated in “apps”, “bundles”, “module collections”, “class libraries” etc. then us the people think that bundle to be a semantically isolated unit – which is true often enough but many times it isn’t because it’s simply a device to make the life of the code organizer a bit easier.</p>
<p>To reiterate part of my above comments: for most devs I ever met – even the juniors and the interns – it instinctively makes sense not to breach boundaries where you have a small mechanical hurdle before doing so. Thus I try hard in my work to exploit such brain bugs (or hacks or if you will) in order to make people play nicely with my code. Saves time, saves unnecesary discussions, and works most of the time. And when it doesn’t, I can explain why I do things the way I do – in 2 minutes.</p>
<aside class="quote no-group" data-username="jeremyjh" data-post="13" data-topic="16543">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jeremyjh/48/5995_2.png" class="avatar"> jeremyjh:</div>
<blockquote>
<p>It doesn’t draw a bright-line around your modules, but it <em>does</em> introduce certain complications of sharing non-code resources and it seems like there is a new question on the forums every week about how to work-around that.</p>
</blockquote>
</aside>
<p>In my experience it definitely does draw the said bright line but we come from different backgrounds and societes so that’s surely a factor in it as well.</p>
<p>As for sharing non-code resources, that’s a problem most programming languages still haven’t solved reliably. I’d go radical and make an entirely new OS that has an OS-wide key/value store that can be a file / string / number / whatever and be it read-only 99% of the time (and have additional security attached to it, like who can even view it). I see no reason to maintain configuration or static assets the way we do it right now – deployment with such a new system would be brain-dead easy… But anyway, we can dream.</p>
<p>In Elixir’s case the <code>priv/</code> directory IMO complicates more things than it solves. But I have no better idea so I am not bad-mouthing it. Often, it’s a good enough mechanism.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="99539" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/on-structuring-and-configuring-a-web-application-project-in-elixir/16543/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-99539" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="99539"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>