Episode 3: String-Based Templates vs. DSLs: the Pros & Cons of Each

In this episode, I break down the main conceptual difference between “string-based templates” such as ERB and “DSLs” such as Papercraft, the various options within each category, and some of the reasons you might want to choose one approach or another depending on your use case.

Jared White by Jared White on February 22, 2022

Typically when you mention “Ruby” and “template” in the same breath, people will think of ERB. Perhaps even Haml. But did you know that the Ruby ecosystem offers a wide variety of template engines, and quite a few are built upon pure Ruby? In this episode, I break down the main conceptual difference between “string-based templates” such as ERB and “DSLs” such as Papercraft, the various options within each category, and some of the reasons you might want to choose one approach or another depending on your use case. Enjoy!


Become a part of the Fullstack Ruby community and learn how to put your Ruby skills to work on the backend AND the frontend. Know somebody who’s a JavaScript developer but is interested in learning more about Ruby? Share the site, podcast, or newsletter with them!

The Fullstack Ruby Podcast is a production of Whitefusion, a boutique web studio based in Portland, OR.

Theme music courtesy of Epidemic Sound.


Subscribe to the RSS feed

in your podcast player of choice.

“Ruby is simple in appearance, but is very complex inside, just like our human body.”

matz

Join 300 fullstack Ruby developers and subscribe to receive a timely tip you can apply directly to your Ruby site or application each week:


Other Recent Articles

Episode 9: Preact Signals and the Signalize Gem

What are signals? What is find-grained reactivity? Why is everyone talking about them on the frontend these days? And what, if anything, can we apply from our newfound knowledge of signals to backend programming?

Continue Reading

Episode 8: Hotwiring Multi-Platform Rails Apps with Ayush Newatia

I’m very excited to have Ayush on the show today to talk about all things fullstack web dev, his new book The Rails & Hotwire Codex, and why “vanilla” is awesome!

Continue Reading

More This Way