Live data from Hacker News

Matestack – Reactive UIs in pure Ruby

matestack.io

81–90 of 120 posts

Re: Matestack – Reactive UIs in pure Ruby

#81
post #76

Earlier quoted context omitted.

Well, realistically, rails is a bad choice for a json rest api. As for everything else you said, it is doing that as far as i'm aware. Webpacker it's a thing.

Is it? It has an api mode and I’ve used it extensively for that at multiple workplaces and projects.

Yes but at that point you are getting all the disadvantages of Rails, without the strong points (fast prototyping and everything related to rendering HTML pages, file uploading etc.).

Presuming you wanted to stay in Ruby for the API and wanted to stay in a project similar to Rails (so, preserving ActiveRecord), Roda + ActiveRecord gets you there with already much higher performance.

If you think about it, a JSON API needs very little. Rails has a lot of added complexity for just rendering JSON. Even the sheer amount of files a Rails project has by default is enormous for something that simple.

Re: Matestack – Reactive UIs in pure Ruby

#82
post #26

Earlier quoted context omitted.

No, there are three layers on how to use matestack. Without reactivity, it just creates pure HTML. If you use reactive functions like :onclick, :toggle, :async, you basically configure/fill VueJS components provided by matestack. On the third layer you can write your own VueJS components in Javascript, but still use the matestack DSL to then use/configure it.

Ah. I see. I wonder if they're not just hiding a lot of complexity like that; I mean once a component becomes decently complex, that there's no way for you to implement it right without learning Vue.

Technically yes, we're abstracting away complexity and as always, this comes with a price and has the potential to fall on your toes down the road ;) In my eyes the available core components get you quite far already, and then, once you hit a certain threshold, it's "just" Vue.js and a therefore - in our eyes - a managable and approachable additional effort given you have some experience in JS (it's not like we make you buy into a whole new paradigm/programming language/an outdated framework)

Re: Matestack – Reactive UIs in pure Ruby

#83
post #45

Even if this was a good idea, the push on commercialisation puts me off. And as other commenters have said, the DSL feels like it would end up being a hinderance. Stimulus (and perhaps StimulusReflex) feel like the safer bets for the dynamic rails future.

As someone who's been involved with the project from day one, I'm genuinely interested in what other suggestion you have for making a living while wrinting OS software. There's a lot of discussions around sustainable open source, and I wonder what's so wrong about asking people that find the project supportable enough to become a GH sponsor (I myself am one, since leaving the company around Matestack as a co-founder due to mental health issues), asking companies that profit from it for a tiny compensation and offering premium add-ons & consulting (like, e.g., the people behind Sidekick, Trailblazer or Laravel do). Tough ask when tons of OSS is free & high quality, but then again not everybody has the luxury of either already being famous and/or being employed at $bigcorp to write OSS for a living (and we as a community perhaps should embrace different paths?!). Looking forward to a constructive discussion if you find the time :)

Also, there's a lot of "I think the DSL ends up a hinderance" in this threat from people that (perhaps) haven't tried it and judge from the looks. Maybe that's just the tough HN crowd, but every single person we've actually had using it was pretty happy to with it once they were fully onboarded :)

Re: Matestack – Reactive UIs in pure Ruby

#84
post #3

Love the idea of it, even if it's not for me. Ruby needs new blood infused into it. I realized recently that Rails started losing its popularity because it just didn't quite keep up as the web evolved. Where the framework and its community resources (guides/tutorials) should have started promoting REST APIs and out-of-the-box no-friction compatibility with modern tooling like npm/webpack/react/whatever, instead it st…

I think it's more that the massive engineering effort that's gone into improving JS has leapfrogged it over languages like Python, Ruby & PHP in terms of performance and tooling. And since you're stuck with JS on the frontend there are some significant advantages to using it on the backend as well. I don't think any of the current JS frameworks are as comprehensive as Rails but it's clear where the momentum is.

The concept of performance is interesting, to me it should be more applied to the user's experience of performance. And personally, when I come across a slow, janky SPA where a server-rendered site would have made a lot more sense, I feel immediately annoyed by the lower performance.

Re: Matestack – Reactive UIs in pure Ruby

#85

Earlier quoted context omitted.

Christ. It did keep up. Every new rails release just makes it better and better. Rails isn’t popular anymore because people followed the swan song of language isomorphism overlooking JavaScript’s deficiencies. NodeJS improved by... adding Rails features. It’s amazing that people think there’s more to this story. It was Node that couldn’t keep up with Rails. No one cares cuz they didn’t want to learn ruby.

I don't really see too many companies or projects using node on the back end. It's pretty hard to buy that node replaced rails. I see a lot more Java than anything else.

That's because Java is one of the top 3 adopted languages and is general purpose. A more relevant comparison would be between Node.js and Django, Rails or Laravel and as far as job stats go, eg. https://indeed.com, Node.js is everywhere.

Re: Matestack – Reactive UIs in pure Ruby

#87
post #82

Earlier quoted context omitted.

Ah. I see. I wonder if they're not just hiding a lot of complexity like that; I mean once a component becomes decently complex, that there's no way for you to implement it right without learning Vue.

Technically yes, we're abstracting away complexity and as always, this comes with a price and has the potential to fall on your toes down the road ;) In my eyes the available core components get you quite far already, and then, once you hit a certain threshold, it's "just" Vue.js and a therefore - in our eyes - a managable and approachable additional effort given you have some experience in JS (it's not like we make…

Thanks for clarifying! How did you choose FE framework, what were the considerations? If you wanted to have the same DSL but with Stimulus instead of Vue - would that have worked?

Re: Matestack – Reactive UIs in pure Ruby

#88
post #43

Earlier quoted context omitted.

You can try out Turbolinks, the Rails equivalent for LiveView.

No, liveview does everything on the server, including holding the frontend state, which is why it's so powerful. Liveview can't be reproduced in ruby, currently. It might be a possibility once Ractor are there, but even in that case Ruby doesn't have the performance optimizations of elixir templates (and given how liveview works, those are needed). It might never be possible, or it might be possible in many years.

Yes this is where I see Ruby 3 being irrelevant, unfortunately. Ruby and Python are single-threaded, dynamically typed languages designed for the 1990s. You can try to retrofit anything you like and pretend you have real concurrency or static typing but it will never be the real thing and you'll just end-up with thousands of legacy libraries.

Re: Matestack – Reactive UIs in pure Ruby

#89
post #80
post #67

Earlier quoted context omitted.

Almost always word of mouth. They start looking for somebody experienced in what they want to do (development and/or software architecture) and some eventually find me. So selection bias is very possible.

How do they find you?

He said word of mouth, obviously through a business network. It's a good thing to keep in touch with people and maintain business links for both parties. I do it all the time.

Re: Matestack – Reactive UIs in pure Ruby

#90

Too much introduction, lack of real beginner's tutorial. If the tool is so great, please make it as "for beginners" as possible. We need tutorial first, not concepts first.

Fair point I guess, we seem to have made the tutorial less discoverable over time...thanks for the feedback, we'll improve this!

For anyone looking at this right now, here's the 10-step-guide: https://docs.matestack.io/docs/reactive_apps/1000-tutorial#t...

Post reply on HN