r/dotnet • u/CryptosGoBrrr • May 27 '22
Regular WebForms user here and proud of it; anyone else feel like modern web development and frameworks are making things unnecessarily complex and solving non-existent problems only to create new ones?
It saddens me that even in this sub, there's a lot of hate towards WebForms, mostly because "it's old!".
I'm in my mid-thirties, became a professional "web developer" pretty early at the age of 19 after having been a hobbyist / 'script kiddie' since I was 11. I originally started messing around with PHP but was sold to C# and .NET as soon as I touched them in my first job. I'm now what you'd call a "full stack" developer, also feeling comfortable doing front-end work and database stuff. A jack of all trades, master of none. But at a comfortable level, because you don't need to be a 'master' at every layer to make cool stuff. Next week I'm starting at my 8th employer, once again as a lead developer (I've been lead dev at 2 former employers).
Visual Studio (no, not you, VS Code) and WebForms are still pretty often my tools of choice. Why? Because it gets the job done, it's simple, its only requirement is the .NET Framework, literally all the stuff I've worked on in the past 20 years have been SaaS solutions that are hosted on a Windows Server / IIS. All the companies I've worked at have had at least one monolithic, legacy WebForms Solution that was still in development or maintenance. Sure, I avoid huge Silicon Valley tech companies and startups like the plague, but practically every company I've worked at or applied for a job at, mostly resorted to WebForms. There's still a crazy demand for .NET developers that can work with WebForms in my area.
However; other, external 'senior' devs or devs online will often tell me that I'm "reinventing the wheel" and should start using newer alternatives, but should I? I've really given all the modern stuff an honest try. Angular. React. Docker containers and Kubernetes. .NET core and recently NET 6. Every single one of them feels like bloat and like they're solving problems that were never really an issue with the way I've been developing and deploying successful applications for the last ~17 years.
If anything, 'modern' web development feels like having to work with a hacked together, bloated monolithic mess. It's terrible having to 'Go to Definition'/F12 more than a handful of of times to go through a garbled mess of implicit, dependency injection heavy business classes, controllers, factories and other classes to find something. The amount of boilerplate and amount of humongous frameworks just go get the simplest of components in an application (a date picker or an 'ajaxified' grid, oh no, the complexity!) feel like they're growing larger by the day. Suddenly it's normal to rely on a couple dozen third-party NuGet packages to get even the most common functions working. In spite of mobile/tablet usage becoming more and more common, nobody seems to be batting an eye when even the most simple web site or application has to download 5+ megabytes of static assets (CSS, JS, etc.) and 'frameworks' just to load/work.
Literally no company I've worked at or been to wants or can keep up with the continuous stream of technical upgrades and maintenance this results in, either. 3 Years ago I worked with the (at the time) brand new Angular 8, apparently we're already at version 12 now, Jesus. I see it happen all the time in dev teams: some dev guru introduces humongous front-end framework X backed by a gazillion new NET core libraries/components and powered by a custom script backed fully automated CI/CD pipeline only to jump ship after a couple of months and leaving an incomplete, steaming pile of garbled mess that nobody knows how it works. There's old WebForms applications I've made a long, long time ago that are still perfectly up and running to date, that have had little to no technical maintenance whatsoever. "Publish" in Visual Studio is literally all one'd still need to do to get one of those deployed on a test or production server, no Jenkins, CI/CD pipeline, docker containers or whatever necessary.
Are we collectively losing our minds and purposely making (web) development harder, or are the majority of developers online just acting smart online and making everything a technical pissing contest? Only Blazor feels lightweight and pragmatic enough as a modern alternative to WebForms as far as I'm concerned, and I'm still hesitant to use it for larger projects in case it's just yet another fad like the many we've had in the past decade.
58
u/HamsterExAstris May 27 '22
At least the five MB are only downloaded once, instead of constantly being passed back to the server as a hidden input on every request.
Generally speaking, I think your complaints about the client-side frameworks are valid. But MVC is easier to work with than Web Forms to me. Youdon’t need huge amounts of boilerplate or humongous frameworks.
Needing to keep up with technical upgrades has always been a problem. There are companies still developing software with VB6 and VC++6. The more often you do it, the easier it is.
121
u/ThereKanBOnly1 May 27 '22
While there are may be people who hate WebForms just because it's old, there are also quite a number of legitimate reasons to dislike webforms. Personally, I'm glad that I'll never have to use WebForms again, just like I'm glad I don't have to do DCOM or deal with Marshalling or mess with the DTC.
There's a lot of tools that "get the job done". What you're saying is that you're fine using the tools your familiar with, and while there's nothing wrong with that, it still doesn't mean that the technology doesn't have its flaws.
I'm going to be brutal, but if you want to work at a decent place 5-8 years from now, then yes, you should look to something newer.
And if that's the work your happy doing, then okay. But understand that those legacy apps eventually get sunsetted. They eventually get more and more expensive to maintain and no longer provide the value that they once did. When that happens, what does your employer do with your position?
They're solving problems you haven't had because you've continued to work in an ecosystem where Microsoft has wrapped everything up in a nice little package and made it easy. The issue with webforms wasn't that it didn't make it easy to do the easy stuff, it was that it REALLY got in your way when you were trying to do the hard stuff. These technologies are aimed at solving the hard stuff.
I hate to do this, but I think it's important to give you a brunt interpretation of your career from an outside perspective. I see a dev that has likely worked at small shops on small projects with a legacy technology. I'm seeing 7 companies in 15-ish years, which means that on average either your projects have lost funding, you've jumped ship because they've "moved your cheese", you've been mostly a maintenance dev without doing a lot of feature development, and/or you likely haven't seen the long term issues of keeping technologies like webforms around. It also sounds like you're more interested in coming in, doing your job for 8 hours, and heading home. Inherently there's nothing wrong with any of these things, and not all of them are even directly your fault, but if I'm a hiring manager at a decent .Net shop, I'm probably passing on your resume.
Quite frankly, you're only seeing the negatives because you're comfortable with WebForms. If you're going to work on interesting projects, you've got to get uncomfortable. When I finally switched to ASP MVC, my life was so much simpler than it was in WebForms. The whole page lifecycle/loading/session state challenges immediately went away and were replaced with a much simpler mental model. I've tried to develop truly interactive front end pages with WebForms and it was painful. Now that I've picked up Vue.js they're much easier to work with, much quicker to develop, with less code that's more maintainable.
If you're looking for a perfect technology, it doesn't exist. It's all trade offs. Whether you like it or not, this is part of the game of a professional developer. Technologies come and go, and keeping up with them is what keeps you relevant. Yea, there might be old COBOL guys out there who are rolling in it, but there's a lot of other dead languages like VB6 and Delphi that have next to no job prospects. Look at where things are going in the next version or two of .Net. WebForms will likely be given the boot at some point. Even if it sticks around, fewer and fewer employers are going to be using it. That's just the nature of things.
25
u/sorressean May 28 '22
I'm not sure what this is except OP ranting about new technologies. Maybe consider reading and learning about them before you just write them off and talk about how cool it is to use windows 98. Webforms works fine and there are still plenty of systems that are using it, but I very much appreciate my code being in MVC. It makes it easier to reason about and know where things will be. Webforms leaves it all up to the user and people implement differently. There are plenty of technologies that are a round peg for a square hole, but it's best to not write them off until you know what the gains are or have spent at least a couple hours in them. I find that webforms easily devolves into mess, has severe limits (good luck with a lot of modern apps) and is harder to maintain the more developers that have touched it.
CI/CD and Docker are very useful, but if you don't see the point of unit tests, you won't see the point of ci/cd. It's not just about right click and publish, there's a lot more that gets done in that pipeline. Unit tests are more of a modern push though so perhaps that's just too new and upsetting?
52
u/whiskeydiggler May 27 '22
I mean, work with what makes you happy, but WebForms was outdated 10 years ago. You didn’t mention where you’re located, but if you continue insisting on working with legacy technologies don’t be surprised if the job opportunities get ever smaller as more and more companies transition off.
11
u/musical_bear May 28 '22
Yeah, WebForms isn’t hated just because it’s “old.” I also find it interesting you managed to write all of this without a single mention of MVC…it has almost all of the “benefits” that you seem to like about WebForms, except it’s still fully in support and getting updates, and isn’t full of WebForm’s delightful “black magic.”
19
u/throwaway_lunchtime May 27 '22
The only real issue I had with webforms was that I kept encountering project that were poorly done, not following good design for webforms.
MVC makes things a lot easier these days and there is no way I would start a new project with webforms.
Visual studio publish still works with MVC core etc.
5
u/[deleted] May 28 '22 edited May 28 '22
No. The entire post back view state shit is a mess to do deal with. Webforms encourages the creation of untestable and difficult to maintain code. You complain about modern frameworks creating monolithic messes but then webforms? Doesn’t even make sense.
Oh and don’t forget it can’t take advantage of any of the performance enhancements that define .Net core and beyond.
7
u/ScrewAttackThis May 28 '22
Is this serious or a troll post?
9
u/_LouSandwich_ May 27 '22
I mean who doesn’t love page refreshes? Sync your eye blink with the flicker please. BTW, sorry that the page scrolled up to the top.
7
u/[deleted] May 27 '22
I agree, it's a pain to traverse. But there's a good reason it is being done. Functionality is being better split up so that it is easier to modify and maintain the code. Having a function with 500 lines is a pain to maintain, test and read.
If it's happening often maybe it is time to have a conversation with the devs in question and maybe get to know the reasoning behind the remarks. Why develop a library to create a wheel when there's a small, tested library which has perfectly fine wheel functionality?
Havent ever touched jenkins, CI/CD is used to test code when pushing to your branch and immediately deploy to your place of code. Docker is used to containerize applications and make sure it runs everywhere AND it allows for scaling.
Blazor server's hello world application is big enough in the sense that you have a default set of JavaScript code needed in the browser and your server needs to render HTML every time there's a change made. Blazor client has to download a big part of the .net core framework in order to run C# in your browser. I wouldnt call that light weight at all.
I think it is in your best interest to research new functionality and why new design patterns are being promoted the way they are. Personally I try to see my colleague's feedback as a way to improve. There's often a good reason behind what is being said.
36
u/[deleted] May 28 '22
Some of us have used ASP since before .NET and came about our hatred of WebForms quite honestly, through hard work 20 yrs ago. When MVC showed up, it started working with the rest of the web stack the way the web actually works and kept me in .NET. Same with when it went cross-platform. If these things hadn't progressed, I'd have definitely left .NET a long time ago. But, if I never touch another aspx again, it'll be too soon.
31
u/eigenman May 28 '22
Big nope to WebForms and that's not because it's old.
29
u/DoctorPrisme May 28 '22
What's wrong with the current set of "do the backend, put it behind a rest API, do the front end, communicate between both via the API"?
That's easy, scalable, flexible, clear, ...
41
u/centurijon May 28 '22
Look into razor pages - to me it feels like the good parts of WebForms mixed with the good parts of MVC.
The difficulty of Web Forms is it’s a maintenance nightmare in a large code base. Super easy and fast to get something running, but slows you down more and more as you add features to your app, or even to catch up with modern web design standards.
To me that’s because MS designed WebForms to feel like WinForms, so all the desktop developers could pretty easily jump over and not have to re-learn a bunch of concepts. The problem with that design is that the web really doesn’t work like a desktop, so they built a whole framework around abstracting HTML and web calls that you have to use, or find a ton of workarounds to do what you really need.
22
u/Spartanman321 May 27 '22
I haven't used Web Forms so I can't speak to if today's stuff is bloated or not, but CI/CD is a godsend, especially for audit purposes. I can tell you exactly which code changes went to which environment at which time, and who made the change. Copies of each build can be retained for however long I want so that if we need to revert a build, you just redeploy the previous build.
CI/CD also speeds up deployments and makes coordinating changes so much easier. We have 7 different applications in multiple code repositories. Our builds are setup to automatically push the latest version of our main branch for our test environments. So once the code is approved, it gets merged in and I don't have to worry about if I accidentally overwrote someone's changes because my version of the code was a few days old. Then we're able to push any of those test versions to production by clicking a button when we're ready.
CI/CD is also way better for security. If you can deploy from your desktop, that means you have a connection open to your prod server. If you get hacked, you are now a vulnerability. CI/CD significantly reduces the amount of access granted, making sure that your servers are more secure.
Also, just keep your builds simple. Most of my CI/CD builds are "install nuget exe, download nuget packages, build solution, publish solution artifact." Having it be 4 steps makes it pretty easy to work with and have others understand it if I were to leave. Then you just rinse and repeat those steps for each app you have.
CI/CD is different from Docker/Kubernetes. They are tools for a certain job, so I'd agree they can add unnecessary bloat if you have a small internal web app. But if you have something that is public facing with lots of users, they significantly help with scalability.
21
u/rock_like_spock May 27 '22
I feel like this really undersells what CI/CD is and why it's useful in development. A decently-configured pipleline with solid automated tests can help stop breaking changes from being deployed well before making it to production. It also helps safeguard against deploying the incorrect version of your code (say you mean to deploy changes on the master branch directly from VS, but you're still set to development). Right-click -> Publish can't help you safeguard against that.
3
u/JimJams999 May 27 '22
Online companies need to sell via many platforms. Desktop yes, but also hundreds of mobile devices, tablets, in device screens and more. Support for tons of screen and usability options which grows every day. Good luck with that with web forms without libraries and dependencies.
Also real time/live asynchronous updates are the future of all interfaces and Web forms do not do this. If you think web forms can cover that you need to retire as your way behind the technical flow.
13
u/jzazre9119 May 27 '22
Razor pages has been a wonderful middle ground between the web forms vs mvc world. We now do razor pages exclusively, except for one or two very minor blazor server side apps. For our uses, mvc was extreme theater and complexity compared to asp.net forms. And now with .net 6, razor pages is even easier to set up and get going.
Problem for us is, there's no migration path from a complex, ,vb.net asp.net forms to razor pages... it just doesn't exist. I'd even be willing to keep it in vb.net if there were a way. All of our other apps have long since been ported to c#.
I feel for you, but feel sorry for who's coming behind you to maintain it...
6
u/rogercafe May 28 '22
I reckon you have been solving the same problems your whole life. In that sense you've found the best way to build crud solutions in .net.
Maybe you should look at different problems and then try to understand the different (newer?) Solutions
5
u/thilehoffer May 28 '22
Have you even tried Razor Pages? You can still publish right from Visual Studio to IIS or an Azure hosted web application. You don’t need to use Webforms to keep it easy/simple.
5
u/angrathias May 28 '22
Separation of concerns in the #1 reason I don’t like WF (and any backend rendering for that matter) it leads developers to often squeeze every layer into the UI.
Let the browser be the client and let the server handle the business logic, the API gives you a nice separation layer between which you can re-use on a Mobile App, Microservice service or automation system.
4
u/vegas_guru May 28 '22 edited May 28 '22
I’m obsessed with simplicity and been struggling with similar issues for 20+ years, usually ending up implementing my own solutions that simplify things to the max, coding in C#/.Net. I don’t even use Linq or entity framework, but have better performing code that feels clear and simple, yet does quite advanced stuff and has complex integration with multiple databases. Some time ago I started using Dapper and it feels simple and clean enough. I only always hated implementing GUI just because nothing felt natural and sufficiently separated from the rest of my code, so I was ending up with either console apps, or own HTML interface. But I must say that, even though it may sound like an advertisement but I’m totally unrelated to that company, recently I fell in love with DevExtreme for my UI/frontend (with jquery rather than Angular or React, again because of simplicity). It’s basically just a collection of web UI components that you configure, rather than program, and each connects to your app via JSON to retrieve/update data, so you can cleanly separate the UI from the rest of the app, even have separate developers working on each. There are other ui component libs like Syncfusion and Telerik, etc, but for some reason I found DevExtreme to be just so simple to use and full-featured that I’ve been excited about it and spent last month developing awesome looking but simple to develop GUI front-end for my apps. Anyway, I’d look into any external web GUI component libraries, because they have been evolving for years with similar goals: to make it clean and simple to develop apps. Most importantly, I wanted my end-users/customers to be able to be able to customize the UI, and that’s where DevExtreme fit perfectly.
1
u/[deleted] May 28 '22
I have to agree with some of your... observations. I disagree with others. The NodeJs is justified, as are you by "it gets the job done." But, it also doesn't. The JS crowd end up with a massive pile of ... code I wouldn't trust based on the apparent assumption because anyone can read it, someone must have, right? And DLL hell is replace by importing a JavaScript library several times and versions fighting for a nearly sane mess of vulnerability mascerading as "safe" because neither your server or their browser trusts JavaScript outside the sandbox.
Webforms brought a Winforms model along that was always too complicated for my liking. Yes, kinda trendy, but at least it's more than a few months and people can actually maintain the code. I maintain some Webforms apps, even today.
So, the guideline to me is knowing when you need a hammer. Or a shovel. Or a blowtorch. The more tools you CAN use, the better you can say "this is the right tool." I've done some cloud, NodeJs, Angular, Webforms, PHP, python, perl, Bash, PowerShell, Go, VB 6 through VB.Net 4.5, C# 1 through 6, C++, Pascal... Assembly, C, Basic, even bits of Forth.
I like Asp.Net MVC and Razor, but I also work in PHP maintaining Drupal and WordPress sites. Not because it's the tool I know, or is good enought, but because I think it's the best tool. Most web forms apps I find are too spaghetti like, so I generally break the code down into an MVC implementation. It's 90% just code re-organization from code-behind to a controller. And I prefer C# to VB because VB tries to "do the right thing" an aweful lot and, too frequently, it's not a good thing, let alone right.
I don't hate on Webforms, but I like the simpler approach offered by C#, MVC, and Razor views.
1
u/insulind May 28 '22
You've certainly generated some discussion!
3
u/_Michiel May 28 '22
So how is your testing going? And scaling? And performance?
And a lot of other "non-existent" problems.
2
u/fori920 May 28 '22
Lol, I never saw a proud WebForms ninja. What a surprise. You must be an Illuminati, sir.
Whatever, some things you’re talking about, I sort them out via Vue.js which is lighter than React and Angular craziness.
And regarding server-side stuff, I feel you’re contradicting so much in regards on handling user input. There’s still postbacks and most stuff processed in WebForms is sending the whole thing, as well as handling the crap that UpdatePanels are and have been for a long time.
For those things, MVC handles it better.
2
u/Neophyte- May 28 '22
webforms doesnt suck because its old, it sucks because it tries to apply desktop dev model onto the web.
2
u/BiffMaGriff May 28 '22
I appreciate your post! It is very brave to post an unpopular opinion on Reddit.
I too started on WebForms before moving to MVC and more recently to blazor. (For about 16 years or so)
I wonder though, are the rest of your tools still the same? Are you still rocking VSS as your source control? Are you still writing stored procs on SQLServer2003? Are you still retrieving all your data in DataSets? What did you think of jQuery when it came out?
2
u/shadofx May 28 '22
Web development peaked with xslt/xhtml.
2
u/pako_adrian May 28 '22
So much in this post that makes no sense and is untrue.
It all depends on the use case and where the product is heading... I personally work with WebForms as well as MVC (incl, react, .net core), both utilising CI/CD, docker, pipelines in DevOps - they all solve different problems that you might not see, but don't be so stubborn and learn in-depth what they actually solve, from this post it seems you know very little, especially that as a "Lead Developer" you see no value in CI/CD... lol...
Fair to say that someone with your mentality, knowledge, and awareness isn't someone I'd appreciate working under/with.
4
u/ChamAramis May 28 '22
WebForms is definitely easier and faster to develop on. However, customer satisfaction and user experience are far more important than developer "comfort".
I do agree with you that everything on the front-end is becoming increasingly harder, but the end-result is just beautiful to look at. To me, that's worth the hassle.
4
u/odyseuss02 May 27 '22
I'm right there with you my friend. I have built stuff with react and angular and I don't know why as time goes on software development gets more and more complex. It should be the other way around. At the end of the day it's what the customer wants that will win out. If I can whip up an application in 2 weeks using Webforms or Winforms that would take the react folks on my team 20 weeks (this is not an exaggeration) the customer 100% of the time will go with the "outdated" technology. I'm happy to build with the new and cool stuff but I find all that stuff usually does is just make development take longer.
And also having had to use that CI\CD stuff before it is such a joy to just click "publish". You are not alone.
2
u/Krom2040 May 28 '22
I don’t know if I have the writing skills to express exactly how much I disagree with the general sentiment in this post. WebForms was a fundamentally terrible technology, for reasons that extend well beyond (but not limited to) it’s inherent scalability problems. It was a wrapper that functioned as basically on obfuscation layer on top of how the Web really worked, in a way that encouraged people to write bloated, messy code. You could certainly crap out some very basic functionality quickly, but nowadays people write real, honest-to-God applications in Web browsers, not just semi-static Web pages. Bare minimum doesn’t cut it. I would be shocked if anybody could write something like Outlook365 or Google sheets or anything in WebForms.
While it is true that people choose to bring in altogether too many dependencies in your average Angular or React app, that’s just how Web devs are, and it’s not at all required. You could write extremely full-featured apps these days with nothing except Angular and possibly some kind of styling toolkit. And the number of actual breaking changes in every Angular update are pretty small.
The problem is that you have to actually know HTML and CSS and JavaScript now, which many people in the field really don’t. But knowing the basic foundation of the environment one works in should not be an unreasonable expectation. Anybody with a bit of experience in Angular and those other foundational technologies should have no problem cranking out equivalent functionality to whatever they did in WebForms 15 years ago, because frankly, people were only really churning out basic bullshit in WebForms.
1
u/JSM33T Mar 12 '24
I used webforms, i loved the simplicity , the server controls , then came the requirement hell, 50+ controlls in pages, need for server roundtrip with view state just to change something trivial like button color, message(you can make use of javascript with it but then again its half half shit, also the msajax library did conflicted with new and custom libraries ,might be skill issue here) and all, need to have a common backend for multiple front end. Thats when i needed to move on from webforms. it was good but for new projects its a big no atleast with my skillset and experience. I still would love to have this simple way of building webapps but thats not possible unless wasm shines.
1
u/TerentiusRex Aug 22 '24
Webforms allow me to update one page of my website, and then transfer the new page in. I can build the page before transferring it, or let it build on its own the first time it is called. Instead of overwriting the original I rename it, appending today's date. Now I've got a built in history of my changes and can bring the original back if the new has any problems. So easy. I love it.
1
u/Relative-Cow3606 Oct 27 '24
Hi guys,
I totally share your thoughts,
and I am looking for community of Web forms devs.
Are you still active? :)
I really have a feeling "they" are trying to push us, but I see no reason why can't we live side by side? :)
1
u/JustSpaceExperiment May 28 '22
RequestFactoryFactoryProvider
1
u/jd31068 May 28 '22
I think the frustration comes from projects that don't need to scale to the level that makes sense for some of these newer technologies, being developed in them, it can feel like driving in a thumbtack with a sledge hammer.
There is a place for each tool where and when it feels appropriate for its usage, just because something is newer doesn't make it automatically better in every aspect and every use case.
1
u/seanamos-1 May 28 '22
So, regardless of how we feel on this, you might be forced to change. .NET 4.8 is the last .NET to support webforms. It has a reasonably long support cycle attached to Windows 11 and the latest Windows Server but it is effectively a dead end.
As for my feeling of webforms. I was never a fan of it. I worked on a quite a few large webforms projects, one of them was for a big e-commerce site. It worked ok for internal apps, but public facing apps it just wasn’t very good. You really felt like you were going against the grain when trying to add JS into the page. MVC did a better job of not trying to abstract away the nature of the web.
As for modern web practices, particularly SPA development, yeah, it’s gotten crazy, I don’t think most people would argue against that. Very complex build chain with lots of dependencies.
It does enable creating extremely complex UIs that are very responsive, far more easily than ever before. If you need that, then use it, otherwise don’t.
CICD is quite widespread, the benefit outweighs the small maintenance/setup cost. The last place I worked where manual practices were in place was just over 10 years ago. No pipeline, no deploys. Our practice is to set up a pipeline at least by your second commit on a new repo.
1
u/[deleted] May 28 '22 edited May 28 '22
You with your fancy Web forms, ASP has served me well for the last 30 years. It works much better, less back and fro.
Html, vbscript, javascript, Asp, activeX, webforms, silverlight, mvc, jquery, bootstrap, razor, angular, react, angular, vue... about to hit blazor for giggles. Keep up son, your an embarrassment....
1
u/unndunn May 28 '22
Unless I mistaken, you can’t do APIs with WebForms, at least not in a truly restful manner. Even if WebForms was easier to work with, that would be a huge dealbreaker.
1
u/aek82 May 28 '22 edited May 28 '22
The web is not the same as it was back in 2005/2006. Webforms are good for specific applications, namely simple form submissions.
I think Blazor is a step in the right direction, especially combined with WebAssembly and RPC. Separation of concerns and modularity can lead to gains in efficiency that cannot be achieved sometimes with the monolith you see in web forms.
1
u/[deleted] May 28 '22
I get what you’re saying, I mean JS frameworks and libraries are huge culprits of making massive boilerplates that are generally overkill for the average project, but I’ve noticed those are usually best for your first project with those. There’s nothing stopping you from creating your own boilerplate.
The constant updates and changes in how things can and should be done can be jarring though and difficult to keep up with. It’s something I’ve struggled with React with. Going from “Class components are the way to do things!” to “Actually, functional components are the way to do things…” and no consistent documentation nor articles or threads to give a definitive answer on which is the “best” way. But I also have to keep in mind that it’s just one approach.
I use WebForms on a daily basis, but to be honest… I kind of dislike it. It works, but I find the plain old HTML / Vanilla JS (which is pretty much what it boils down to) to be pretty limiting. If I need a variable from the server in my Javascript (after the page loads), I either have to use AJAX or I have to put the variable in some weird hacks script at the top of the page. It’s difficult to manage that especially when you need a mix of variables on initial page load and then also need to update things based on user input and interaction.
I think this is the main reason people are becoming averse to WebForms is because it feels a lot like the PHP days.
In a lot of these front end frameworks, they do a great job managing this client-server thing with application state and specialized HTML like JSX or data attributes. Albeit, sometimes a bit more complex to figure out the workflow and lifecycle, but at least to me, it feels less hacky.
Also, the push for RESTful applications and APIs has been a huge reason too. The WebForms boilerplates and examples really do a horrible job of showing how you can have a mix of the standard WebForms template plus REST, imo. I’ve ended up making separate projects just to have the API boilerplate.
Generally, I think calling WebForms “simple” is a bit of an overstatement. I’ve often struggled to find out how to do exactly what I need to do without scouring 10 year old articles that have outdated syntax or downright inaccurate information.
Also, keep in mind that until recently, you HAD to use Windows in order to use WebForms. Not a lot of people willing to cough up extra cash for that Windows Server license and I think that’s the MAJOR difference between WebForms and most of these JS frameworks. WebForms is a combination of backend and frontend. There really isn’t much of a way to separate the two which is often something I find people want to do nowadays. React, Angular, Vue, etc. are just JS at the end of the day, it can be run in any modern browser which means any machine. The boilerplates take advantage of dev servers with hot reloading, but usually you build them once and you can point a WebServer to the directory and it just works. Easy to use in with an API written in any code base whether it’s JS, Java, C#, etc. Not to mention there’s also Typescript making it easier to manage objects and classes similarly to the backend. And finally, there are ways to directly create Web, Desktop and Mobile apps using the same code base. Something that WebForms definitely cannot do.
So, I get what you’re saying, but I think the extra couple MB or extra setup to avoid boilerplates is worth it. Also, you often don’t NEED to upgrade the JS libraries. Rarely are you using something in the frontend that’s going to require major security concerns anyway. It’s not like your little animation or icon library is going to expose access to your database and you shouldn’t be doing any encryption or authentication or anything like that in the frontend anyway. So, unless there’s a major feature in a newer version that you’re looking to have, generally updates won’t be required that often.
1
u/realjoeydood May 28 '22
Tldr but yeah.
The industry is predictably cyclical.
Eventually, they'll group all of the ancillary new shit into some sort of standardized method of usage like they did with all of the functionality of vb into an organized framework.
No idea how they will do it or how it will work but that's part of the cycle at the top.
1
u/[deleted] May 30 '22
I feel like the main issue is that the web in general has had some drastic changes from about 2015 on and keeps doing so.
The JS frameworks are starting to feel even a bit dated to me. While I am good with react and use it daily for just about everything....
It still feels like it's all a big hack to do things the web should do natively or with a very light layer. And yes web components but they suck.
The JS frameworks made interactivity easy but made other things that should be simple hard. Forms, css, etc.
Not sure what the answer is.
Sometimes I'm like...I just think life is easier on the back end. But even then nothing is really the way I want it. Either there's too much ceremony and bloat from when things were built a different way (.net) or not enough convention (go) or the fact you have to use a different language completely to make it usable (node/typescript) and still not enough convention and built in stuff.
I think maybe a few more years as .net moves further from mvc that might be a really good bet and as go keeps growing and there become some more de facto standards.
I'm mostly referring to like your general back end api talking to front end sites and calling other services.
1
u/cosmokenney Jul 19 '22
I don't know bro. Once you get past the 'concepts' in any framework like Angular there are economies of scale compared to the development effort involved in webforms. Also remember that when you started with webforms you still had to lean a lot of concepts like master pages, bundling, response caching, the binding syntax, the template syntax, the server, request, response interfaces. And the challenges, like how to do dependency injection in if you're into that sort of thing.
In Angular and some of the other frameworks you get that stuff all setup and ready to start coding with a few keystrokes using the CLI.
1
u/MikeNPreston17 Nov 19 '23
https://khalidabuhakmeh.com/htmx-with-aspnet-core
You might try this.
1
u/BullShinkles Dec 23 '23
I agree! Web Forms, which can be just as fast if not faster than MVC... Pure boilerplate baby! Forget all the abstraction, disable viewstate, disable sessionstate (use cookies instead), disable autoeventwireup and now you are starting to talk some performance! Forget EF and ViewBag dynamic wrappers for the sake of easy, its just meaningless bloat that needs to be processed! Take the hard road and gut it out and most of all, stick to Sprocs via ADO for almost everything and secure access to your DB tables in the process. Push as much processing as you can to the client using custom JS... etc...
Forget the MVC page request life cycle! Forget MVVM, and throw out the baby with the bath water too!
Back to reality: MVC is another tool and it is not better or worse than WebForms. If you feel like you must stick with WebForms, do it, but there is nothing inherently wrong with MVC, and the coding geniuses at MS have done a great deal of optimizing it to work with all of the other components in the Microsoft Web Development Stack. It sucks to be forced to switch gears, but as Bruce Lee says, "Be like water", so follow his advice and go with the flow, but don't forget your WebForms! It has a purpose and a reason, and the .NET Framework will be supported and live longer than any of us on this reddit. There is so much code that has been written in the .NET Framework, that it is mind boggling.
If you really want to stay with one Web Programming paradigm, just learn PHP, it hasn't changed nearly as much as .NET over the last 20 years, and almost 80% of the world's websites are made with it.
0
u/brakeforwookies May 28 '22
I once heard “those who are resistant to change are destined to perish.” But also screw that. Do what you love, screw those people who say it’s too old or not modern enough.
Also I’ve never used web forms. I was born and raised on mvc and react/net core as a dev. I know nothing.
-5
u/[deleted] May 28 '22
Yes - our young guns will call this boomer technology and then bring all these immature frameworks together because they read a blog on it.
It’s really trivial to over-engineer and misapply patterns today. It’s also way too easy to get dependencies on random nugets or npm packages. Open source is cool but there is a lot of homemade trash which should not be brought in as a dependency
0
u/AQDUyYN7cgbDa4eYtxTq May 28 '22
It's terrible having to 'Go to Definition'/F12 more than a handful of of times to go through a garbled mess of implicit, dependency injection heavy business classes, controllers, factories and other classes to find something.
--- Exactly, don't forget "Go To Implementation" because everything is an interface.
0
u/tanishaj May 30 '22 edited May 30 '22
Webforms was great for simple applications over data run over local networks. Need to display a bunch of data, select a row, and update the database? Cake. Even "complex" apps are easy to reason about because it is all page based and controls and events make sense to most non-web devs with some GUI experience. Web forms made sense when it was introduced as a way of making the web easy for the kind of devs that most companies employed at the time. So, I get what the commenter is saying here.
What if you understand the web though and want to make an application that embraces that paradigm? Well, Webforms is going to fight you every step of the way. Want to incorporate other web technologies? Good luck. Want to create lean pages that load fast? Good luck. You understand HTTP verbs but you have never crested a desktop GUI app? Have fun wrapping your head around ASP.NET events.
If you want to build a form based app over a database without a lot of web bling the Webforms is still fantastic. If you want to build a large, modern web application, it is bloated, complex, and slow.
Final thought: building tests for Webforms just sucks.
-9
u/tyroswork May 27 '22
I completely agree. Multiple times that I tried to start using MVC and the new .NET stuff, I'm surprised how bloated it is. MVC is a total mess of having to maintain so many files just for one page. WebForms was just way simpler.
With that said, Razor pages seem to be a little step back towards WebForms which I like.
-8
u/OneWorldMouse May 27 '22
Considering that the only good thing about Blazor Server is you don't have to do
anyas much JavaScript, I feel ya. I also don't see many companies going for CI/CD pipelines. They take months to learn and months to convince anyone to install on their servers. Of course that's just their internal testing environment. No way in hell on their production servers.-4
u/Zardotab May 28 '22 edited May 28 '22
Yes! An obsession with Web Scale and mobile has made bloat-addicts out of the industry despite that fact that a majority of biz CRUD is not web-scale (Netflix-sized) and only has a small mobile portion or need. Microsoft has abandoned the smallish end of the spectrum. "Power Apps" is allegedly supposed to fill in that gap, but it's a potpourri of random gizmos lacking a unifying concept.
What we really need is a state-ful GUI markup standard. Until then, Web Forms is the closest to sane ordinary CRUD dev an MS shop has, and MS is trying to kill it.
11
u/[deleted] May 28 '22
[removed] — view removed comment
5
u/[deleted] May 28 '22
[removed] — view removed comment