announcing express_templates v0.3.1; early feedback requested

Hello RoR: Talk,

I have been working on a declarative style template engine that differs substantially from Haml and ERB. I'm calling it express_templates.

Express Templates uses Ruby's block structure and execution order to define document templates and fragments of markup as procs and blocks in a declarative, macro-like Ruby DSL. Simple example:

ul {
  li { "one" }
  li "two"
  li %q({{:three}})

Express Templates provides a Component concept that allows a component developer to encapsulate template fragments and to re-use common logic patterns in a Ruby class. No logic goes in the template code or fragments. All logic is implemented via Components. The file extension for an express_template is but the syntax is just Ruby.

Gem is on github:

More example code is in the README. There is ample test coverage and documentation should you wish to play with it. It has only two runtime dependancies, both of which I hope to remove for a 1.0 release: active_support and parslet.

I am building express_templates to scratch my own itch on a substantial internal project and to make my own and my teams' efforts more efficient. My goal is to facilitate a complete Ruby web UX framework and component hierarchy where the page can still be rendered server-side in the traditional way via the View Context and where the Rails app still owns the layout. I think something like this is important for the future of Rails.

Components in express_templates can leverage advanced client side JS without requiring the user to handcraft markup or client framework code. Express Templates itself has no opinion on JS frameworks. A library of components built on express_templates could select any suitable JS framework or none at all.

I presented express_templates in a lightning talk at RubyConf on Tuesday. Slides here:

Your feedback or encouragement may help guide me to a 1.0 production release sometime in Q1.

Have you been looking for something like this? What kind of pain do you experience with large or new projects using current template schemes? What approaches are others taking aside from going all in on JS heavy apps? I want to know.

Thank you and kind regards,

Steven Talcott Smith
Master Developer, Chief Happiness Officer
ÆLOGICA | Great software teams for hire | Rapid Application Development | Level Up! Tips & Techniques to Up Your Game as a Professional Developer

gpg keyprint C162F8EF [report security issues promptly and privately]