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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Also, atm it’s really hard to decide how an app should be split into contexts. Imo that’s the most important point and everything should start from here. After all the videos, blog posts, discussions i don’t know how to apply contexts correctly (and it should be obvious, for the sake of humanity and developers). Current approach do not solve this</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="36466" 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/contexts-a-barrier-too-high-for-newbies/5929/47">Post #46</a>
	                </div>
	            </div>
              <div id="likers-container-36466" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="36466"
                     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 #46"></div>
  </section>
</div>
    <div class="postbit" id="36463" data-post-id="36463">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Well, don’t know, proved to be hard question.<br>
Also, see comment above - how about putting other parts into context.<br>
Also,  like mentioned earlier, something like <code>Post.Post "posts"</code> isnt really useful <img src="https://forum.elixirforum.com/images/emoji/apple/confused.png?v=15" title=":confused:" class="emoji" alt=":confused:" loading="lazy" width="20" height="20"> maybe shared/global context? (Going to become garbage bin though)</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="36463" 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/contexts-a-barrier-too-high-for-newbies/5929/46">Post #45</a>
	                </div>
	            </div>
              <div id="likers-container-36463" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="36463"
                     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 #45"></div>
  </section>
</div>
    <div class="postbit" id="36461" data-post-id="36461">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>[quote="thousandsofthem, post:44, topic:5929]<br>
contexts in the way they are now are terrible.<br>
[/quote]</p>
<p>Would you mind elaborating on this a little bit? What about them do you think is terrible? What would you try to do to improve them?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="36461" 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/contexts-a-barrier-too-high-for-newbies/5929/45">Post #44</a>
	                </div>
	            </div>
              <div id="likers-container-36461" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="36461"
                     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 #44"></div>
  </section>
</div>
    <div class="postbit" id="36459" data-post-id="36459">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m agree with topic starter - contexts in the way they are now are terrible. On other hand, some other way may be godsend. Also, for me, contexts make much more sense for controllers (e.g. separate context for public area, for account’s private zone, admin area), for various helper modules/services, for wrapper methods around schemas but not for schemas itself</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="36459" 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/contexts-a-barrier-too-high-for-newbies/5929/44">Post #43</a>
	                </div>
	            </div>
              <div id="likers-container-36459" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="36459"
                     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 #43"></div>
  </section>
</div>
    <div class="postbit" id="36452" data-post-id="36452">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Phoenix isn’t Rails. Rails is good for what it’s good and it gives the biggest head start for some kinds of projects. New programmers can get most done with Rails with these kinds of projects. Phoenix is like Rails for programmers looking for an easy entry into the world of concurrency and microservices (separation of concerns). It is very obvious that these two concepts will be key strengths for programming languages in the near future. With other languages you need to do so much planning and analysis to properly separate concerns and get maximum computational power, while with Elixir you get it out of the box.</p>
<p>I think that Phoenix is like Rails for concurrency/microservices. Add on top of that pattern matching and functional programming which are massively taking over each programming field (mobile, front end…) I think that Phoenix/Elixir is in the best possible position.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="36452" 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/contexts-a-barrier-too-high-for-newbies/5929/43">Post #42</a>
	                </div>
	            </div>
              <div id="likers-container-36452" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="36452"
                     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 #42"></div>
  </section>
</div>
    <div class="postbit" id="36450" data-post-id="36450">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="sync08" data-post="10" data-topic="5929">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/s/ed655f/48.png" class="avatar"> sync08:</div>
<blockquote>
<p>Contexts are clearly a barrier to some people</p>
</blockquote>
</aside>
<p>Given the questions I see here and elsewhere, while contexts may be a stumbling block for some people, the real barrier appears to be Ecto. The hardest questions, often with the fewest answers, tend to be ones about Ecto.</p>
<p>Querying structured data is not the easiest thing in the world, and trying to create a nice abstraction between the storage system and your application is not easy. Ecto itself has been evolving rapidly, and so there are a few More Than One Way To Do Things, and many rough edges to be found (I created a pull request for one of those just 3 days ago).</p>
<p>Ecto is awesome, but it isn’t perfectly easy. And the amount of high quality examples out there is not .. encouraging. Most cover the simple things (as someone else noted, real world use cases are rather more complex). .. yet we don’t really hear toooo much here about the complexity of Ecto and how to make it more approachable.</p>
<p>So for me, worry over context is a sort of classic “bikeshedding”: contexts are easy to spot as a bump because they are new. New things without clear and unambiguous (perceived) benefits are often perceived as bad, or at least uncomfortable, at the start. Contexts are also somewhat trivial: they don’t REALLY introduce a new concept to the language or even the framework. You could have been doing something like contexts before, and you can ignore them now. So they aren’t really .. critical. Contexts are also easy to understand and have been highly exposed.</p>
<p>So there are lots of discussions about them. Losing too much energy over that discussion is probably not useful, especially when there are bigger fish to fry out there such as Ecto.</p>
<p>What I think is likely to resolve the issue:</p>
<ul>
<li>time (as <a class="mention" href="/u/josevalim" rel="nofollow">@josevalim</a> noted already)</li>
<li>a clearer statement and understanding among us developers what the <em>purpose</em> and <em>benefits</em> of contexts really are</li>
<li>some nice examples / tutorials to show the path (as others have noted, having trailblazers to follow helps a lot more than documentation and marketing alone)</li>
</ul>
<p>This is not to say that contexts are not a possible problem for newcomers. They may well be. And if people are saying that they are a problem for themselves, I think we have to accept that as true.</p>
<p>What we don’t know is what % of people coming to Phoenix are finding contexts an issue, for how long that persists, if it is a blocker, and/or what other issues are more important to them. Personally, I would very much appreciate a developer feedback survey that we could use to gather some data to understand what really is going on <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> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="36450" data-batch-url="/posts/batch_likers">
                        9
                      </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/contexts-a-barrier-too-high-for-newbies/5929/42">Post #41</a>
	                </div>
	            </div>
              <div id="likers-container-36450" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="36450"
                     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 #41"></div>
  </section>
</div>
    <div class="postbit" id="36442" data-post-id="36442">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>If I understand this correctly, the problem is that newbies don’t get best practices and find somewhat hard to comply.<br>
But isn’t it that the reason why they are newbies and we set up  best practices ?</p>
<p>When I first bumped into Rails I was already an experienced programmer, but I had been working on .net and weborms for years and it was really confusing for me at first.<br>
Rails wasn’t easy at all for newbies, but it was opinionated and that made feel other’s people code familiar and helped expanding the knowledge.<br>
What’s easy now has been hard at the beginning.</p>
<p>Practice makes you perfect, I strongly believe in the value of enforcing good behaviours instead of being too permissive and allowing the big ball of mud to prevail.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="36442" data-batch-url="/posts/batch_likers">
                        6
                      </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/contexts-a-barrier-too-high-for-newbies/5929/41">Post #40</a>
	                </div>
	            </div>
              <div id="likers-container-36442" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="36442"
                     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 #40"></div>
  </section>
</div>
    <div class="postbit" id="36382" data-post-id="36382">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="nerdyworm" data-post="38" data-topic="5929">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nerdyworm/48/359_2.png" class="avatar"> nerdyworm:</div>
<blockquote>
<p>In my little project, I have about 60 schemas and growing.  20 of them are purely just a schema/database table.  The fun part is that any of those 20 schemas are fair game for any other part of the app to depend on, have reference to, and have collections of.  I guess the app is the context for these things?</p>
</blockquote>
</aside>
<p>I wonder how much cheating would it be to do something like <code>mix phoenix.gen.html Posts Post "posts" ...</code> for those cases. Although I can see that if you are going in this direction, then contexts definitely feel like boilerplate.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="36382" 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/contexts-a-barrier-too-high-for-newbies/5929/40">Post #39</a>
	                </div>
	            </div>
              <div id="likers-container-36382" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="36382"
                     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 #39"></div>
  </section>
</div>
    <div class="postbit" id="36380" data-post-id="36380">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="nerdyworm" data-post="38" data-topic="5929">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nerdyworm/48/359_2.png" class="avatar"> nerdyworm:</div>
<blockquote>
<p>The second issue is when I start a new project that is when I know the least about it.  It is pretty hard to divvy up an app into meaningful parts when you are not exactly sure where things fit.  Some sort of blessed dumping ground like lib/core or lib/schemas and some tools to refactor to contexts would be very welcome.</p>
</blockquote>
</aside>
<p>That one is an issue I noticed as well. While I feel it’s good to have people think before diving deep into details it surely feels like a blocker as well. But in the end everybody is free to simply use the context “Core” or “App” for as long as the contexts are not clear enough.</p>
<aside class="quote no-group" data-username="nerdyworm" data-post="38" data-topic="5929">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nerdyworm/48/359_2.png" class="avatar"> nerdyworm:</div>
<blockquote>
<p>Get rid of create/update/delete/list/get/exists function names and replace them with names that are meaningful to the context.  For example, Scheduler.meetings_this_month  Post.submit_reply  Calendar.add_reoccuring_event.  By my count that is a context name, the database struct or whatever the context trying to abstract, and the function that defines the interface to the rest of the application.</p>
<p>It’s those none crud things which bring the most value to contexts, however, only a small percentage of my application really benefit from them.</p>
</blockquote>
</aside>
<p>That’s one reason why I’m hardly using the generators anymore. Creating the modules manually is often as fast as (remembering the correct cli syntax and) deleting all the generated crud stuff.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="36380" 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/contexts-a-barrier-too-high-for-newbies/5929/39">Post #38</a>
	                </div>
	            </div>
              <div id="likers-container-36380" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="36380"
                     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 #38"></div>
  </section>
</div>
    <div class="postbit" id="36378" data-post-id="36378">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’ll be peeking at the hex example: <a href="https://github.com/hexpm/hex" class="inline-onebox" rel="noopener nofollow ugc">GitHub - hexpm/hex: Package manager for the Erlang ecosystem. · GitHub</a> didn’t know that was a phoenix app <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 group-livebook_core_team" data-username="josevalim" data-post="29" data-topic="5929">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>My intuition is that crud is actually nicer with contexts than without contexts. That’s because even when crud-ing, the resources are still related, and the context keeps this relationship together. In the scenario you are mindlessly generating stuff, then the only extra input that contexts require is the context name. CRUD still works.</p>
</blockquote>
</aside>
<p>For some things, absolutely it’s been super nice and clean to work with, credit where credit is due.</p>
<p>For other things, it feels like one layer too deep from the web app.  It’s like I’m forced to wrap every call to Repo.update with NotARepo.update.   It’s clean when it’s needed, but when it’s required it’s tad overly formal.</p>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="29" data-topic="5929">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>I am confused. Aren’t those two? The context and the struct? Except by the context name, all names are inflected from the struct.</p>
</blockquote>
</aside>
<p>Get rid of create/update/delete/list/get/exists function names and replace them with names that are meaningful to the context.  For example, <code>Scheduler.meetings_this_month</code>  <code>Post.submit_reply</code>  <code>Calendar.add_reoccuring_event</code>.  By my count that is a context name, the database struct or whatever the context trying to abstract, and the function that defines the interface to the rest of the application.</p>
<p>It’s those none crud things which bring the most value to contexts, however, only a small percentage of my application really benefit from them.</p>
<hr>
<p>The most concrete issue that I deal with is when the database table is just a database table.</p>
<p>In my little project, I have about 60 schemas and growing.  20 of them are purely just a schema/database table.  The fun part is that any of those 20 schemas are fair game for any other part of the app to depend on, have reference to, and have collections of.  I guess the app is the context for these things?</p>
<p>The second issue is when I start a new project that is when I know the least about it.  It is pretty hard to divvy up an app into meaningful parts when you are not exactly sure where things fit.  Some sort of blessed dumping ground like lib/core or lib/schemas and some tools to refactor to contexts would be very welcome.</p>
<hr>
<p>Thanks for all of those participating in these threads.  They can get heated but I know it’s because everyone deeply cares about the tools they are using.  I’d be worried if everyone just went with the flow around here.</p>
<p>Cheers!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="36378" 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/contexts-a-barrier-too-high-for-newbies/5929/38">Post #37</a>
	                </div>
	            </div>
              <div id="likers-container-36378" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="36378"
                     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 #37"></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/5929/load_more?page=14">Load more posts (36 remaining)</a>
</div></template></turbo-stream>