Ruby DSL Handbook

 

 

DSL's shouldn't require a masters degree in metaprogramming.

You've read about building Domain Specific Languages with Ruby but it can be hard to make sense not only of the metaprogramming but of the myriad of opinions and approaches. How do you get started and how can you make it all work? It can make your head spin when you dive in to try it.

You know writing DSLs in Ruby is powerful and flexible, but aren't sure exactly how to get started.

 

The worst part of attempting to write a DSL is worrying that you'll get stuck without knowing where to turn. What's the difference between class_eval and instance_eval? And how do you know when to use them?

Taking control of your project with custom DSLs would make your code so much more expressive

Learn to make code that expresses your team's shared understanding of a business problem.

Projects like Ruby on Rails provide sensible DSLs for managing relationships between models in your system. The Sinatra framework gives you a DSL to provide affordances in your code so that web requests are handled the way you expect. Chef was created as a DSL for managing server configurations

You can model your project's needs with you own DSL too.

From the author of Clean Ruby, Ruby DSL Handbook gives you the knowledge you need to build the right tool for your business domain.

Ruby DSL Handbook will give you the knowledge and experience to create expressive programs.

Use business terms in code that make sense to you and your team; read Ruby DSL Handbook and bend your code to demands of your business.

I learned some new aspects of Ruby I was able to apply the very same day.

- Michael Buckbee

 

With Jim's new book, Ruby DSL Handbook, he has once again tackled a difficult to understand problem space in Ruby and brought it into readily understandable examples and explanations. His grasp upon the language comes out in a force, in a way that even beginners can understand. Reading this book opened my eyes to different ways to tackle DSLs. It immediately had me wanting to explore different ways of reimplementing once of my own. - Jim Nanney

 

Get your team on the same page. Free your mind with the ability to create code that represents your ideas better. Remove the often distracting boilerplate code and wrap up your concepts in easy to use methods.

What's inside the package?

Ruby DSL Handbook is currently being written and you'll receive regular updates as the content is updated.


The Complete Package

Grab a copy to:

  • Get started quickly. Begin by learning about creating methods that reflect a concept from your domain.
  • Manage customizing your DSL. Create code that allows for easy alterations for when concepts aren't implemented exactly as expected.
  • Evaluate generated code. Dive into class_eval and instance_eval and know the trade-offs in designing your DSL.
  • Dynamically define methods. Understand when to use method_missing,define_method and other approaches to handling messages.
  • Understand antipatterns. After you've read through the recommendations for building your own DSL, take a look at some examples of what not to do.
  • Read popular project evaluations. Take a look at popular Ruby open source projects to see how they've implemented DSLs.

Screencasts

See a how the metaprogramming can become a simple tool as support for DSL methods are built. See the benefits to properly structruing generated methods to allow for easy debugging.

Sample code and Cheatsheets

Get a handle on the samples from the book to use in your own projects. Read through the test code. Keep a quick refrence for instance_eval, module_eval, class_eval, instance_exec, module_exec, and class_exec, and more.

Ebook in PDF, ePub, and mobi (and NO DRM)

Pick up the easy to read ebook and take it with you everywhere. Read about how Ruby works to help you create interfaces that reflect your needs and read about open source projects and how they implement their DSL code.


Pick it up now and get all updates for $119. You'll be automatically updated as new content is added.

Pick it up now and get all updates for $119. You'll be automatically updated as new content is added.


“Jim is one of those rare people who can crank out award winning site designs, go and implement the backend Rails functionality, and be lead engineer for his project team… all on one project. I’ve seen him do it. Jim is someone to watch out for, and get on your project if you can. (Especially with his upcoming book, which I think will rock the Ruby on Rails world a little bit, changing how the community thinks about large/complex Rails codebases.)"

- Ryan Wilcox, Owner, Principal Engineer, Wilcox Development Solutions

Pick it up now and get all updates for $47.

Just the Ruby DSL Handbook

Ebook in PDF, ePub, and mobi (and NO DRM)

Pick up the easy to read ebook and take it with you everywhere. Read about how Ruby works to help you create interfaces that reflect your needs and read about open source projects and how they implement their DSL code.

Get Ruby DSL Handbook for the cost of few trips to the coffee shop at only $24 in PDF and ePub. Get it that cheap for a limited time only. You'll be automatically updated as new content is added.


What about updates?

You'll automatically get updates as the book and extras are updated. The email you use to purchase will receive all notifications when newer versions are released. Buying now means you'll be notified via email as updates are regularly made.

Share it with your team

If your whole team needs to tackle the problem, get in touch about a Team License to get started.

What people are saying

If you're a journeyman-or-better craftsman in any real OO language coming to Ruby, Jim is one of three or four guys you'll want to read avidly, just to keep your sanity.

- Jeff Dickey

Free Building DSLs Course

Get a free email introduction course to building DSLs for your project. 1 email each day for 5 days.

 
 
Get a FREE sample chapter

Get a sample chapter of Clean Ruby and you'll be added to my periodic newsletter of helpful Ruby tips.