After following DHH for the last few years and watching his opening keynote for Rails World 2024, I found his views refreshing and nice in the world of modern web dev where complexity seems to be the standard. A bit of background, I graduated a bootcamp back in 2020 and have exclusively written in JavaScript and TypeScript the entire time, having pretty much been thrown right in with React, the React way was (and still mostly is) all I've ever known. I am now mostly working in React Native codebases professionally although I am dabbling more in "backend" as I've kind of found I don't enjoy building the UIs as fun anymore. This might be partly to do with just how overly complex the whole front end world is. Is it really necessary for my app with 0 users to have fully optimised images and also make sure it's built in such a way that if there was a spike in users I wouldn't incur any costs. I found the pricing on Vercel a little overwhelming and while I do rate Vercel and these other cloud providers, for making deploying web apps a breeze, it's just overkill when my apps don't have enough traffic for "Fluid Compute" and all the other fancy infrastructure optimisations and features.
So given React is all I've known and I found DHH's view's on web dev pretty much spot on and something I wanted to try and also push myself out my comfort zone and learn something new, I felt it was time to pick up Rails. I know some people reading this might ask "Why Rails?". The Rails ethos is Developer Happiness and getting from Hello World to IPO in an efficient manner. I had thought about maybe using something like Elixir (Phoenix) but Ruby is supposed to have a fairly easy learning curve and is very mature, clearly can withstand scale given it's used at Shopify and GitHub and my good friend Liam had recently started using it and recommended it. I liked the idea of just getting a ~£5 VPS somewhere and hosting it, taking more control of it and trying to break out of the learned helplessness that I seemed to be falling for. The timing of this post is quite well given I am writing this the day after Cloudflare suffers a massive outage pretty much killing half the internet. Taking control, or even just being comfortable to take control when the time arises felt like a good (and fun) move for me to do now.
Services down due to cloudflare
So a couple of weekends ago, I decided to watch the getting started video for Rails and just rewrite my portfolio site in Rails. Given I already had the HTML ready, it's really not a big piece of work, so I added in a couple of extra bits of functionality my previous portfolio didn't have. Such as the CMS dashboard from which I write the posts in and just upload them, instead of my old way of just writing them in a markdown note taking app. So I followed the getting started video and was instantly pretty surprised with how quick you can get moving with it, this isn't going to be a step by step guide of what I did, more just an overview. So after I generated the project I made a start getting my head around the project structure, configs etc and given I already knew about MVC it didn't take long to get moving. My experience using all the built in tools for managing the DB was good, I enjoyed how simple the CLI was and how little you needed to do to actually get moving. It very much felt like a batteries included framework thats been refined over many year to be nice to work with.
Within an hour or so, I'd pretty much ported over my views, built out the data structure for the blog posts and added basic authentication for the CMS. I was pleased and understood how quick it actually all was, another couple of hours messing around with Digital Ocean and getting my head around the deployment process, setting up DNS and the site was hosted. Kamal is a really nice piece of kit, it's nice to just have a baked in config for deploying to any server you want. I did debate deploying it to my Raspberry Pi that I've had sitting around for a couple of years but I opted against that for this project but I imagine I will probably get bored and give it a bash.
Overall, I enjoyed the experience of using rails! My next web side project will be attempted in Rails, this portfolio is just way to small for me to actually gather any real impression and not really a Rails review but more to rant about my reasonings. As someone who's only ever used JS/TS and done things in the React way, I need to try new things if I've any hope to have opinions on how things should be done and I recommend any other developer who's only ever really used one tool and only knows how to deploy sites by clicking a button should do.
Thanks for listening to my ramblings and if you want to chat web dev, mobile dev, tech or just life in general, hit me up!