<?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>Forem: Sven Schmidt</title>
    <description>The latest articles on Forem by Sven Schmidt (@0xsven).</description>
    <link>https://forem.com/0xsven</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%2F212239%2F933d301e-e57b-4883-a5d6-d35f626b5680.jpg</url>
      <title>Forem: Sven Schmidt</title>
      <link>https://forem.com/0xsven</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/0xsven"/>
    <language>en</language>
    <item>
      <title>A better CMS for React</title>
      <dc:creator>Sven Schmidt</dc:creator>
      <pubDate>Fri, 06 Sep 2019 11:00:47 +0000</pubDate>
      <link>https://forem.com/0xsven/a-better-cms-for-react-f9j</link>
      <guid>https://forem.com/0xsven/a-better-cms-for-react-f9j</guid>
      <description>&lt;p&gt;&lt;small&gt;&lt;small&gt;&lt;small&gt;Photo by Hal Gatewood on Unsplash&lt;/small&gt;&lt;/small&gt;&lt;/small&gt;&lt;/p&gt;

&lt;p&gt;Are you a react developer? Then this day and age must be very exciting. &lt;a href="https://www.gatsbyjs.org/"&gt;Gatsby&lt;/a&gt;, &lt;a href="//nextjs.org"&gt;nextjs&lt;/a&gt;, &lt;a href="https://www.netlify.com/"&gt;netlify&lt;/a&gt;, the &lt;a href="https://jamstack.org/"&gt;JAM stack&lt;/a&gt;, you name it. You can setup a complex web project in no time. &lt;/p&gt;

&lt;p&gt;Modern tools are amazing. But, what I want to talk about in this article, modern CMS are not. Working with today's CMS solutions frustrates me. The time spent integrating with a CMS and managing content and its structure doesn't feel right.&lt;/p&gt;

&lt;p&gt;I thought a lot about my experiences and dreamt up a new approach to solve my frustrations. A better CMS for React projects. Let me explain further.&lt;/p&gt;

&lt;h2&gt;
  
  
  A better developer experience
&lt;/h2&gt;

&lt;p&gt;There are many small points of frustration. The big one for me is content-structure. Most CMS define their content-structure with some sort of types. Every CMS has those: Wordpress has &lt;a href="https://wordpress.org/support/article/post-types/"&gt;post types&lt;/a&gt;, CraftCMS has &lt;a href="https://docs.craftcms.com/v3/sections-and-entries.html#sections"&gt;sections&lt;/a&gt; and Contentful has &lt;a href="https://www.contentful.com/developers/docs/concepts/data-model/"&gt;content types&lt;/a&gt;. They all refer to the same: A table in a database. This works great for structured data like blog posts or ecommerce products. &lt;/p&gt;

&lt;p&gt;It does not work well for websites that have a lot of unique elements. Plenty of times your website consists of things that only exist once. For example: an about page with a hero component, a background image and a CTA button. It is hard to normalise websites into database tables. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The solution:&lt;/strong&gt;&lt;br&gt;
Derive content-structure from code. Guess what knows most about your website's structure? The code behind it! &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ByfwjPee-Tk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;
Video showcasing developer experience.



&lt;p&gt;This also solves a lot of related pain-points I have encountered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No need to manually define your content-structure through a web-UI&lt;/li&gt;
&lt;li&gt;It is far easier to test different content values&lt;/li&gt;
&lt;li&gt;You are probably versioning your code already with Git. So your content structure is versioned as well.&lt;/li&gt;
&lt;li&gt;No need to migrate your content structure to other environments, just deploy your code&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A better editor experience
&lt;/h2&gt;

&lt;p&gt;CMS UIs give editors a hard time. We developers sometimes look down on editors, because they have a hard time understanding how the CMS works. But think about that for a second: There are dozens of input fields hidden in a nested tree structure. Editors have to match those with the website in their heads. Without knowing about the code or the content-structure. &lt;/p&gt;

&lt;p&gt;Headless CMS's have become popular because they let developers choose what technology they want. As a result the website moved further away from the CMS. Editors are the ones that lose out. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Solution:&lt;/strong&gt;&lt;br&gt;
Merge CMS-UI and website. Editors should have the feeling they edit the website. Every change is immediately reflected on the website. We build websites with React, a powerful frontend library. Why not use it to power the CMS too?&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/_5Z8KegSd9k"&gt;
&lt;/iframe&gt;
&lt;/p&gt;
Video showcasing editor experience.



&lt;h2&gt;
  
  
  What's next?
&lt;/h2&gt;

&lt;p&gt;All I have right now is a prototype that uses local storage (as seen in the videos above). The next step would be to publish an NPM module and to develop a simple data syncing service, so we can try this in a real world scenario.&lt;/p&gt;

&lt;p&gt;Are you fed up with the CMS landscape? What do you think about the approach described above? I very much appreciate every opinion and every reply. Thanks for reading.&lt;/p&gt;

</description>
      <category>react</category>
      <category>cms</category>
    </item>
  </channel>
</rss>
