News for hackers. Stuff that matters.
Re:Matestack: Rapidly create interactive UIs in Ruby by mosselman on Friday November 29, 2019 @09:53AM (#21664697)
Do I understand correctly in that you are generating Vue.js components from Ruby? If so, how is that less complicated and not like an SPA than simply rendering HTML with erb or slim?
Re:Matestack: Rapidly create interactive UIs in Ruby by pdoub on Friday November 29, 2019 @10:41AM (#21664973)
Technical clarification: We don't "generate" Vue.js components. Matestack generates HTML that contains component tags. Those tags reference existing Vue.js components and hand over some configuration.

This enables us/you to define interactive UI behavior by just configuring predefined Vue.js components in pure Ruby.

If one needs custom UI behavior here and there, just add your own Vue.js components (write some lines of JavaScript) and then add and controll them like you do with the predefined dynamic (=Vue.js) core components. this approach is much easier than creating a standalone JS frontend app. You might end up writing 90-99% Ruby and just some lines of JS while getting an interactive, dynamic UI (or even a PWA if you add some meta information).

Re:Matestack: Rapidly create interactive UIs in Ruby by pdoub on Friday November 29, 2019 @10:04AM (#21664771)
Basically, you're right. In a JS-free world this would be probably overblown (or a niche thing for Ruby fanatics).

Where Matestack shines is when it comes to very generic JS behaviour that you don't want to recreate for the 100st time in a project - just wrap it into Matestack component and tell it what to do. I suggest watching my co-founder and Matestack creater Jonas introduce the concepts behind it: https://www.youtube.com/watch?v=OY5AeGhgK7I