edit: yeah, after reading more, this is an affront against nature. forget about separation of content and presentation, now you can even throw your backend into the dumpster fire!
RubyUI (Former PhlexUI): Ruby Gem for RubyUI Components
11–20 of 40 posts
Re: RubyUI (Former PhlexUI): Ruby Gem for RubyUI Components
#12I’m impressed by this project’s progress. It’s more than just a render library. Although they claim it’s 12x faster than ERB, but I couldn’t find their benchmark.
I believe it's referencing this: https://github.com/KonnorRogers/view-layer-benchmarks
In some extreme scenarios with tons of very small partials, it can win against Action View because the Action View partial lookup is significant overhead.
Re: RubyUI (Former PhlexUI): Ruby Gem for RubyUI Components
#13Re: RubyUI (Former PhlexUI): Ruby Gem for RubyUI Components
#14It cannot be overstated how nice it is to move away from erb and into pure ruby. Private methods as partials is a game changer for refactoring your UI.
Re: RubyUI (Former PhlexUI): Ruby Gem for RubyUI Components
#15Earlier quoted context omitted.
I believe it's referencing this: https://github.com/KonnorRogers/view-layer-benchmarks
Can't believe this still has to be debunked. No Phlex certainly isn't 12x faster than ERB. It's noticeably slower than ERB, e.g.: https://github.com/KonnorRogers/view-layer-benchmarks/commit... In some extreme scenarios with tons of very small partials, it can win against Action View because the Action View partial lookup is significant overhead.
Re: RubyUI (Former PhlexUI): Ruby Gem for RubyUI Components
#16Looks interesting, but I wish there was a way to alias the component names, since every component class, some of which have common names, take root in the global namespace. (though I suspect that easily enough done manually)
Re: RubyUI (Former PhlexUI): Ruby Gem for RubyUI Components
#17Phlex is an amazing project. Makes frontend fun again. I've built my own UI library using DaisyUI and Tailwindcss that we use in all our Rails projects: https://github.com/inhouse-work/protos It cannot be overstated how nice it is to move away from erb and into pure ruby. Private methods as partials is a game changer for refactoring your UI.
Re: RubyUI (Former PhlexUI): Ruby Gem for RubyUI Components
#18Earlier quoted context omitted.
Can't believe this still has to be debunked. No Phlex certainly isn't 12x faster than ERB. It's noticeably slower than ERB, e.g.: https://github.com/KonnorRogers/view-layer-benchmarks/commit... In some extreme scenarios with tons of very small partials, it can win against Action View because the Action View partial lookup is significant overhead.
It says on the website it's 12x faster so it must be true! https://rubyui.com
Re: RubyUI (Former PhlexUI): Ruby Gem for RubyUI Components
#19this looks dope. has anyone built anything substantial with phlex ?
Re: RubyUI (Former PhlexUI): Ruby Gem for RubyUI Components
#20Earlier quoted context omitted.
I believe it's referencing this: https://github.com/KonnorRogers/view-layer-benchmarks
Can't believe this still has to be debunked. No Phlex certainly isn't 12x faster than ERB. It's noticeably slower than ERB, e.g.: https://github.com/KonnorRogers/view-layer-benchmarks/commit... In some extreme scenarios with tons of very small partials, it can win against Action View because the Action View partial lookup is significant overhead.
I think you’re looking at this from the perspective of having maybe a partial for your header and another for your footer. The way you build views in Phlex is you would have a component not just for the header but also the nav, each item in the nav, and each icon in each item.
We can argue about whether that level of abstraction and reuse is worth it, but the fact is ActionView gets very slow when you build views like that composing thousands of partials — and for people who want to build views like that, it matters.
Still, I think these “12× faster” comparisons are silly. If ActionView was just as fast at rendering thousands of small components, I’d still pick Phlex for the developer experience. I enjoy writing Ruby, not toggling between Ruby and HTML.