Unsure about Rails being a good fit for your API? We’ve got you covered!
Many people consider Rails a bad fit for writing APIs. And they’re (partially) right. By default Rails is configured to do for what it’s made for - request-response applications with HTML views served by the backend.
Working in Rails environment can be a little bit problematic because of this. You can use tools like Grape or Swagger to make your experience a little bit better. But you already know Rails. Learning Grape or Swagger means a new technology to add to your toolbox. New things to learn means slowing down your work. Who has time for it when schedule is tight and clients are demanding features?
Imagine you can have your Rails app, even in the legacy state, but have techniques and opinionated ways to improve both your developer’s experience and speed of delivering features? To take your API to a higher level in terms of maintenance and provide user experience improvements?
It is possible. You don’t need to spend months to research the topic. We already did it for you :). Marcin found techniques to make Rails more friendly for being a backend solution for sophisticated frontends you are making. Those are also applicable for mobile clients as well.
Those opinionated techniques and topics are the foundation of our book, called Frontend-friendly Rails. You’ll learn how to upgrade defaults Rails provides and introduce cool features that’ll help you with making your apps more maintainable and faster to write.
Listen to the podcast
Is listening a your kind of consuming content? You can grab a 30-minute podcast where we discuss what you can find inside the book and what were our motives to write it:
You can also download it in the mp3 format and see the shownotes here.
Practical, step-by-step solutions
To improve Rails experience with writing APIs, there is some knowledge you need to grasp to do it in an optimal way. Fortunately, you don’t need to do it before implementing it. Most techniques in the book are written as a step-by-step, complete solutions. They start with showing benefits a technique may bring to your workflow, so you can discuss it with your team before. You’ll also get all theory necessary to take full grasp of what you’re doing.
What’s inside?
It’s the first release of the book. All customers who buy it will get all further updates for free. It consists of ~100 pages of the exclusive content, as well as bonus chapters which is a set of blogposts we’ve created through years which can be handy for you inside this book - totalling 154 pages.
If you don’t like it, you can always get your money back - we have a no-questions-asked refund policy so all you need to do is to drop us an e-mail.
The book is a set of techniques you can apply to your both new or legacy code. You’ll learn:
- How to make your frontend more independent and boost your frontend-first development speed by introducing UUIDs instead of sequential IDs generated by Rails. A step-by-step, database-agnostic, legacy-ready solution is presented.
- How to avoid very often headaches while migrating assets to a different domain by knowing what is CORS, how it works and how to configure it correctly in Rails.
- How to stop inventing your own response formats and waste time by implementing the JSON API industry standard, making your API ready for even the wildest of features.
- How to create a real-time API by implementing the real-time messaging bus and making it indistinguishable from user actions. This is the most maintainable solution I’ve encountered in the wild so far.
- How to get your thinking about frontend on the higher level by knowing and understanding consequences of your frontend decisions.
- How to build a modern asset pipeline using Node.js tools instead of Sprockets. This way you can use today technologies in an easy way. This is a step-by-step guide with explanations of every tool you’ll use. After the process you’ll have an environment ready for production builds, testing and using the newest standard of JavaScript.
About the author
Marcin is a co-author of bestselling Rails meets React.js book, as well as React.js by Example and Responsible Rails. At Arkency he’s worked on number of web projects in collaboration with small startups as well as large corporations.