One of my personal goals for our little ALT.NET movement is simply challenging the status quo for building .Net applications. We might end up exactly where we started from, but let’s at least take a look around for other alternatives and really consider whether what we’re doing is the best way. A perfect example is the reconsideration of basically everything we know about developing web applications with WebForms.
The specific argument I’m reading about today is about whether or not it’s appropriate, useful, or downright evil to use inline scripting in the actual markup page. Here’s what I’ve been reading today. More from me after the break.
Like many other people, I use ASP classic circa 1998 as a byword for sloppy spaghetti code. The code could get absolutely heinous as everything but the kitchen sink would be poured into a single ASP page. I learned ASP classic largely by reverse engineering the ASP pages that MS Access 97 produced from its wizard functionality. Looking back, I know that my early code was atrocious. Later on we started to experiment with pushing more and more functionality out of the ASP markup and into nonvisual VB6 COM components, but that never felt smooth and wasn’t widely accepted because of the deployment irritations of COM components. Putting more logic and control in stored procedures was another choice that many of us fell into out of frustration with COM or ASP, but I refuse to open up that can of worms again.
When the early plans for ASP.NET and WebForms were announced I was ecstatic. Treating the elements on the page as stateful objects in an OOP fashion? Brilliant!
Other Questions (with very loaded phrasing )
- WebForms out of the box doesn’t do much to promote separation of concerns either, so what did we really improve?
- If we’d beaten the spaghetti code problem in ASP classic instead of drastically changing the UI model, would we be better off today?
- Is Visual Programming really the fastest way to build software? Because if it’s not, we need to rethink most of the .Net tooling.
- Is Visual Programming really the most approachable way to build software?
- Every other platform uses inline scripting, and most other platforms also use some sort of MVC framework or another. Wouldn’t it be advantageous to work like that? Wouldn’t moving .Net web development closer to the more common model make it easier for us to switch platforms and to onboard folks from other platforms onto .Net?