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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tmbb" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tmbb
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="AstonJ" data-post="50" data-topic="8623">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/astonj/48/15_2.png" class="avatar"> AstonJ:</div>
<blockquote>
<p>In the same way that Phoenix pushes you down a specific path</p>
</blockquote>
</aside>
<p>By that definition, Python is the Nr. 1 architecture pusher… Have you ever looked at <a href="https://github.com/audreyr/cookiecutter" rel="noopener nofollow ugc">cookiecutter</a>? It’s probably one of the best tools to generate projects for any language (just look at the list of templates). Not as powerful by default as a Mix task (by design), but makes it much easier to create project templates. It can be used as a library to create “tasks” that are as powerful as Mix tasks, too.</p>
<p>I don’t think you should call this “pushing architecture”. It’s just a template, and a very weakly enforced one, too… It’s a text file: you can customize it beyond recognition, even changing such things as supervision trees. If you want to see an example of someone pushing (bad) architecture, take a look at any WSGI python framework (i.e. Django, Pyramid, Flask, etc.). They are by design constrained in way that the application must be designed in a certain way. I only call this architecture bad because it makes it very, very hard to use stateful connections (which would be unacceptable on the BEAM world)</p>
<aside class="quote no-group" data-username="AstonJ" data-post="59" data-topic="8623">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/astonj/48/15_2.png" class="avatar"> AstonJ:</div>
<blockquote>
<p>For instance, it is super simple to create separate apps (microservices?) and then include them as dependencies. In Ruby you would need to copy and paste the entire code, or create a gem or engine or include each file of the program independently (messy) - in Elixir it is easy as adding a line to your mix.exs file.</p>
</blockquote>
</aside>
<p>Yes, and then everything is so decoupled that you end up surprised when the Web part of your application starts without your database, or something like that. Your Project turns into a decentralized Frankenstein monster, in which parts of it move by themselves, disconnected from the central authority of the brain. People here seem to have a passion of decoupling everything into its own app, which is not bad in itself, but maybe some things are meant to be coupled. Otherwise, you might get questions like these (from the subreddit): <a href="https://www.reddit.com/r/elixir/comments/6zvsxd/avoiding_circular_dependencies_in_a_phoenix/" rel="noopener nofollow ugc">https://www.reddit.com/r/elixir/comments/6zvsxd/avoiding_circular_dependencies_in_a_phoenix/</a></p>
<p>I’m nowhere near experienced enough, and maybe I shouldn’t even participate in a discussion that includes all these experienced people, but sometimes this whole “Decoupling” business starts looking less and less like an engineering practice, and more like a religious stance.</p>
<aside class="quote no-group" data-username="AstonJ" data-post="52" data-topic="8623">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/astonj/48/15_2.png" class="avatar"> AstonJ:</div>
<blockquote>
<p>I don’t know about Smalltalk, or Java or any of those other languages but Ruby and JS definitely do not have this ‘guidance’ built in (or if they do have no where near the same kind of acceptance or adoption).</p>
</blockquote>
</aside>
<p>I haven’t used that many languages in practice, but for my project I read the “propaganda” for almost everything that’s there (Smalltalk, PHP, Java, Scala, Clojure(script), Racket, Common Lisp, other Lisp dialects, Haskell, OCaml, Python, Rust, C++, Erlang, LFE), and even tried some of them, until settling on Elixir. They all think they have everything figured out.</p>
<p>In my opinion, saying things such as “Only Elixir knows the right way” are counterproductive and sound like propaganda.</p>
<p>I also think that Elixir might be close to a monoculture now, with “everybody” using the same things (Phoenix, the default generators, etc), but if it grows ot might become more like Python: multiple ways to do something, each with its own pros and cons.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="50537" data-batch-url="/posts/batch_likers">
                        4
                      </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/discussion-dont-add-a-database-layer-to-your-phoenix-application/8623/63">Post #62</a>
	                </div>
	            </div>
              <div id="likers-container-50537" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="50537"
                     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 #62"></div>
  </section>
</div>
    <div class="postbit" id="50544" data-post-id="50544">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="AstonJ" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/AstonJ/120/15_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  AstonJ
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="tmbb" data-post="63" data-topic="8623">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/77aa72/48.png" class="avatar"> tmbb:</div>
<blockquote>
<p>By that definition, Python is the Nr. 1 architecture pusher… Have you ever looked at cookiecutter?</p>
</blockquote>
</aside>
<p>I think there was something like that for Rails once <img src="https://forum.elixirforum.com/uploads/default/original/2X/7/776053aa22968f83c10e90c98b23aa0ddd5c9d47.gif?v=15" title=":lol:" class="emoji emoji-custom" alt=":lol:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="tmbb" data-post="63" data-topic="8623">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/77aa72/48.png" class="avatar"> tmbb:</div>
<blockquote>
<p>I don’t think you should call this “pushing architecture”</p>
</blockquote>
</aside>
<p>Maybe architecture is the wrong word. It’s just best practices/methodologies.</p>
<aside class="quote no-group" data-username="tmbb" data-post="63" data-topic="8623">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/77aa72/48.png" class="avatar"> tmbb:</div>
<blockquote>
<p>Yes, and then everything is so decoupled that you end up surprised when the Web part of your application starts without your database, or something like that. Your Project turns into a decentralized Frankenstein monster, in which parts of it move by themselves, disconnected from the central authority of the brain. People here seem to have a passion of decoupling everything into its own app, which is not bad in itself, but maybe some things are meant to be coupled.</p>
</blockquote>
</aside>
<p>That’s the sort of thing I wanted to learn about when posting this thread <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="tmbb" data-post="63" data-topic="8623">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/77aa72/48.png" class="avatar"> tmbb:</div>
<blockquote>
<p>I’m nowhere near experienced enough, and maybe I shouldn’t even participate in a discussion that includes all these experienced people, but sometimes this whole “Decoupling” business starts looking less and less like an engineering practice, and more like a religious stance.</p>
</blockquote>
</aside>
<p>I’m in the same boat as you, but to me, when I think of the kind of applications I want to build having separate, independent components seems to make a lot of sense to me. For example, in a social networking app with potentially millions or hundreds of millions of users you’d want the User registration side to be an independent system so that it can be individually scaled/secured/backed up frequently, while other components of the system may not be quite as ‘important’.</p>
<aside class="quote no-group" data-username="tmbb" data-post="63" data-topic="8623">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/77aa72/48.png" class="avatar"> tmbb:</div>
<blockquote>
<p>In my opinion, saying things such as “Only Elixir knows the right way” are counterproductive and sound like propaganda.</p>
</blockquote>
</aside>
<p>I don’t think anyone is saying only Elixir knows the right way. It’s more about the choices it makes and becomes a proponent of <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="tmbb" data-post="63" data-topic="8623">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/77aa72/48.png" class="avatar"> tmbb:</div>
<blockquote>
<p>I also think that Elixir might be close to a monoculture now, with “everybody” using the same things (Phoenix, the default generators, etc), but if it grows ot might become more like Python: multiple ways to do something, each with its own pros and cons.</p>
</blockquote>
</aside>
<p>I like that unity <img src="https://forum.elixirforum.com/images/emoji/apple/blush.png?v=15" title=":blush:" class="emoji" alt=":blush:" loading="lazy" width="20" height="20"></p>
<p><em>Right with that said, I’m off back to Dave’s course - I’m dying to finish it <img src="https://forum.elixirforum.com/uploads/default/original/2X/7/776053aa22968f83c10e90c98b23aa0ddd5c9d47.gif?v=15" title=":lol:" class="emoji emoji-custom" alt=":lol:" loading="lazy" width="20" height="20"></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="50544" 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/discussion-dont-add-a-database-layer-to-your-phoenix-application/8623/64">Post #63</a>
	                </div>
	            </div>
              <div id="likers-container-50544" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="50544"
                     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 #63"></div>
  </section>
</div>
    <div class="postbit" id="50546" data-post-id="50546">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="AstonJ" data-post="48" data-topic="8623" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/astonj/48/15_2.png" class="avatar"> AstonJ:</div>
<blockquote>
<p>Do any of them push those architectures as part of their core? (I mean in the same way Elixir does with mix new)</p>
</blockquote>
</aside>
<p>Architecture is not how files are laid out in the filesystem. It’s how they interact at runtime. Very different.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="50546" data-batch-url="/posts/batch_likers">
                        3
                      </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/discussion-dont-add-a-database-layer-to-your-phoenix-application/8623/65">Post #64</a>
	                </div>
	            </div>
              <div id="likers-container-50546" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="50546"
                     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 #64"></div>
  </section>
</div>
    <div class="postbit" id="50547" data-post-id="50547">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="AstonJ" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/AstonJ/120/15_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  AstonJ
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>By architecture I meant how the overall system is put together… coding principles (or patterns) would have been a better phrase to use <img src="https://forum.elixirforum.com/images/emoji/apple/blush.png?v=15" title=":blush:" class="emoji" alt=":blush:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="50547" 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/discussion-dont-add-a-database-layer-to-your-phoenix-application/8623/66">Post #65</a>
	                </div>
	            </div>
              <div id="likers-container-50547" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="50547"
                     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 #65"></div>
  </section>
</div>
    <div class="postbit" id="50548" data-post-id="50548">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I just watched it again <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> It is a great talk.</p>
<p>There is more information on why you named it Context and the only thing really found why you named it at all was (paraphrasing): “We wanted a way to communicate the importance of API boundaries to our users”</p>
<p>Just to be clear I think API boundaries are a honking good idea and I very much like the way phoenix have developed over time. I just have a feeling by naming it you gave people a “hook” to hang their complaints on <img src="https://forum.elixirforum.com/images/emoji/apple/smiley.png?v=15" title=":smiley:" class="emoji" alt=":smiley:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="50548" 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/discussion-dont-add-a-database-layer-to-your-phoenix-application/8623/67">Post #66</a>
	                </div>
	            </div>
              <div id="likers-container-50548" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="50548"
                     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 #66"></div>
  </section>
</div>
    <div class="postbit" id="50549" data-post-id="50549">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="AstonJ" data-post="66" data-topic="8623">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/astonj/48/15_2.png" class="avatar"> AstonJ:</div>
<blockquote>
<p>By architecture I meant how the overall system is put together… coding principles (or patterns) would have been a better phrase to use <img src="https://forum.elixirforum.com/images/emoji/apple/blush.png?v=15" title=":blush:" class="emoji" alt=":blush:" loading="lazy" width="20" height="20"></p>
</blockquote>
</aside>
<p>I still disagree. Coding principles and patterns should be more concerned with code in motion than code at rest. Patterns (at least in the Gang of Four sense) are all about how different objects interact at runtime and never specifies what directory structure they should be stored in.</p>
<p>It’s easy to get bogged down in choosing what file to put some bit of code in, and that is important, but it’s secondary to understanding how the code interacts while it is running. That’s where runtime dependencies/coupling (and runtime errors) come from. Not from the filename or directory they are stored in.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="50549" data-batch-url="/posts/batch_likers">
                        3
                      </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/discussion-dont-add-a-database-layer-to-your-phoenix-application/8623/68">Post #67</a>
	                </div>
	            </div>
              <div id="likers-container-50549" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="50549"
                     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 #67"></div>
  </section>
</div>
    <div class="postbit" id="50550" data-post-id="50550">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="AstonJ" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/AstonJ/120/15_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  AstonJ
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>By “how the overall system is put together” - I mean how the app is coded (and I guess, how it is designed and will run, in the sense of processes etc). <em>Was it developed using good coding principles?</em></p>
<p>I actually borrowed ‘coding principles’ from one of Dave’s posts in this thread (included below). To me you apply (hopefully good) coding principles when developing your app/project/system. Whether that is how your app is put together, naming conventions or the patterns or methodologies you use within the actual code (or how it operates when in use - which is what I think you are referring to).</p>
<aside class="quote no-group">
<blockquote>
<p>Instead, if we explain decent coding principles, and live by them, then we can help people have a better long-term experience. This will be good for them, and good for the language.</p>
</blockquote>
</aside> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="50550" 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/discussion-dont-add-a-database-layer-to-your-phoenix-application/8623/69">Post #68</a>
	                </div>
	            </div>
              <div id="likers-container-50550" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="50550"
                     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 #68"></div>
  </section>
</div>
    <div class="postbit" id="50551" data-post-id="50551">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="AstonJ" data-post="62" data-topic="8623">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/astonj/48/15_2.png" class="avatar"> AstonJ:</div>
<blockquote>
<p>Yep, you have to package things up as a Gem, whereas in Elixir, you can just include any standard mix new app via that one line. That’s why it blew my mind, because it was so easy <img src="https://forum.elixirforum.com/uploads/default/original/2X/7/776053aa22968f83c10e90c98b23aa0ddd5c9d47.gif?v=15" title=":lol:" class="emoji emoji-custom" alt=":lol:" loading="lazy" width="20" height="20"></p>
</blockquote>
</aside>
<p>There is more to a <strong>system</strong> then <strong>code</strong>, such as <strong>resources (likes databases, etc)</strong>.  If I have an application that uses my database and maintains a connection pool of connections I may only want to run this app on 2 nodes, yet have code on a multiple of nodes rpc into the 2 nodes holding on to the resources.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="50551" data-batch-url="/posts/batch_likers">
                        1
                      </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/discussion-dont-add-a-database-layer-to-your-phoenix-application/8623/70">Post #69</a>
	                </div>
	            </div>
              <div id="likers-container-50551" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="50551"
                     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 #69"></div>
  </section>
</div>
    <div class="postbit" id="50553" data-post-id="50553">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I think what I’ve learned through the year from erlang is that you want to separate “services” in OTP application. With “service” here I mean  things like queues, databases-access, caching layers and similar and don’t use OTP apps as a way to modularize code.</p>
<p>A separate OTP application also runs its own supervision tree and this is important to remember in terms on how you want to separate failures throughout your application. I’ve seen a tendency in elixir that people prefer to include services in their own supervision tree and in my opinion its sort of a slippery slope to coupling. I also think it makes it harder to trouble-shoot in production.</p>
<p>I think this ties in a bit with what you say about “code layout is different from how services interact”.</p>
<p>One “rule” I found useful to help with refactoring is to hide all functionality of an “entity” behind a clearly defined API which must not leak implementation detail. Once you have a small, well-defined entry point into your application it is easy to move between various ways of doing code layout.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="50553" data-batch-url="/posts/batch_likers">
                        5
                      </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/discussion-dont-add-a-database-layer-to-your-phoenix-application/8623/71">Post #70</a>
	                </div>
	            </div>
              <div id="likers-container-50553" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="50553"
                     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 #70"></div>
  </section>
</div>
    <div class="postbit" id="50665" data-post-id="50665">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="AstonJ" data-post="69" data-topic="8623">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/astonj/48/15_2.png" class="avatar"> AstonJ:</div>
<blockquote>
<p>By “how the overall system is put together” - I mean how the app is coded (and I guess, how it is designed and will run, in the sense of processes etc). Was it developed using good coding principles?</p>
</blockquote>
</aside>
<p>Sounds like we’re in agreement on this point, as long as “coding principles” is more about code in “motion” at runtime than at “rest” on the filesystem. <img src="https://forum.elixirforum.com/images/emoji/apple/thumbsup.png?v=15" title=":thumbsup:" class="emoji" alt=":thumbsup:" loading="lazy" width="20" height="20"></p>
<p>There’s definitely advantages to organizing your code well on the filesystem, don’t get me wrong. But those are secondary to how the code interacts in memory at runtime.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="50665" data-batch-url="/posts/batch_likers">
                        2
                      </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/discussion-dont-add-a-database-layer-to-your-phoenix-application/8623/72">Post #71</a>
	                </div>
	            </div>
              <div id="likers-container-50665" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="50665"
                     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 #71"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/8623/load_more?page=8">Load more posts (12 remaining)</a>
</div></template></turbo-stream>