Geek Speak — HabitableZone

Geek Speak » in reply to Need help with a web form datagrid using vb.net.

Ugggh, WebForms, hate 'em

The subject line's advance warning that I can't help you, and could use some help myself. I've been meaning for months now to shift over all my server programming to C#, but I keep running into the twin obstacles of Microsoft's obnoxious rigid WebForms architecture and the lack of understanding of how to deploy assemblies for code reuse.

The two problems are related, because the WebForm architecture seems to assume that each WebForm is a unique one-off design. The code is either on the ASPX page or in a code-behind module, but in any event it seems to have to be right there in a bin directory. To me that's a stupid architecture, because it doesn't seem to promote code reuse. If I want a WebMaster contact form on each of the several dozen Web sites I host, do I have to copy and paste the files to each of those sites? That's insane!

In general I think the WebForms system is way overdesigned and thus inflexible. The wizards enforce the model of a single page that cycles form data back and forth through that atrocious encoded hidden field, and doesn't seem to allow for transferring execution to other modules (like, in ASP, using Server.Execute or Server.Transfer to execute off-page code, or to a results page). Each WebForm exists in splendid isolation.

I have this huge ASP.Net book, must be over a thousand pages, and 90% of it is just about the mechanics of using the braindead wizards to produce only the code that Microsoft allows you to produce. That's aggravating, because ASP.Net's other programming model, the processing pipeline, is more to my taste. But it's poorly documented, and again I can find no sign of an ability to reuse code.

This is all so frustrating, because I pick up computer languages quickly, but it's always been the infrastructure aspects that have been most difficult. In C/C++ it was #includes, in Java the slightly better packaging mechanism; and I'm sure that .Net's assemblies are cool once I learn how they work, but for now I feel just like I felt with C trying to make a tangled mess of #includes work. I'm confident I can write in C#, I'm just having trouble figuring out how to operate the environment.

So here I am, my server projects stalled because I find ASP.Net full of potential but almost impossible to use in practice. You know what I'm doing in the interim? I'm now doing all my server programming in the old ASP model, in JavaScript. Yep, good old JS, rather than VB, for the simple reason that it's syntactically close to C#, so that when I finally figure out how to program in ASP.Net, I'll have the minimum of effort to port my code. Sheesh....

So, Robert, got any words of wisdom to lead me out of this wilderness?

Log in or register to post.

The whole thread (3 posts)