DEV Community

Theodor Heiselberg
Theodor Heiselberg

Posted on

Creating the Pinnacle of Niche Software: Consume Squidex Headless CMS Api's in ELM!

There is a first time for everything, I guess

When choosing an extreme niche programming language like Elm, you are bound to do more work since many libraries simply don't exist for Elm - yet.

But the past years using Elm, I have learned more about how the web actually works than I learned the previous 20 years—and this is why.

In the early days I started on the job market, I programmed using C# and Windows Forms. I wasn't involved in web development the first decade or so. When many others were using Ruby on Rails, I was building corporate WPF applications. And for a time, this was fine. But I longed for working with what at least I considered to be the future, so I acquired a role as a web developer.

Back then, React was new, and Knockout.js was still a thing. Coming from WPF, I actually liked it.

Throughout my career I have worked with different frontend frameworks:

  • Razor Pages
  • Knockout.js
  • React.js
  • Angular.js
  • Vanilla HTML + CSS

A common experience has been that handling state is a pain and most of the hard stuff of programming for the web was hidden in the various frameworks.

So I got a lot of stuff done, but never really got to learn the depths of the decisions the framework creators had made.

Enter Elm!

Over the years, I have tried to use functional programming in a few projects. It was actually when I tried to learn Bolero I was first introduced to Elm.

In order to use Bolero's Elmish, I thought I needed to learn Elm. So I learned Elm, and I haven't looked back!

Now I finally got to understand the way of the web!

When writing Elm, you need to understand how the browser works and why various decisions were made for you by other FE frameworks. It sounds harder, right? But I felt relieved. When writing Elm apps, most decisions are right there in the code. Easy to both use and extend.

I do think I write more code when using Elm, but in the end, the app seems much more clear and easy to return to. Sometimes my apps run for years, and when I sometimes need to update something, it just feels much easier as opposed to other FE frameworks I use.

This leads me to the present: Creating the pinnacle of niche software!

The tech stack of niche software

This is actually not meant as a recommendation nor a deterrent from following this recipe, merely an observation—though I'm still using this stack today.

  1. Elm for the frontend
  2. JavaScript—Actually, not everything for the frontend can be written in Elm—so enter JavaScript
  3. Squidex—Every real-life FE needs a CMS. Enter Squidex
  4. .NET—Custom backend
  5. Nginx
  6. Docker

Conclusion

Though I think this entire project could have been solved by simply using WordPress, I know this project will grow. Therefore, I need a flexible foundation able to scale and easy to extend.

In the coming articles, I'll go through the entire setup. And believe me - it won't look like anything you have ever seen before.

Top comments (0)