4 ms·
There's a growing realization that you can completely side-step the need for Single-Page App frameworks like React using websockets and the morphdom library. P
by peteforde 7y ago
There's a growing realization that you can completely side-step the need for Single-Page App frameworks like React using websockets and the morphdom library.
Projects like StimulusReflex (Rails) and LiveView (Phoenix) allow developers to build complex, reactive modern apps faster and easier by rejecting the need to even have client state.
https://github.com/hopsoft/stimulus_reflex https://github.com/hopsoft/stimulus_reflex
https://github.com/phoenixframework/phoenix_live_view https://github.com/phoenixframework/phoenix_live_view
I haven't been this excited for a web technology since Rails came out.
- jes5199 7y agoneat! Of course, this makes me want to run React serverside...
- peteforde 7y agoWhatever floats your boat, I guess. I don't understand why some folks are determined to see everything through a React lens. It makes sense for Facebook, which is why they made it. If you're doing CRUD, you are just torching your productivity. Here's an example of tabular data, sorted, paged and filtered in 115 LOC including templates: https://expo-pjf.herokuapp.com/demos/tabular https://expo-pjf.herokuapp.com/demos/tabular No transpiling, no API endpoints, no Redux.
- jes5199 7y agoI just think that React components are more readable and more maintainable than erb templates
- samcheng 7y agoSeems like cool stuff. Unfortunately, both of the StimulusReflex demos (Heroku apps) are giving errors right now. Maybe somebody hit a quota!
- peteforde 7y agoQuota was hit. Temporary: https://expo-pjf.herokuapp.com/ https://expo-pjf.herokuapp.com/
- escanda 7y agoYour mind will be furtherly blown when you realize this has been working for decades in JavaServerFaces!
- nurettin 7y agoExcited for jsf, asp.net, Wt and UniGui. Full circle is complete.
- aitchnyu 7y agoJose Valim responded to me saying its a fast, simpler, stateless and scalable solution compared to stateful solutions. For an example of stateful Java/ .Net app, I use a site that randomly logs me out, logs me out after inactivity, opening stuff in tabs are hit and miss (older ones let tabs mirror each other in background), normal UI actions has unexplainable pauses. https://elixirforum.com/t/phoenix-liveview-is-now-live/20889/71 https://elixirforum.com/t/phoenix-liveview-is-now-live/20889...
- zacym 7y agoDon't forget GWT!
- peteforde 7y agoCitation, please. I can't yet prove that you don't understand what we're doing, but if I failed to communicate the end result, well, that's on me. It's a hard thing to summarize quickly, and I'm working on it all of the time.
- dokem 7y agoI made similar functionality for Django a few years ago called Sniper. You write all your dom modification code as an Ajax request handler. In his handler you yield out a sequence of dom modification objects and sniper handles the rest. I couldn’t understand why this wasn’t a more popular approach.
- rayalez 7y agoCool! Is there such thing for Flask? For Node?