3 ms·
IMO the industry vastly overestimates what a typical SPA can do.
by throw-the-towel 2y ago
IMO the industry vastly overestimates what a typical SPA can do.
- jiggawatts 2y agoMore accurately: the industry vastly overestimates the requirement for SPA and the typical app vastly under-utilises its capabilities. I recently had developers blink slowly and ask me to repeat the statement that an ordinary ASP.NET Razor web forms app could be used for a site that had a single form on it (with about a dozen text fields only). "But... how... can it submit? Doesn't it need an API?"
- pmezard 2y agoCan you elaborate for those who do not know what a Razor web form is and how it can persist things without an API?
- Riverheart 2y agoInstead of sending json to an api, form submission does a post back to the form page which detects this and reads the contents of form to do work on it. HTML pages can have code associated with them to do this in a cshtml file (C# specific). Lots of older frameworks support this, PHP being a popular example. Razor replaced ASP.Net webforms which has also been around forever. See https://learn.microsoft.com/en-us/aspnet/web-pages/overview/ui-layouts-and-themes/4-working-with-forms#reading-user-input-from-the-form https://learn.microsoft.com/en-us/aspnet/web-pages/overview/...
- jiggawatts 2y agoWhich is a good summary, but in this specific circumstance the confusion of the developers wasn't about Razor pages, but the very concept of a "HTML" page having any interactivity of any kind without JavaScript and an API endpoint. There is a very substantial fraction of developers who have never done anything else, and are completely unaware that such thing is even possible.
- pmezard 2y agoAh postback. I probably missed the point of this thread then as I am not considering that to be an SPA. Or is this about it not being an SPA?