Follow

Is there anyone out there who's NOT writing their templates in Slim these days?

And if so, why?

Seems like Erb is more popular than I expected! That's motivation to put some effort later this year into improving erbse (which we use for dry-view's Erb support).

Thanks @citizen428 @d @A_rayB!

@timriley I still use ERb.

I used to be really into HAML until I started getting into AngularJS where you make heavy use of custom attributes (e.g. ng-foo="bar") and HAML didn't make that nice to use. I don't do AngularJS these days, but I never got back into alternative templating engines either.

It looks like Slim has great support for custom attributes out of the box.

@timriley ERB here. No allegiance or anything, just do!

@timriley ERb for me. With Emmet it’s about the same amount of typing but you mostly see the final HTML.

@citizen428 I've seen this Emmet thing mentioned around the place. I think it's time I look into it!

@timriley At my last job it was erb.
I think because they didn't want to learn something new. 😒

@timriley First time I'm hearing about erbse. I always thought that github.com/jeremyevans/erubi is now the de-facto implementation, considering that it has Tilt support and it's now the default in Rails.

@janko We prefer erbse in dry-view because it has sane block capturing out of the box (without any need for using capturing/buffer concat helpers), and this is an important aspect of dry-view's rendering features.

Erubi offers this too, with its capture_end engine, but the syntax is unusual.

Given dry-view works with all tilt-supported engines, we need to do a little work to help the user ensure a compatible engine is available. See github.com/dry-rb/dry-view/pul for more details.

@janko See also github.com/dry-rb/dry-view/pul for how gross things look when we use engines that _don't_ have implicit block capturing.

@timriley @janko hah. I hadn’t heard about erbse and wondered how it does capturing. turns out it just uses Temple’s built-in capturing. cool!!

@judofyr @janko Yep! I am very, very appreciative for the work you've done with Temple! ❤️

@timriley @janko it's been a while since I worked on Temple now. it's mostly minad's work recently :-)

@timriley I've tried several (slim, haml, etc.), but extra cognitive load (how will this translate to HTML?) vs. erb has generally pushed me back to erb

@timriley I should mention, that said, that I used github.com/judofyr/tubby/ for a small project recently.

@timriley ERB too, because it’s built-in and close to the HTML output, which I prefer over abstracting it away like HAML does, for example. I don’t have much experience with Slim, though.

@timriley only working with Haml, love it's abstractive syntax and obligations like indentation, it is restrictive but produces cleaner html tree. Worked a lot with erb, but since I hate working with HTML, I feel inconfortable working with it.

Sign in to participate in the conversation
Mastodon

Follow friends and discover new ones. Publish anything you want: links, pictures, text, video. This server is run by the main developers of the Mastodon project. Everyone is welcome as long as you follow our code of conduct!