4 ms·
Spoiler, it's just Ajax but it pushes the data through your templates before sending it to the client. We were doing this literally over a decade ago in the ear
by mdoms 6y ago
Spoiler, it's just Ajax but it pushes the data through your templates before sending it to the client. We were doing this literally over a decade ago in the early days of XHR.
- weeboid 6y agoIsn't the point that it's a framework to accomplish this, rather than "look what we can do!"?
- aantix 6y agoThe goal is to have a productive set of patterns for the programmer to follow for dynamic updates. Less boilerplate. More reuse. Consolidation of app state to the server. Feel free to post your code from a decade ago so that we can do a bake-off and compare implementations side-by-side.
- lmm 6y agoLook at any of Wicket 1.4's Ajax examples (bonus if you use a better JVM language to reduce the boilerplate - I was using Scala). It's a great technique, it works great, I'm just slightly salty that the industry felt the need to switch to JS SPAs for, as far as I could see, very little tangible advantage.
- joelbluminator 6y agoOh no, a decade ago!! please show me some hot new Next/Redwood/Svetle code so I can calm my nerves!
- Osiris 6y agoI have a small website and I have one page with an order form and I show a modal with the result of the order. This is how I do it. The Ajax calls gets back HTML that it shoves into the modal. It was just easier than writing JS with templates and parsing JSON. It always felt icky to me because that's not the way you're "supposed" to do it, but it works quite well.
- hu3 6y agoA client of mine has an entire internal Line of Business application built on that mechanic: backend returns javascript to shove HTML somewhere. The trick is that the js is built automatically based on components. Devs rarely have to touch js. It's lightweight on the frontend and a pleasure to develop for since forms are entirely coded on the backend with components. On rare exceptions more complex pages have some sprinkled lodash.js. They have around 400 CRUD pages with complex business validations. Up to 1.5k concurrent users. At that point MySQL starts to sweat a bit and p95 increases above 200ms. All running on 2 machines: a nginx+phpfpm and a MariaDB. The instant no-compilation feedback loop of edit-save-refresh is orgasmic. That system opened my eyes to a lot of preconceptions and buzzwords I once held sacred.
- deleted 6y ago[deleted]