Hacker News new | ask | show | jobs
by oisino 3443 days ago
I was at a dinner last year for the Shopify conference and a dev asked Tobi about a new update to the Rails templating engine and why Shopify hadn't adopted it yet. I was blown away to hear Tobi talking how he personally figured out the extra hardware costs of implementing the update. He is one of the few tech CEOs I am confident has balanced the costs regarding sticking with Rails. That said would love to hear his thoughts on this.
1 comments

What are those two templating engines?
I don't know about the other, but Shopify has its own templating engine called Liquid, which allows their users to create themes etc fairly easily.

https://shopify.github.io/liquid/

Thanks! I suppose the other one is plain ERB.

The advantage of ERB is that it's plain Ruby and there is no need to learn another language. For the same reason in the Python world I prefer web2py's use of Python than Django's custom language. It reminds me of the days of Strut's <c:choose> tags and all the others.

Interesting that Liquid is faster that ERB. All the surrounding HTML tags being the same, it means that the translated Liquid-to-Ruby code is faster than native Ruby code, which is strange. But maybe Liquid is faster at handling the HTML part of the page. I googled for some data but I couldn't find anything.

However I can understand why Shopify doesn't want to put full Ruby into the hands of customers. Some nasty guy could have used Shopify's CPUs to make some computations for free. Apparently GitHub pages also use Liquid, because of Jekyll and maybe for the same underlying reason.

I've been using liquid for a long time (heavy Jekyll user), and it is pretty good at what it does. Shopify actually lets their enterprise customers (Shopify Plus) to run actual ruby code (which runs a very limited mruby setup) to help process orders.

https://github.com/Shopify/scripts-public