https://www.fullstackruby.dev/podcast/3/ Home Articles About Topics Compare and Contrast Frontend Development Fullstack Development Jamstack Frameworks Object Orientation Podcast Rails Refactoring Ruby 3 Fundamentals String Theory Syntax and Metaprogramming The Art of Code [ ] Twitter 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! Links: * Article: HTML is a Serialized Object Graph * ERB * Erubi (ERB variant used by Rails, Bridgetown) * Liquid * Serbea * Haml * Slim * Arbre * Markaby * Wunderbar * Papercraft * Rux --------------------------------------------------------------------- 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 nearly 200 fullstack Ruby developers and subscribe to receive a timely tip you can apply directly to your Ruby site or application each week: [ ] [ ] Subscribe --------------------------------------------------------------------- Other Recent Articles [beach-scen] What's Better Than DRY? DOEY! (Don't Over-Exert Yourself) When I'm in my "flow state" as a programmer, what I'm constantly doing is finding ways to eliminate redundancies, learning to recognize that entire subsystems as a whole can be made entirely redundant if I simply took the time to search for higher-level abstractions. Continue Reading [colorful-w] How Ruby and Web Components Can Work Together Use Ruby to transform incoming data and generate reusable markup, and use web components to encapsulate frontend styling and behavior. Build discrete building blocks of UI while collapsing mental models. Chef's kiss! Continue Reading More This Way sponsored by Whitefusion, a boutique web studio based in Portland, Oregon Elevate your Ruby skills. Everywhere. Follow on Twitter: @fullstack_ruby Website content licensed CC BY-NC-SA 4.0 Contribute to this repository on GitHub Other Resources Ruby API Ruby Radar Bridgetown GoRails Hotwire Dev StimulusReflex Share on Social Media Tweet News Feed