<story><title>When Should You Not Use Rails?</title><url>http://codefol.io/posts/when-should-you-not-use-rails/</url></story><parent_chain><item><author>bzb3</author><text>But those frameworks force you to do things the way they want you to. As soon as you need to deviate a little bit, and very often you&amp;#x27;ll have to, you&amp;#x27;ll have to rewrite the entire thing.</text></item><item><author>vbsteven</author><text>This.&lt;p&gt;There are so many things that are required in a modern web app that these &amp;quot;batteries included&amp;quot; frameworks provide for you that it just makes sense to use these for most standard projects.&lt;p&gt;I personally use Spring Boot as my default stack because just setting up a basic boot starter project gets me:&lt;p&gt;* Routing&lt;p&gt;* Server side templates&lt;p&gt;* i18n translation files&lt;p&gt;* database connection pooling&lt;p&gt;* database migrations&lt;p&gt;* ORM&lt;p&gt;* Logging&lt;p&gt;* Json serialization&lt;p&gt;* unit testing, integration testing, mocks&lt;p&gt;* CSRF&lt;p&gt;* Validation framework&lt;p&gt;* Dependency injection&lt;p&gt;* SMTP email sending&lt;p&gt;and much more, all compatible with each other&lt;p&gt;If I would start with a blank Sinatra&amp;#x2F;Express project I would have to piece together all of these myself from various libraries and my own code.</text></item><item><author>jeff_vader</author><text>Anecdotal random story bits from my current company on why you should stick to Rails:&lt;p&gt;- All of our &amp;quot;lightweight Sinatra(and similar) API&amp;quot; services eventually start to look more and more like Rails apps. Rails does many small developer convenience things well. Which you do not notice until you build this lightweight API yourself. E.g. console, logging, migrations, database connection pooling, rspec integration, i18n.&lt;p&gt;- No one likes to work with your arbitrary personal project structure conventions. Where&amp;#x27;s the code? &amp;#x27;lib&amp;#x27;? &amp;#x27;core&amp;#x27;? &amp;#x27;app&amp;#x27;? &amp;#x27;api&amp;#x27;? Also, no one wants to learn your lightweight &amp;quot;data mapper&amp;quot; pattern written from scratch because you thought ActiveRecord is too bloated and &amp;quot;does not scale&amp;quot;. That being said, there&amp;#x27;s quite a few things you can arbitrarily pick in Rails projects as well which others will find surprising. But the spectrum of those choices is little narrower.&lt;p&gt;- Developers most of the time assume database connection pooling just magically happens. Sysadmins do have no desire to debug your apps. After couple weeks of back and forth you may realise that Rails does database connection pooling for you. And simply requiring &amp;#x27;activerecord&amp;#x27; and establishing connection in your Sinatra app does not.&lt;p&gt;- One day someone doing production maintenance wanted to remind themselves rake task name. And ran &amp;#x27;bundle exec rake&amp;#x27; forgetting to add &amp;#x27;-T&amp;#x27;. Default task was rspec. It dropped production database. That day many learned that Rails has safeguards against things like this, while none of those &amp;quot;lightweight arbitrary structured APIs&amp;quot; had any. Though the lesson was clearly not very good, since we did this again couple years later.</text></item></parent_chain><comment><author>vinceguidry</author><text>&amp;gt; you&amp;#x27;ll have to rewrite the entire thing.&lt;p&gt;No, you don&amp;#x27;t, because then you&amp;#x27;ll be able to lean on Rails&amp;#x27; biggest strength, Ruby. You don&amp;#x27;t know how many times I&amp;#x27;ve been able to just dig into a gem&amp;#x27;s or even Rails itself, find out what&amp;#x27;s going on, and simply write what I need leveraging all the existing code.&lt;p&gt;On the other hand, when we were replatforming our Rails project into Node for no good reason, we wound up having to rewrite a ton of stuff because, well, Ruby is a great server language, and Javascript is only at best a mediocre scripting language, and ES6 is only a marginal improvement.</text></comment>
<story><title>When Should You Not Use Rails?</title><url>http://codefol.io/posts/when-should-you-not-use-rails/</url></story><parent_chain><item><author>bzb3</author><text>But those frameworks force you to do things the way they want you to. As soon as you need to deviate a little bit, and very often you&amp;#x27;ll have to, you&amp;#x27;ll have to rewrite the entire thing.</text></item><item><author>vbsteven</author><text>This.&lt;p&gt;There are so many things that are required in a modern web app that these &amp;quot;batteries included&amp;quot; frameworks provide for you that it just makes sense to use these for most standard projects.&lt;p&gt;I personally use Spring Boot as my default stack because just setting up a basic boot starter project gets me:&lt;p&gt;* Routing&lt;p&gt;* Server side templates&lt;p&gt;* i18n translation files&lt;p&gt;* database connection pooling&lt;p&gt;* database migrations&lt;p&gt;* ORM&lt;p&gt;* Logging&lt;p&gt;* Json serialization&lt;p&gt;* unit testing, integration testing, mocks&lt;p&gt;* CSRF&lt;p&gt;* Validation framework&lt;p&gt;* Dependency injection&lt;p&gt;* SMTP email sending&lt;p&gt;and much more, all compatible with each other&lt;p&gt;If I would start with a blank Sinatra&amp;#x2F;Express project I would have to piece together all of these myself from various libraries and my own code.</text></item><item><author>jeff_vader</author><text>Anecdotal random story bits from my current company on why you should stick to Rails:&lt;p&gt;- All of our &amp;quot;lightweight Sinatra(and similar) API&amp;quot; services eventually start to look more and more like Rails apps. Rails does many small developer convenience things well. Which you do not notice until you build this lightweight API yourself. E.g. console, logging, migrations, database connection pooling, rspec integration, i18n.&lt;p&gt;- No one likes to work with your arbitrary personal project structure conventions. Where&amp;#x27;s the code? &amp;#x27;lib&amp;#x27;? &amp;#x27;core&amp;#x27;? &amp;#x27;app&amp;#x27;? &amp;#x27;api&amp;#x27;? Also, no one wants to learn your lightweight &amp;quot;data mapper&amp;quot; pattern written from scratch because you thought ActiveRecord is too bloated and &amp;quot;does not scale&amp;quot;. That being said, there&amp;#x27;s quite a few things you can arbitrarily pick in Rails projects as well which others will find surprising. But the spectrum of those choices is little narrower.&lt;p&gt;- Developers most of the time assume database connection pooling just magically happens. Sysadmins do have no desire to debug your apps. After couple weeks of back and forth you may realise that Rails does database connection pooling for you. And simply requiring &amp;#x27;activerecord&amp;#x27; and establishing connection in your Sinatra app does not.&lt;p&gt;- One day someone doing production maintenance wanted to remind themselves rake task name. And ran &amp;#x27;bundle exec rake&amp;#x27; forgetting to add &amp;#x27;-T&amp;#x27;. Default task was rspec. It dropped production database. That day many learned that Rails has safeguards against things like this, while none of those &amp;quot;lightweight arbitrary structured APIs&amp;quot; had any. Though the lesson was clearly not very good, since we did this again couple years later.</text></item></parent_chain><comment><author>dwheeler</author><text>I think that depends on the framework and what deviation you want.&lt;p&gt;I agree that if you use Rails and constantly override its conventions, you will have a bad day. But following conventions is usually a strength, not a weakness. Most websites are not shocking cutting-edge things that have never done before, but relatively boring simple tasks that involve grabbing data from databases and showing them to users via templates. Every decision you have to make is a cost,  and if you have a small team, having  basic naming convention decisions  and directory location decisions already made  accelerates development. There&amp;#x27;s a big advantage to following conventions when you want others to work with you, because different Rails applications look quite similar in many ways.&lt;p&gt;I have not had trouble overriding Rails when I needed to override something specific.&lt;p&gt;Btw, I like the original article. There&amp;#x27;s nothing that&amp;#x27;s good for all cases, so it&amp;#x27;s very important to understand what something is good and not good at.</text></comment>