thinking in geek tagline’s are so web2.0

Posted
4 September 2007 @ 12am

Tagged
asp.net, web architecture

WebForms hurt me good…

Today I spent a long time trying to add a control to the Page.Controls collection from a MasterPage. Short version: without writing a(nother) IHttpModule which hooks Page_PreLoad and fires off an event of it’s own on the MasterPage. You can’t. (unless I’m missing something).

Another classic example of WebForms being too complicated for it’s own good.

In other news: Oren and Mats are having a dustup over webforms. I have this remarkible experence when I work with WebForms. Sometimes I get the entire model/life-cycle/event flow etc in my head and fix or work around quite complex scenarios to get some piece of functionality working.

e.g. Writing a control which/removes adds instances of other controls to itself when buttons are presses.

When this happens I experience this strange sense of achievement and even pride. The feeling that I have really done some “hardcore” programming today. Then I remember that I just managed to inject a string into the middle of another string and write the result to a stream.

Then I feel sad.


11 Comments

Posted by
Darron
4 September 2007 @ 8am

Emo cod0r.


Posted by
Mike
4 September 2007 @ 9am

Can’t you just attach to the Page.InitComplete event (or whatever Page event you want to subscrbe to) from your MasterPage and do the adding in that custom function?


Posted by
josh
4 September 2007 @ 11am

Yep - I can … thanks for the tip. My point stands though. It shouldn’t be this hard.


Posted by
Mats Helander
5 September 2007 @ 11am

“When this happens I experience this strange sense of achievement and even pride. [...] Then I remember that I just managed to inject a string into the middle of another string and write the result to a stream.

Then I feel sad.”

LOL talk about spot on! :-)

But I guess what I’m saying is that the code for inserting that string using just strings may look even worse when you come back to look at it a week later…

/Mats


[...] thinking in geek tagline’s are so web2.0 « WebForms hurt me good… [...]


Posted by
Mike
6 September 2007 @ 6am

I agree with the unecessary complexity of WebForms.


Posted by
Joe F.
18 September 2007 @ 11am

This once again proves my unending theory Germans love David Hasselhoff abstractions are only good when they are less complicated than that which they are abstracting. Okay, so it isn’t really my theory, but you get the point.


Posted by
Thomas Eyde
18 September 2007 @ 1pm

I agree with you that WebForms are too complicated. But make a general master page to push data into a specialized page just seems wrong to me.


Posted by
Brian
18 September 2007 @ 6pm

Ruby on Rails, Django, ???? Try something else if it is hard, don’t stick to it because that is what MS gave you. Web development should be as easy as injecting strings within strings and outputing them to a stream. If it is harder than that, maybe you are using a saw to drive a nail into a board. Get a hammer!

Before anybody starts flaming…I have used ASP.Net, C# and all things .NET since it came out, and still do. I just understand that there are other things out there that work better sometimes and I am not blind to them.


Posted by
Jafin
19 September 2007 @ 5am

Mayby, just mayby they will fix some of this in the forthcoming MVC asp.net work they’re doing.(if I can ever find info about it!)……. mayby.. Otherwise off to monorail….


Posted by
Vijay Santhanam
25 September 2007 @ 11am

I agree with Mr schnrub…. web forms are needlessly complex. MVC all the way that allows for a thicker js-laden client pages.


Leave a Comment

ERP, Financials and Large Databases String Manipulation DSL’s