News for hackers. Stuff that matters.
Re:Htmx: Simplicity in an Age of Complicated Solutions by Riverheart on Thursday July 18, 2024 @06:30AM (#40994231)
Instead 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/...

Re:Htmx: Simplicity in an Age of Complicated Solutions by pmezard on Thursday July 18, 2024 @08:13AM (#40994868)
Ah 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?
Re:Htmx: Simplicity in an Age of Complicated Solutions by jiggawatts on Thursday July 18, 2024 @06:53AM (#40994374)
Which 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.