Thursday, June 28, 2007

Run, RUn, RUN for you lives - ....it's DYNAMIC SERVER CONTROLS!!!!!

That's it, I give up! That's right, I'm finally admitting defeat to dynamic server controls in that they are simply not worth the trouble. And believe me when I tell you, it's not for a lack of trying; anyone who knows me very well is fully aware of my die-hard perseverance when it comes to tackling challenges, especially programming ones.

What, you may ask, brought on this sudden and extreme conclusion? Well, after posting yet another question to the asp.net forums regarding some inexplicable and bizarre behavior amongst my dynamic server controls, I received a very helpful and eloquent reply from a fellow developer. Contained within this reply was a link to an article written by the developer titled Dynamically Created Controls in ASP.NET. I highly recommend visiting the link. In it you will find a series of scenarios involving dynamic server controls, revelations about said controls, followed by more questions. In my own quest for decrypting dynamic server controls, I had made it about 3/4 of the way through scenario 2 when I discovered this article. I relived each agonizing, recursive cycle of question, discovery, revelation, followed by additional confusion while reading this narrative.

And then it hit me like a ton of bricks: I have neither the desire nor the free-time to invest in a topic so complex and unpredictable that I cannot even effectively use it until I've spent countless hours and days delving into the idiosynchracies of ControlState, ViewState, Page events, control properties, etc. And more importantly, I'm not alone in this struggle. I give you exhibit A; an extensive and in-depth article detailing the struggles of understanding dynamic server controls written by a developer who is clearly far more fluent in asp.net-ese than myself, with an inconclusive ending suggesting a semi-foolproof, hackish sequence of steps to follow when implementing dynamic server controls.

The irony here is that the entire precedence and purpose of web/server controls is to reduce developers' coding time substantially while reducing redundancy and simplifying the old-school, do-it-yourself controls comprised of your own custom HTML and JavaScript. While I have found Microsoft's non-dynamic web and server controls to serve those functions marvelously, their dynamic server controls have incorporated far too many subjective elements as to the behavior of the controls and nothing remains intuitive. Furthermore, they have done an inferior job of providing documentation citing exactly how and why dynamic server controls' unpreditable and seemingly erratic behavior is determined which leaves developers no options other than inefficient, tedious trial-and-error methodology. which has taken me far more time and energy then it would have to build my own old-school custom HTML and JavaScript controls.

[Descend from Soap-box].

No, wait...this is MY blog, my own little television station where it's all Tracy, all the time.

[Re-ascend to Soap-box].

No comments: