Why I Hate the Web
2010-1-8
I don't hate the web, that would be silly. But in a way, I do hate programming the web. This is kind of a odd statement since I am a Web programmer. This is more odd because if you asked me about my job I would say that I love it.
To explain what I mean I should back up a bit. I got my degree before my university had a proper web program. The internet was certainly around--it had been around for many years--but since all curriculum seems to be many years behind reality I was able to escape college having only taken one web programming course. In php. And I didn't do shit in that class. Anyway, I went through school thinking that I would be writing client applications in Windows Forms for the rest of my days and only when I had a degree and a crummy internship did I realize that maybe I had missed the point.
So now that I'm 4 years into Asp.net I find myself longing for Windows Forms again. That's not true, Forms were sloppy and I'm glad to see them go, but I do long for stateful programming. I'm tired of !IsPostBack. I'm tired of session timeouts and F5 and "To display the webpage again, Internet Explorer needs to resend the information you've previously submitted." I'm extremely tired of RequiredFieldValidators and RegularExpressionValidators and Labels and TextMode=MultiLine and AssociatedControlIDs. Every time I build a web form I weep.
It shouldn't be this way. I used to build houses and believe it or not there are people who still drive every nail into a house by a hand with a hammer and that's beautiful. Programming is not building houses. Beautiful programming is hiding the shit you hate in a class so that you never have to do it again. That's why I love it, and that's why I think Asp.net failed.
I'm not the first person to hate building webforms and I'm not the first person to try and hide that shit in a class so I never have to do it again. But me and everyone else can't seem to do it right. If I can get it to work right it's slow, if I get it fast it's either buggy or unmaintainable. If it's really clever it won't work in a shared hosting environment. Or it won't work without ViewState. Or it won't work without <form runat="server" />. If I want to buy someone else's solution it's still either slow or buggy or expensive (or all three, what we call in the biz The Trifecta).
Nobody can seem to figure it out in asp.net which is ironic because everyone can write a UserControl that works great. Hardly anyone can write a WebControl that works at all. Not if it's going to be templatable. Not with ajax. And especially not if that Ajax is going to have a graceful fallback and work with a script combiner. So 8 years after asp.net we still spend all our time writing user controls and copy pasting them as best we can. Every few months we try and turn that shit into a webcontrol and we fail.
So that's why I love Silverlight. I could kiss DependencyProperties and their corresponding OnPropertyChanged events. Not having to care when my data is loaded but knowing it will work is amazing. ControlTemplates that really do separate how it works and how it looks is phenomenal. I will never claim to be a great programmer but in Silverlight you only have to override two methods to create a custom panel. That makes me giggle. Sure I still fail miserably when I write new controls, but after each attempt I get a little bit closer to making something cool.
It may not be web programming, but it's close enough for me.
Add a comment here. Comments are moderated, your comment will appear within a few hours.