Live data from Hacker News

RubyUI (Former PhlexUI): Ruby Gem for RubyUI Components

github.com

31–40 of 40 posts

Re: RubyUI (Former PhlexUI): Ruby Gem for RubyUI Components

#35
post #5

this looks dope. has anyone built anything substantial with phlex ?

I haven't done anything with RubyUI, but I've been using Phlex for the past couple of months and I never want to go back. It's everything I wanted HAML or Slim to be. Everything is code. You create classes and functions instead of views and partials. Everything you know about managing and abstracting code suddenly applies to your UI rendering.

Paired with Tailwind, this is the fastest application development I've ever done.

Re: RubyUI (Former PhlexUI): Ruby Gem for RubyUI Components

#36

I used a rendering library like Phlex back in 2010. I hated it back then and I still don’t like it. They claim it’s faster than ERB but only show micro benchmarks. This is basically a form of lying. This approach stinks for a lot of reasons: - it adds a ton of pressure on the garbage collector. - the backtraces suck to debug. Ruby is better now than in 2010, but it’s still lame. - your templates are largely static. Y…

This is nonsense. You can cache it like anything else. But you probably won’t need to because it’s so fast.

Re: RubyUI (Former PhlexUI): Ruby Gem for RubyUI Components

#37
post #31

Just curious why the decision was made to go with PascalCase for the DSL? Is this meant to help React devs feel at home? Seems very un-Rubylike.

It’s because that’s how constants are named in Ruby. The method names match the constant names of the component classes.

Re: RubyUI (Former PhlexUI): Ruby Gem for RubyUI Components

#39
post #31

Just curious why the decision was made to go with PascalCase for the DSL? Is this meant to help React devs feel at home? Seems very un-Rubylike.

It’s because that’s how constants are named in Ruby. The method names match the constant names of the component classes.

methods aren't constants and the normal ruby idiom if there was a reason for method names to correspond to class/constant names in a different module would be for the method names to be the constant name converted from PascalCass to snake_case, rather than the method names being in the format of constant names.
Post reply on HN