<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ariejan de Vroom</title>
    <description>The latest articles on DEV Community by Ariejan de Vroom (@ariejan).</description>
    <link>https://dev.to/ariejan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F571452%2F25a81189-c124-40f1-bb91-2acc9d1f5eee.jpeg</url>
      <title>DEV Community: Ariejan de Vroom</title>
      <link>https://dev.to/ariejan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ariejan"/>
    <language>en</language>
    <item>
      <title>Rails without tha added sugar</title>
      <dc:creator>Ariejan de Vroom</dc:creator>
      <pubDate>Thu, 21 Jan 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/kabisasoftware/rails-without-tha-added-sugar-1aa7</link>
      <guid>https://dev.to/kabisasoftware/rails-without-tha-added-sugar-1aa7</guid>
      <description>&lt;p&gt;A modern web application has many moving parts, Ruby on Rails is no exception. With a new Ruby on Rails 6.1 application there's a lot you get for free.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you get for free:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Outgoing email handling (&lt;code&gt;action_mailer&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Incoming email handling (&lt;code&gt;action_mailbox&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Text markup / editing in the browser that works (&lt;code&gt;action_text&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Compiling and bundling static assets like CSS, JavaScript, fonts and images (&lt;code&gt;sprockets&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Making use of the whole NPM ecosystem for front-end technology (&lt;code&gt;webpacker&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Background workers (&lt;code&gt;active_job&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Websockets with fallback (&lt;code&gt;action_cable&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;An awesome DSL to generate JSON (&lt;code&gt;jbuilder&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Make your application load faster in the browser (&lt;code&gt;turbolinks&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Increase performance by caching expensive computations (&lt;code&gt;bootsnap&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Application pre-loader (&lt;code&gt;spring&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Store files locally or in the cloud (&lt;code&gt;active_storage&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, there are times you want to start with something simpler, without&lt;br&gt;
the burden of all these extras. &lt;/p&gt;
&lt;h2&gt;
  
  
  A minimal approach
&lt;/h2&gt;

&lt;p&gt;You &lt;em&gt;could&lt;/em&gt; use all the &lt;code&gt;--skip-*&lt;/code&gt; options to disable each of these, but&lt;br&gt;
Rails 6.1. packs the &lt;code&gt;--minimal&lt;/code&gt; option instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rails new my_app --minimal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It should be noted that this does not imply a &lt;em&gt;classic&lt;/em&gt; Rails app, as &lt;br&gt;
&lt;a href="https://github.com/rails/rails/pull/39282#issuecomment-629503802"&gt;DHH eloquently put it&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Classic gives it an air of cool that I'm not interested in. It's not about reminiscing of some glorious past. It's just "I want the bare minimum"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That bare minimum is a great starting point if you're not yet ready for all the goodies and&lt;br&gt;
maybe uncertain whether you're going to need them at all. Adding the ones you need later it&lt;br&gt;
just like adding any other gem to your Rails project.&lt;/p&gt;

&lt;p&gt;I'm a big proponent of this approach, as less dependencies (you don't use) means your codebase&lt;br&gt;
will be easier to maintain and upgrade in the future. &lt;/p&gt;
&lt;h2&gt;
  
  
  More points with combos!
&lt;/h2&gt;

&lt;p&gt;If you're really into front-end and would like to use webpacker with a minimal Rails app,&lt;br&gt;
that's possible too. Selecting a specific database adapter is also still possible.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rails new cool_app --minimal --database postgresql webpack=react
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>rails</category>
      <category>ruby</category>
    </item>
  </channel>
</rss>
