A Peek into Crafting Connectroots with Ruby on Rails

A Peek into Crafting Connectroots with Ruby on Rails

Ideas come and go. Yet, a select few manage to take root in our minds, demanding our attention and action. To garner quick feedback, we need reliable tools—those simple to grasp, operate, and seamlessly navigate their ecosystem. A robust community offering support is an additional advantage.

Throughout my experiences with various programming languages and platforms, Ruby and Rails have consistently proven themselves to be premier tools. Writing in Ruby feels akin to writing in English. Its simplicity and comprehensibility align with Matz's vision of fostering developers' productivity and joy. Building on this foundation, Rails is an equally empowering tool, keeps developers enthusiastic.

Ruby and Rails developers experience profound satisfaction, in handling these beautifully crafted tools. While the early stages of Rails presented challenges—requiring numerous libraries and adjustments—those days are now in the rearview mirror. With the launch of Rails 7, developers' joy has increased sevenfold.

The Rails 7 stack, inclusive of Hotwire, "an alternative approach to building modern web applications without using excessive JavaScript by sending HTML instead of JSON over the wire," equips Rails developers with the power to minimize dependencies on external front-end libraries. The once burdensome task of setting up Webpack—a necessary step in Rails 6—is now a relic of the past with Rails 7.

Upon installing Rails 7, developers gain access to Turbo and StimulusJS, eliminating the need for extraneous JavaScript libraries such as React, Angular, Vue, Svelte, and others.

For project management—be it personal or client projects—I turn to Basecamp, an unmatched tool in the field. When outlining early features and requirements for Connectroots, the necessary libraries and Ruby gems became clear—everything fit within the Rails ecosystem like pieces of a puzzle.

The time arrived to test Connectroots' main features.

Within an hour, I developed a simple application, complete with an authentication system (Devise & Pundit), interactive pages (Hotwire & Stimulus), sleek design (TailwindCSS), diverse model entities, and a tenant system (Acts as Tenant). Everything worked in harmony. A triumph indeed!

Connectroots operates on a collection of easy-to-integrate libraries that harmonize:

  • Rails 7 with Hotwire.

  • Postgresql as the database for Active Record.

  • Puma for the web server.

  • Redis adapter to run Action Cable in production.

  • Kredis for higher-level data types in Redis.

  • Friendly ID for slugging and permalink plugins for ActiveRecord.

  • AWS SDK for Ruby.

  • CSSBundling Rails for bundling and processing CSS with Tailwind.

  • JSBundling Rails for bundling and transpiling JavaScript with esbuild.

  • Pundit for minimal authorization through OO design.

  • Devise for flexible authentication solution.

  • Acts As Tenant for easy multi-tenancy in a shared database setup.

  • StimulusReflex to enhance reactivity.

No frills, just the Rails ecosystem empowering developers, designers, creators, and authors to function as a "manager of one." This is the charm of Rails.

By now, the effectiveness of Ruby on Rails should be apparent. It's not just easy to start with but also seamless to continue using.

Some may imagine a journey devoid of problems, struggles, or challenges 😓. That's far from the truth. While the Rails ecosystem is robust and capable, the real hurdles emanate from complex business requirements, frequent changes, high demands, intricate thought processes, and the propensity to bite off more than one can chew. The fear of missing out, leading to the addition of unnecessary libraries, invites complexity. This contradicts the principle of developer happiness 😀, negatively impacting productivity and introducing unwarranted setbacks.

Rails alone is sufficient. Additional JavaScript libraries are merely clutter. Rails gets the job done, and it does it well.

As I reflect on the journey of building Connectroots, the heartening reality is that the challenges faced were not due to the choice of tech stack but due to the natural complexity of building a product that caters to diverse needs. This fact serves as a testament to the strength and versatility of Ruby on Rails, further solidifying my faith in its power and potential. And this journey is only the beginning; there's much more to explore, create, and conquer! Let's embrace the Rails journey, and keep coding joyfully! 🚀🎉

Did you find this article valuable?

Support Ahmed Nadar by becoming a sponsor. Any amount is appreciated!