3 ms·
Things are a lot less painful than they used to be. fetch()/promises/async/await and better browser support. https://developer.mozilla.org/en-US/docs/Web/API/
by noir_lord 8y ago
Things are a lot less painful than they used to be.
fetch()/promises/async/await and better browser support.
https://developer.mozilla.org/en-US/docs/Web/API/FormData https://developer.mozilla.org/en-US/docs/Web/API/FormData
https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
Also promises (coupled with async/await) make things a great deal more pleasant and I'm old enough to remember the old days.
- ben_jones 8y agoHow does javascript async/await solve form handling (presumably pure html) and basic PHP?
- noir_lord 8y agoHe said ajax, the asynchronous part can be handled cleanly with async/await particularly if doing more complex field validation/rules.
- onion2k 8y agoJS syntax is a lot nicer these days but that's always been relatively easy. Where web dev is hard, and will always remain hard, is the concept of writing stateless applications. Building something that might seem easy to you, such as a form with server-side validation, is very different to building a desktop app. When you write desktop apps you don't rebuild the entire UI for every update. You don't have to reload the user's entire state on every call. Those things are weird if you're not used to it. It's perfectly reasonable for a developer to say they find it hard. And, arguably, it could be part of the reason why frameworks like React are so popular - they make writing for the web a little more like writing a desktop app, because components can have persistent state.