Email the Author
You can use this page to email K-2052 about Build Your Own Sinatra.
About the Book
A book about Rack, Sinatra, Rails, and all the magical things in-between. Master the Rack spec, learn how to write plain Rack apps without a framework, learn how to write middleware, how to build a router, and more!
This is a book about the heart of Ruby frameworks, the Rack Webserver interface. It teaches you everything you need to know to build plain Ruby apps without any framework.
You should read it if
- You have ever wanted to learn how ruby frameworks work
- Want to build your own framework
- Want to modify and contribute to your favorite framework
- You are curious about stuff like env(), call(), and use()
- Have ever been perplexed at anything Sinatra or Rails did
What you will learn
- The Rack Server Interface
- How to construct a valid Rack application
- The APIs of Rack::Request and Rack::Response
- How the internals of Sinatra and other Ruby frameworks work
- How to write a router in Ruby and how routers compile route strings into RegEx
- How to write your own plain Rack applications without any framework
- How to compose Rack applications together and design a framework's API
- and more!
What you will build
1. Plain Ruby apps on Rack
You will build rack middleware and raw rack apps right on the metal. You will build a MVC app on top of Rack without any framework. No Rails, no Sinatra, no Cuba, no router, no framework of any kind just pure Rack.
2. A custom Ruby router
You will get to build your own router complete with matcher and splats support!
3. A Ruby Microframework
You will be walked through how to build a microframework called Eldr. Eldr is a simple, flexible, and clear framework without any magic.
About the Author
I'm a developer, designer and occasional writer.