If you're not familiar with the Ruby ecosystem, the site does a very poor job of communicating what this is actually about. A single definition of ERB would have helped a lot.
If you're not familiar with the Ruby ecosystem, the site does a very poor job of communicating what this is actually about. A single definition of ERB would have helped a lot.
I’m not sure it’s targeted towards those not familiar with Ruby... though yeah, at least mentioning it’s a templating engine would make it a lot easier to grasp.
(ERB is, I think, “embedded Ruby”, and it functions basically like old school PHP: you just insert pieces of Ruby code wrapped by <% .. %> or <%= .. %>: https://github.com/ruby/erb#recognized-tags)
ERB is also the default templating language of Rails. I wish Django would use an embedded Python instead of the mutilated tool it uses in its own templates. Not only it's yet another language to learn, but it's also underpowered and it forces developers to define custom tags and filters where a call to a method of a plain Python object would be enough. Apparently they are afraid that people embed logic in the templates but I've seen db calls inside the Python code of the custom tags. There is no perfect defense.
https://www.makotemplates.org/
endfor, so it's not 100% real Python but I see that handling structure with indentation inside an HTML file could be a problem. Sometimes it's a problem even inside a Python file. I often have to undo and start again after moving code around. "Was that line inside the if or outside it?"