Webforms was this whole other beast that had UI controls connected to the backend which heavily relied on synching state between the backend (through page loads) and front end for user actions on those controls. It did mean you could write a lot of your UI code in your server side language ( C# / VB.NET ).
This sounds like React with SSR or so-called Universal Web Apps.
And in other ways you had this massive __VIEWSTATE hidden input field that would have to be sent in order to recreate state. But I will say, it was very cool technology at the time.
But I thought we've moved on from that.
I didn't know MS was advocating it as the default choice for server side apps however. Does MVC just become a vehicle for exposing rest APIs then? MVC and Razer Pages can co-locate in the same project without issue.
Get -> return View(GetResponseModel) -> Get.cshtml
Post -> return View(PostResponseModel) -> Post.cshtml
Can the Razor OnGet and OnPost only return one "model" to the "page"? It appears the page can only take one model.
OnGet -> ThingModel -> ThingPage
OnPost -> ThingModel -> ThingPage
The entry point Page (aka a View) seems to dictate the model returned and hence limits what type any "Action" can return. Am I reading this right?
And how about returning other types besides 'Pages' - like JSON (a la JSONResult).