Ruby on Roda: REST APIs with Roda & Sequel
- Length: 172 pages
- Edition: 1
- Language: English
- Publication Date: 2021-05-19
- ISBN-10: B095H8SYTY
- Sales Rank: #2830383 (See Top 100 Books)
If you’ve been looking for an alternative to The Rails Way, this book is for you. It will change the way you think about designing and implementing web applications with Ruby. It shows patterns, techniques, and tools that you can use to deal with growing complexity, better organize and documenting your codebase.
Learn how to build a maintainable JSON REST API by using the Roda and Sequel and dry-rb set of gems. Move away from messy, traditional Rails code and move towards crisp, clean code.
Why Sequel?
The sequel is a simple, flexible, and powerful SQL database access toolkit for Ruby. Sequel provides thread safety, connection pooling, and a concise DSL for constructing SQL queries and table schemas. The sequel includes a comprehensive ORM layer for mapping records to Ruby objects and handling associated records.
Why Roda?
Roda is a routing tree web framework toolkit. It is built in a similar way to Sequel – a small core, extendible through plugins. This book shows how easy it is to assemble a custom, full-stack framework built from smaller components that Roda provides. This flexibility gives us an opportunity to organize the code in all kinds of ways and the book shows one of such ways.
Untitled Introduction Who is this book for? What are we going to build? Acknowledgements Source code Untitled Getting started Introduction to Roda Introduction to Sequel Untitled Starting project Project Setup Organize application structure with dry-system Database configuration Interactive Console Continuous integration README section Untitled Getting started with Roda Basic Roda Application Setup Test Framework User model Todo model Untitled Securing API Token-based Authentication Tokens generation Tokens validation Untitled JSON Serialization What is JSON serialization? Our Own JSON Serializer Untitled Incoming params validation dry-validation to the rescue Untitled Authentication Users signup Users login Users logout Refreshing an access token Untitled Todo Management Listing Todos Todos creation Showing particular Todo Updating Todo Todo deletion Untitled Security Blocking abusive requests with Rack::Attack Untitled Deployment Deploying to Heroku Untitled Epilogue
Donate to keep this site alive
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.