3 ms·
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
by mosselman 7y ago
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?
- pdoub 7y agoBasically, 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 https://www.youtube.com/watch?v=OY5AeGhgK7I
- pdoub 7y agoTechnical 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).