Of all the web frameworks you used in the past, most of them probably have a lot of features in common. I like to entertain myself thinking that choosing frameworks is like choosing clothing style.
I think we, as developers, are highly influenceable. We like to follow trends. And by doing so, we often jump from one framework to the next. I used to do that until I settled down with Ruby on Rails. I didn't choose Ruby on Rails because it was the best, I chose it because, like clothing style, it's the one I felt comfortable with.
Nonetheless, Rails is a huge framework with a lot of dark corners. For many people, Rails feels like a black box.
APIs are hard to discover
APIs are hard to discover because they do not represent solutions to specific problems. They are like lego pieces and it's up to you to find the right pieces to your problem.
You need to understand how the pieces interact with each other and it's not trivial.
Some people who have come up with some sort of solutions wraps those solutions inside abstract gems for you to use. And then those gems become defacto standards for solutions that would otherwise be easy to fix using Rail's API.
You should rebuild the wheel when needed
Reinventing the wheel is not the same as rebuilding it. But for some, the two are equals.
Our society builds wheels of different sizes with different materials for different purposes all the time.
But when it comes to programming, we need to use gems for everything and anything, discarding our own implementation as something that is unimportant.
It's like using libraries wouldn't come with a cost.
Let's start talking about native, reusable solutions
It's not easy to be creative with huge frameworks. It requires you to dig in the source code and understand how things work together.
Rails has a LOT of APIs that are underused by developers. I'm sure some of you who are reading have experience working with part of Rails that would be foreign to a lot of people. If you are one of them, I want to know about it!
Because this is why I started this blog, to talk about different part of Rails that I felt were misunderstood or downright ignored.
So let's start talking about solutions we come up using native APIs.
- I want to know how people create their forms using Rails' FormBuilder.
- I want to see how and why you are using concerns.
- You have created some neat validations for e-mails or address? I want to know about that.
My contribution to you
In the past 6 months, I've wrote about different part of Rails. So, if this post resonated with you, you should read more about what I wrote and leave your feedback in the comments.
- Rails alternative to engines
- My most useful Rails' configuration
- From URL to your controller
- ActionDispatch and Rack Middleware
- Sessions and cookies in Rails
- Customize your app/ folder