Programming on Rails

Ruby on Rails is a great web framework. It has changed the way web development is done and influenced other frameworks in other programming languages. Even admittedly, much of the major success of Ruby is due to the wide spread of Rails.

Rails Logo

Being the opinionated framework it is, Rails is built on top of a set of conventions and philosophies. It’s said to be Omakase (お任せ) or chef’s menu of choice (also, watch Rails is Omakase: A Dramatic Reading). Unlike Node’s ExpressJS for example, Rails comes preconfigured with all the stack you need to build your app. Its convenience over configuration led it to be one of the easiest and fastest ways to start building apps for the web today.

Of course, this convenience comes at a cost. Apart from the added difficulty to maintain when the app grows in complexity (which I won’t talk about in this post), the Rails way sets a fixated mindset about programming, namely, web programming. Your entire world view to programming is through Rails and the Rails way. For instance, the places where you can create your classes, the way you connect the backend with the view and the frontend, and the way you write helper functions or helper modules are all set by the framework, Rails. I’m not discussing here the architectural decisions made by Rails however, I’m pointing to the effect of those decisions on the programmer’s mindset.

I’ve been doing Rails for around 4 years now. During this period, whenever I’m working on a task (be it Rails or non-Rails related), I often caught myself looking to identify a pattern; looking for the framework in it. It’s like my mind wants to see all programming as it sees tedious CRUD applications (which are totally fine as long as they are solving a problem). The issue here is restricting my thought process to only one way of thinking however, programming, or rather the creative thinking it requires, needs more imagination and less restriction.

Something I also noticed while working with interns is that more fresh minds tend to be more flexible than experienced developers. Their minds are not yet bloated with way of the framework and they tend be less following to the rules.

So you might ask what to do in order to free your mind from the Rails way. What I suggest is to rebel against Rails. Yes, try different Ruby web frameworks, different languages, new stacks, or even developing for platforms other than the web altogether. Also, try breaking, bending, and tweaking large, complex Rails apps to see how far you can get with Rails. Try a new architecture for your Rails app by dividing your business logic and classes into multiple layers. The world outside the Rails menu is so vast and diverse but you need to see that for yourself.