first_page

ASP.NET 1.x Revisited

the one-page pattern Distinctive ASP.NET Web application design patterns appear like bright colors here in the Songhay System. This is supported heavily by my study for MCAD/MCSD certification and years of experience with COM-based coding. The following are the twinkling highlights:

Embracing Application-level code. Any seasoned ASP programmer if the 1990s knew that using Application-level stuff was a performance hit and an express ticket to instability. With ASP.NET I depend heavily on the application-level Global object to manage database access, expose static, database-specific properties/procedures and define all of the application requests in a page-level struct coined RequestBag (a bag full of expected QueryString keys).

The one-page Web application. I find myself attracted to using one, default ASP.NET page that routes to multiple ASCX user-control files. What’s even more attractive is to use code-beside ASCX files for very lightweight stuff that seems more of hassle to compile in a code-behind arrangement. (One by-product of this executive decision is that members of Global should all be public instead of, say, internal.) The image at left should reveal this pattern clearly.

Still using a central, external JavaScript file for procedural formatting, interactivity and Web form validation. Songhay “ASP Classic” Core details the JavaScript files I used over the years with ASP. I still find them useful with ASP.NET. One of the impediments against this technique is the non-standard renaming of Web form elements by ASP.NET 1.x—and its rewriting of the action attribute of the form element (I assume that this goes away in ASP.NET 2.0). I spent many hours building an ASP.NET server control that renders a script block, defining a JavaScript “dictionary” object that is used as a lookup-list—mapping the names I defined with the stupid-ass names created by ASP.NET.

rasx()