ASP.NET Is To ASP AS C++ Is To C
Today, another Classic ASP code monkey posted to a forum complaining about how he couldn’t do anything in .NET. He proceeded to post code that looked like Classic ASP, except it used .NET classes and was in an aspx page. Everything was inline, he was trying to directly access the database right in the page, and the HTML was a mess.
I understand that some people just hate change; such is life. These people keep me employed. The world, however, is moving on. We are striving to be cross-platform, to be scalable, to keep presentation and data apart, and to be standards compliant. It is far from perfect at the moment (even some .NET components still use tables for layout, probably knowing how crappy IE is with CSS), but we’re trying.
Part of being a developer (or, as I affectionately call those of us who mostly write code, a code monkey), is learning new techniques, new technologies, and new frameworks. Other parts include evaluating open-source solutions and trial versions of neat libraries/components, debugging, and figuring out how to integrate your old legacy garbage with the shiny new toys.
Notice all that “new“? If you don’t like learning new things, a job as a developer is NOT for you.
A person who codes in low-level, ANSI C looks at C++ like it’s an alien spaceship. C++, written by someone who actually knows what they’re doing, bears little resemblance to ANSI C. The basic syntax might look familiar, but there are different operators, different functions/methods, and the architecture of an OOP app is completely different from procedural code. Come to think of it, C++ looks a lot more like Java than it does ANSI C.
My point, and I do have one, is that Classic ASP developers need to tackle ASP.NET as though it were an entirely different language and platform - because it IS. I don’t care if you think you know vbscript. It’s so unlike VB.NET as to be nearly useless to you when you switch. You get your basic syntax, such as variables, for loops, and so on, but every function you’re used to using is now a method of some kind, and you get to go look them all up in the documentation. Have fun with that.
You need to start from the beginning and throw out anything you think you know about how to write a web app. Pretend you’re learning JSP if you have to, but please, do yourself the favor of not trying to directly translate an ASP page to an ASP.NET page.
You’ll like the framework a lot better if you do. I promise.
Tags: application design, ASP.NET
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.