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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>check out <a href="https://ash-hq.org/" rel="noopener nofollow ugc">ash</a>; it’s another dependency and it brings a lot to the table, but imho it has everything you actually need to expose some APIs</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="375182" 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/for-a-pure-json-api-application-is-phoenix-overkill/72730/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-375182" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="375182"
                     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="375219" data-post-id="375219">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/pmjoe" rel="nofollow">@pmjoe</a> I’ve had similar feelings, and have used Plug plus a helper file to render JSON responses (i.e. <code>json_ok(conn, data)</code> and friends). It feels similar to the <a href="https://github.com/soveran/cuba?tab=readme-ov-file#cuba" rel="noopener nofollow ugc">Cuba</a> microframework, which I loved using in my Ruby days.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="375219" 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/for-a-pure-json-api-application-is-phoenix-overkill/72730/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-375219" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="375219"
                     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="375222" data-post-id="375222">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="pmjoe" data-post="1" data-topic="72730">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/p/65b543/48.png" class="avatar"> pmjoe:</div>
<blockquote>
<p>given the fact that I just need to expose an JSON API, is Phoenix overkill?</p>
</blockquote>
</aside>
<p>I don’t see it as overkill, when generating a new phoenix app you can drop gettext, any UI thing, any mailer thing and have just a plain http server.</p>
<aside class="quote no-group" data-username="pmjoe" data-post="1" data-topic="72730">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/p/65b543/48.png" class="avatar"> pmjoe:</div>
<blockquote>
<p>Or let me put better, do you see any limitations on using Plug and a router directly?</p>
</blockquote>
</aside>
<p>a plain plug router lack a bunch of helpers that the phoenix router have to make it easy to create common restful endpoints(<code>resources</code> and <code>scope</code> being available makes a big difference). also afaik OpenAPISpex only works with phoenix, if your app grows too much it becomes terrible to maintain a big plug router.</p>
<p>A long time ago I worked with an api centric library called <a href="https://hex.pm/packages/maru" rel="nofollow">maru</a>, but i belive it’s not actively maintained now. It kinda takes a lot from the ruby grape.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="375222" 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/for-a-pure-json-api-application-is-phoenix-overkill/72730/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-375222" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="375222"
                     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 #13"></div>
  </section>
</div>
    <div class="postbit" id="375526" data-post-id="375526">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<blockquote>
<p>is Phoenix overkill?</p>
</blockquote>
<p>I believe that question is a result of carrying misconceptions from other languages or frameworks which oftentimes add code bloat and performance penalty. Phoenix is not like that. E.g. in Ruby world, you often see discussion about choosing Rails (heavyweight but complete) vs Sinatra (lightweight, requiring more from the user, but not carrying over bloat).</p>
<p>This dichotomy does not exist in Phoenix. The next sentence is a little stretch, but it should give a nice intuition. In the sense of lightness Plug might be comparable to Sinatra. Now, imagine if Rails was just a generator for a full blown app that glues some Sinatra configs together. Then you could use the quick start convention and remove all the unnecessary stuff.</p>
<p>That is exactly how Phoenix works. It is a layer on top of Plug with conventions and configurations. Even better, you don’t need to start with full Phoenix and remove stuff, the <code>mix phx.new</code> task allows specifying <code>–-no-assets –-no-html –-no-live</code> and you are ready to go.</p>
<p>So, in the end, use Phoenix. It is not like Rails which would pull a lot of unnecessary things. Phoenix can be as lean as you need it while benefitting from easy to follow conventions. It is even fine to use Phoenix to server static content with <code>-–no-ecto</code>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="375526" 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/for-a-pure-json-api-application-is-phoenix-overkill/72730/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-375526" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="375526"
                     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 #14"></div>
  </section>
</div>
    <div class="postbit" id="375585" data-post-id="375585">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I use Phoenix + Ash that is a perfect couple. Just declarative then get almost APIs That I needed.</p>
<p>In my case, I use Phoenix in my some projects just for transportation throw Phoenix channel before that I have used for JSON API. Phoenix still benefit for me like authentication, verification and encoding/decoding between JSON and Elixir structures.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="375585" 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/for-a-pure-json-api-application-is-phoenix-overkill/72730/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-375585" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="375585"
                     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>