4 ms·
> .NET had a feature where you could essentially code as if you were writing a form application in C# and it would compile to a web form and wire up JavaScript,
by alexjplant 5y ago
> .NET had a feature where you could essentially code as if you were writing a form application in C# and it would compile to a web form and wire up JavaScript, HTML and CSS so you never had to learn anything about web technologies.
This is likely referring to ASP .NET Web Forms. While this is theoretically true the reality was more nuanced; you had to know HTML/CSS in order to style your applications and you had to know a wee bit of jQuery to make things happen on the page when you didn't want to trigger a "postback" (their proprietary term for a POST request laden with the requisite ViewState and session magic). The _real_ magic of ASP .NET was implicit state management... you didn't have to know anything about sessions, cookies, HTTP, CSRF, or LocalStorage (which, sadly, was around for some of Web Forms's heyday because many devs clung onto it for much longer than they should have). The whole point of Web Forms was to replicate the WinForms experience in a web context so that devs didn't have to reason so much about client vs server state. Everything was rendered server-side and state was retained via a combination of session and the aforementioned "ViewState", which was basically a massive encrypted form field with the application state that got submitted with every request.
It could probably be argued that Web Forms doesn't even really qualify as web development. I've weaned developers off of WebForms and for most of them it was their first exposure to basic tenets of web development like HTTP verbs (let alone RESTfulness), JSON, vanilla Javascript, sessions, and actual honest-to-God state management.
- pkos98 5y ago> .NET had a feature where you could essentially code as if you were writing a form application in C# and it would compile to a web form and wire up JavaScript, HTML and CSS so you never had to learn anything about web technologies. So does JVM now :). But with a more en-vogue API. https://blog.jetbrains.com/kotlin/2021/05/technology-preview-jetpack-compose-for-web/ https://blog.jetbrains.com/kotlin/2021/05/technology-preview...
- overtomanu 5y agoI think jsp/jsf were the equivalent to ASP on java side
- alexjplant 5y agoIf memory serves vanilla JSPs were largely stateless but JSF was pretty much the Java version of Web Forms. Obviously it being JVM it required a lot more bootstrapping since it was less opinionated/OSS but the effect was largely identical.
- spaetzleesser 5y agoVery true. I did Webforms for a while. It was fine but once I needed things like Ajax things got pretty convoluted. There were callback panels and stuff. Things were super complex and I spent a lot of time fighting the framework. Then I learned about jquery and saw how simple Ajax calls really are. Same for a lot of other things: the Webforms abstractions made things more complex than they really are. And you don’t learn how things really work. Since then I am very wary of frameworks that provide a lot of abstractions. Easy to get into but after a while there is a risk spending more energy fighting the framework than you would have spent learning the native way. Happened in my company with Xamarin. Looked good for C# but after a few months everything got scrapped and the devs went native.