Live data from Hacker News

Matestack – Reactive UIs in pure Ruby

matestack.io

31–40 of 120 posts

Re: Matestack – Reactive UIs in pure Ruby

#31
post #3

Earlier quoted context omitted.

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.

> I don't think any of the current JS frameworks are as comprehensive as Rails To someone who is switching from the Node ecosystem to Django REST, this seems like an understatement. I'd be happy to use server-side JS for certain microservices that needed its performance characteristics, or for prototyping in something like Firebase functions. But the mere thought of building a standard fully-featured web app in Node…

the whole trend though is that the server side is mostly a very tiny crud layer & a little bit of business operations.

yeah tools like django are amazing packages. node is shockingly hardly any more tamed than it was 5 years ago, still rag tag Express for the most part. with who knows what for the data layer.

but it just doesn't matter. alas! the actual application has been heavily front end biased, & all the real investment g architecture needs to revolve around that front end. it'd be great to have better out of box omakase js experiences. projects like hapi & fastify tried. but there's just not enough effort spent on the back end for that many devs to really care. and plenty of folks are using api based systems or hosted backends, appsync or some hosted graphql, where they can care even less about the backends.

why be comprehensive when you hardly matter?

Re: Matestack – Reactive UIs in pure Ruby

#32
post #9
post #3

Earlier quoted context omitted.

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.

> 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 This is not true – PHP is still much faster when running on the server than NodeJS. JS has got much faster in the last 20 years, but in-browser execution has seen most of the speedup (as it's where most of the optimisation is focussed on).

Pretty sure nodejs is almost always faster in a multi connection setup.

Re: Matestack – Reactive UIs in pure Ruby

#33

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 still prefer the good old “build stuff in rails” (which change a lot, something you don’t really know) over build everything in JS. Which is mostly popularized by new kind of programmers breed who learned everything purely from YouTube.

They don’t know their tooling, systems, how web apps works, make huge mistakes on each level. Just putting the one solutions they know in everything. Do they think about what they doing and if this approach is feasible? No, not at all. It’s like with Wordpress, everyone is using it because of popularity, but WP is a nightmare to work with, and most of the time a huge overkill for what’s intended. I will not even mention Gatsby and super simple websites made in React because of it...

> It's really unfortunate because Rails is such a brilliant framework, and Ruby such a lovely language, and they're falling out of the mainstream and losing popularity because of this. I wish the community would re-align.

And this, this is just outrageous. Do you have anything to back this claim up? I’m not rails/ruby developer, but it always irked me when someone’s saying such thing about any language.

Don’t get me wrong, JS is awesome, React/VUE on top of it too, but the point is, to know when and how to use them.

Re: Matestack – Reactive UIs in pure Ruby

#34
post #29

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’m actually quite bullish about Rails for the fitst time in a while due to StimulusRelex[1]. It’s a similar approach to Elixir’s Liveview and provides reactive, diff’d partial updates streamed over a websocket. This seems a very “now” approach to building webapps. 1. https://docs.stimulusreflex.com/

Cool that people are doing a live view type thing in Rails, but it introduces a lot more complexity without the BEAM

Re: Matestack – Reactive UIs in pure Ruby

#35
post #18

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…

> Ruby needs new blood infused into it. yes, I strongly agree with this, specially when talking about Web tech. I am programming in Ruby (and Rails) for over 12 years and I think I had the same feeling up until a couple of years ago that it become a stable system where I could move quickly and create new products but did not have so much newness. But now I see at least two things which makes me love even more this ec…

What's wrong with old and boring? I don't think all the "newness" coming out of Node/Deno is actually improving anyone's productivity.

Re: Matestack – Reactive UIs in pure Ruby

#36
The crazy idea that Ruby "DSLs" are neat is one of the worst things to come out of Ruby. This code is Ruby, and yet you're encouraged to think of it as a different language that's "intuitive" and "expressive" when you can't even tell what is executing and when. It's a nightmare for anything except the samples.

Re: Matestack – Reactive UIs in pure Ruby

#37
post #31

Earlier quoted context omitted.

> I don't think any of the current JS frameworks are as comprehensive as Rails To someone who is switching from the Node ecosystem to Django REST, this seems like an understatement. I'd be happy to use server-side JS for certain microservices that needed its performance characteristics, or for prototyping in something like Firebase functions. But the mere thought of building a standard fully-featured web app in Node…

the whole trend though is that the server side is mostly a very tiny crud layer & a little bit of business operations. yeah tools like django are amazing packages. node is shockingly hardly any more tamed than it was 5 years ago, still rag tag Express for the most part. with who knows what for the data layer. but it just doesn't matter. alas! the actual application has been heavily front end biased, & all the real in…

> mostly a very tiny crud layer & a little bit of business operations.

Even if you have a SPA, which isn't a given (yes, trends. I know. They come and go), the API, data migrations and background workers can easily be 50% of your code and effort.

Re: Matestack – Reactive UIs in pure Ruby

#38
post #26

Is the Ruby code compiled into JS?

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.

Re: Matestack – Reactive UIs in pure Ruby

#39
post #33

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 still prefer the good old “build stuff in rails” (which change a lot, something you don’t really know) over build everything in JS. Which is mostly popularized by new kind of programmers breed who learned everything purely from YouTube. They don’t know their tooling, systems, how web apps works, make huge mistakes on each level. Just putting the one solutions they know in everything. Do they think about what they d…

Which is mostly popularized by new kind of programmers breed who learned everything purely from YouTube.

They don’t know their tooling, systems, how web apps works, make huge mistakes on each level. Just putting the one solutions they know in everything.

Or—bear with me here—it’s possible that everyone other than you actually isn’t an idiot and there are issues that you are neatly stepping over with this patronising nonsense.

Re: Matestack – Reactive UIs in pure Ruby

#40
I don't know Matestack specifically but in general the problem of DSLs is that they can quickly turn into giant pain in the ass once you need to do something they aren't prepared for. And this has bitten me enough times already(ActiveAdmin, Thor,...).

The other problem is that if you use this you only learn the specific DSL which isn't portable. But if you use and learn the basic technologies under it - HTML, CSS, and pure JS now that is something you can use elsewhere even if you throw Ruby away completely. And the knowledge of the basics is really really important and useful.

Anyways, what is a problem with writing good old .html.erb templates? I don't think there is any.

And for the reactivity thing - the most easiest and fastest(10 minutes at max to install and enable) is to just turn on Turbolinks[1] and include this little plugin[2][3] for persistent scroll position where you want. Now when when you click marked with `data-turbolinks-scroll = "false"` Turbolinks fetches the page, replaces the current page with it, and you are still at the same scroll position. No need for SPA or JS heavy FE or anything.

[1] https://github.com/turbolinks/turbolinks [2] https://medium.com/@kosovacsedad/how-to-turbolinks-5-scroll-... [3] https://gist.github.com/sedadkosovac/661d0fd369069cad010f164...

Post reply on HN