Why ASP.Net classic sucks today
-
So, I work on a pretty standard web app. The main page has a telerik tab control, which dynamically loads a different server control based on the active tab. My task was to pull one of those controls out and put it on a separate page and put a link in the header to the new page. 10 minutes of work tops. Everything worked fine, but 3 of the telerik combo boxes stopped saving their value. After getting another developer involved after a couple of hours we figured it out. The combo box contents were set during the on load event, which worked when they were dynamically loaded because onload fired immediately. When I put the control into the markup, the data change events fired before the onload. Finding that should have been trivial, but another little puzzle distracted me. Some of the combo boxes worked because they had viewstate enabled and had an empty items collection in the markup. So dropdowns that had completely dynamic contents worked fine, but those with mixed content sources failed because having an item in the markup prevented viewstate from working. And yes, using controls with viewstate is a huge #$@#23 in and of itself.
Curvature of the Mind now with 3D
Please change your title. I feel mine is more accurate about ASP.NET in general - and how crappy stateless programming can be.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
-
Please change your title. I feel mine is more accurate about ASP.NET in general - and how crappy stateless programming can be.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
I'll stand by the succinctness of my title, though yours is more accurate. Stateless programming can be pretty sweet. Trying to fake a stateful model on top of something inherently stateless and high latency is just a disaster.
Curvature of the Mind now with 3D
-
I'll stand by the succinctness of my title, though yours is more accurate. Stateless programming can be pretty sweet. Trying to fake a stateful model on top of something inherently stateless and high latency is just a disaster.
Curvature of the Mind now with 3D
Andy Brummer wrote:
Trying to fake a stateful model on top of something inherently stateless and high latency is just a disaster.
That's true - but what's worse is taking something that should be stateful and then running it on an environment that you need to jump through hoops to make stateful because some idiot decided that a desktop application should be written to be delivered via t'browser, because that way you don't have to deploy anything.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
-
Andy Brummer wrote:
Trying to fake a stateful model on top of something inherently stateless and high latency is just a disaster.
That's true - but what's worse is taking something that should be stateful and then running it on an environment that you need to jump through hoops to make stateful because some idiot decided that a desktop application should be written to be delivered via t'browser, because that way you don't have to deploy anything.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
Still not as bad as an out of date 4GL app from the 90s hosting a vb6 ocx hosting internet explorer 5.0 connecting to an asp.net app which dynamically loads half of its C# code from a database simulation of a file system, as well as all it's navigation and most of it's ui. That would be the worst of all possible worlds. Thank everything I don't work with that anymore. :-D
Curvature of the Mind now with 3D
-
So, I work on a pretty standard web app. The main page has a telerik tab control, which dynamically loads a different server control based on the active tab. My task was to pull one of those controls out and put it on a separate page and put a link in the header to the new page. 10 minutes of work tops. Everything worked fine, but 3 of the telerik combo boxes stopped saving their value. After getting another developer involved after a couple of hours we figured it out. The combo box contents were set during the on load event, which worked when they were dynamically loaded because onload fired immediately. When I put the control into the markup, the data change events fired before the onload. Finding that should have been trivial, but another little puzzle distracted me. Some of the combo boxes worked because they had viewstate enabled and had an empty items collection in the markup. So dropdowns that had completely dynamic contents worked fine, but those with mixed content sources failed because having an item in the markup prevented viewstate from working. And yes, using controls with viewstate is a huge #$@#23 in and of itself.
Curvature of the Mind now with 3D
Isn't it called "classic ASP"? I thought ASP.net was the successor of classic ASP.
-
Still not as bad as an out of date 4GL app from the 90s hosting a vb6 ocx hosting internet explorer 5.0 connecting to an asp.net app which dynamically loads half of its C# code from a database simulation of a file system, as well as all it's navigation and most of it's ui. That would be the worst of all possible worlds. Thank everything I don't work with that anymore. :-D
Curvature of the Mind now with 3D
Andy Brummer wrote:
an out of date 4GL app from the 90s hosting a vb6 ocx hosting internet explorer 5.0 connecting to an asp.net app which dynamically loads half of its C# code from a database simulation of a file system
Oh, so you work here too? Thankfully I don't work on that mess.
"Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" — Hunter S. Thompson
-
Isn't it called "classic ASP"? I thought ASP.net was the successor of classic ASP.
I think the technical designation would be asp.net webforms as opposed to asp.net mvc, or bolting on a number of other view engines. I just think of it as asp.net classic.
Curvature of the Mind now with 3D
-
I think the technical designation would be asp.net webforms as opposed to asp.net mvc, or bolting on a number of other view engines. I just think of it as asp.net classic.
Curvature of the Mind now with 3D
Gotcha.
-
I'll stand by the succinctness of my title, though yours is more accurate. Stateless programming can be pretty sweet. Trying to fake a stateful model on top of something inherently stateless and high latency is just a disaster.
Curvature of the Mind now with 3D
It's not a disaster, it's an art to master. A little bit like taking a Reliant Robin to a race track.
-
So, I work on a pretty standard web app. The main page has a telerik tab control, which dynamically loads a different server control based on the active tab. My task was to pull one of those controls out and put it on a separate page and put a link in the header to the new page. 10 minutes of work tops. Everything worked fine, but 3 of the telerik combo boxes stopped saving their value. After getting another developer involved after a couple of hours we figured it out. The combo box contents were set during the on load event, which worked when they were dynamically loaded because onload fired immediately. When I put the control into the markup, the data change events fired before the onload. Finding that should have been trivial, but another little puzzle distracted me. Some of the combo boxes worked because they had viewstate enabled and had an empty items collection in the markup. So dropdowns that had completely dynamic contents worked fine, but those with mixed content sources failed because having an item in the markup prevented viewstate from working. And yes, using controls with viewstate is a huge #$@#23 in and of itself.
Curvature of the Mind now with 3D
Sounds more like an issue with the Telerik controls more than the ASP.NET classic per se. These controls do produce a lot of garbage on the page though.
"A democracy is nothing more than mob rule, where fifty-one percent of the people may take away the rights of the other forty-nine." - Thomas Jefferson "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." - Benjamin Franklin Edbert Sydney, Australia
-
Sounds more like an issue with the Telerik controls more than the ASP.NET classic per se. These controls do produce a lot of garbage on the page though.
"A democracy is nothing more than mob rule, where fifty-one percent of the people may take away the rights of the other forty-nine." - Thomas Jefferson "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." - Benjamin Franklin Edbert Sydney, Australia
There are a couple of complicated issues interacting. The one that has burned me many many times is that the containing control load, data change, databind, inner control load events can all fire in different orders depending on how the controls are loaded. The effects of that are seen in all the before/after events that keep getting added to make sure things go in the correct order in all possible cases. Not having a well defined order for the events is the core issue. I think the approach of having super configurable uber controls the problem with telerik, unfortunately that is what most devs want. Once you have too many options, the controls just too bulky and are too hard to test.
Curvature of the Mind now with 3D
-
It's not a disaster, it's an art to master. A little bit like taking a Reliant Robin to a race track.
Jörgen Andersson wrote:
It's not a disaster, it's an art to master.
More power to you, but I'm going MVC as soon as I get a chance.
Curvature of the Mind now with 3D
-
Still not as bad as an out of date 4GL app from the 90s hosting a vb6 ocx hosting internet explorer 5.0 connecting to an asp.net app which dynamically loads half of its C# code from a database simulation of a file system, as well as all it's navigation and most of it's ui. That would be the worst of all possible worlds. Thank everything I don't work with that anymore. :-D
Curvature of the Mind now with 3D
And I thought I worked on a convoluted mess...
Software Zen:
delete this;