Are there benefits to Classic ASP over ASP.net

asp.netAsp Classic

asp.net Problem Overview


Having worked with Classic ASP for about 2 years now by creating a few 100 simple web forms I can't see a good reason for switching to .net; however, I'm not that versed in .net so I'm sure I could be missing a few things.

Some points that I often hear around work can be found here: http://www.packtpub.com/article/Classic-ASP">http://www.packtpub.com/article/Classic-ASP</a> (not that I share all of these thoughts, but it's a good jumping off point)

I'm very interested to hear what others have to say on this matter.

asp.net Solutions


Solution 1 - asp.net

You're missing more than a few things! ASP.NET is orders of magnitudes more productive, robust, and maintainable than old-school ASP ever thought about being. Server side controls, third-party controls, master pages, forms authentication, forms validation, an OO model than encourages appropriate application partitioning, easy deployment, built-in debugging and tracing, state management.

You even have the choice of WebForms or MVC. It's not an understatement to say that you are simply out of your mind if you don't thoroughly investigate what you're missing.

Solution 2 - asp.net

If you like ASP, and want to move to ASP.NET, skip Webforms and learn MVC.

Solution 3 - asp.net

The biggest issue for me is that I create applications, not websites...The UI is a minor part of the problem, the big part is writing the business logic layer, and various enterprise communication components (Connecting to SAP using SOAP? No Problem!).

The .NET Toolkit allows me to program in a wonderful object oriented language (C#) and has a robust framework to help out.

VbScript is a godawful language to try and write a business application in.

However, if all you do is a simple little webform, then sure, use VbScript.

As far as your link, it basically boils down:

  • WaaWaa, I don't like Visual Studio
  • WaaWaa, I want to edit production code on the production server like an idiot.
  • WaaWaa, I don't know that deploying a single compiled DLL is all that a small site needs to deploy a asp.net app.

Basicly, its ignorance in a nutshell.

Solution 4 - asp.net

To focus on the specific question ("benefits of Classic vs .Net"), there are only two things I can think of Classic does that .Net won't:

  1. Includes. They just don't work like you expect in ASP.Net. Of course, ASP.Net provides much better ways of accomplishing the same thing, but it's still a bit of a loss and can make migrating an old site to .Net a pain.

  2. ASP.Net won't go above the root folder for the application. Where I'm at we have a rather complex intranet that's still mostly classic ASP, with a smattering of .Net apps here and there as things are updated or new stuff added. It would be nice to be able to keep one copy of common code up fairly high in the folder hierarchy but still have each individual app isolated to it's own VD. But then, that's what source control is for, so it's not a big deal.

For me, the biggest advantage moving from Classic ASP and ASP.Net so far is the IDE. It's so nice to be able to right click on a function call and choose "Go to Definition" rather than having to dig around to find the file where the function is actually implemented. Huge time-saver. And intellisense support and type safety when calling functions is a boon as well.

Solution 5 - asp.net

Performance, scalability, and a framework that provides a much better foundation for the stateless world of web applications, for a start.

Wikipedia's ASP.Net page has a section on the differences.

Solution 6 - asp.net

For me I'd have to say Classic ASP is quick to develop in, simple to use/pick up, not overly complicated and very capable of most things asked of it.

ASP with JScript/Javascript as the main language is really, really good fun to code with. VBScript is a waste of brain power and I think its that which gives Classic ASP its bad name. Plus its considered slow but all the articles about speed and number of users are based on 10+ year old servers. We run a site getting 60,000 users a day on two servers and the CPU barely flickers. Modern servers give you a lot more power to play with.

With the huge leaps forward in Javascript usage, designs and best practises in recent years the ASP JScript coder can get alot of goodies to make life even easier. I've ported Mootools to server-side and with that we get an load of wonderful helps, class model, excellent event model and so much more. ASP is great fun. UPDATE: Mootools now have a server-side build that you can download (http://mootools.net/download).

ASP.net is SUPER powerful but has a big ramp on the learning curve to do well, can bring your whole site down when it has one of its fits and worst for me can seem to really go around the houses to get the most simplest of things done.

I'm having alot of fun using both at the minute, using which ever one best fits the gap. I've a great little CMS Cacher and Thumbnailer build in .net which my ASP scripts use. Best of both worlds.

Solution 7 - asp.net

If you look back at your old code and say, "What was I thinking! This is rubbish, I write code much better now!" then you have developed as a programmer.

If the sites are fairly temporary (i.e. you build it quickly, it gets used for a specific purpose and amount of time and then it is effectively closed) then banging out these sites in the most comfortable way for you is perfectly acceptable.

If you have a long list of bugs, fixes and improvements that you now need (or would like) to backport to your old sites, or your "small sites" are getting bigger and more complidated and this is causing you significant grief then you need to take a step back and re-evaluate how you structure and support these sites.

I would very much agree that ASP.NET is a very much more mature and effective programming environment. However, like any tool, you need to know (or learn) the right way to use it as it's not going to automatically turn you into a "super programmer" overnight.

A way to break the ice is to agree with your boss that the next "site" you create is developed in ASP.NET. Explain to him that it will take quite a lot longer than how you currently deliver sites because you have to "get your head around" ASP.NET, but the benefits are x,y and (exercise left to the reader!)

Personally, I'm still in the transition phase (and I started using ASP.NET from v1!) as I have a fairly robust Classic ASP framework I'm developed and comfortable with. However, I have used ASP.NET strategically and have found it VERY powerful and your do end up writing must less code, as so much is built into the .net framework, as long as you can find it in documentation.

I also recommend that you DONT use VB.NET and your bite the bullet to use C#. The change of language is quite minor, but you reduce the chances of writing your sites exactly the same was as you used to. It helps break the bad habits annd gives you a chance to learn new techniques.

Good Luck!

Solution 8 - asp.net

I have one word "debugging" - you never want to have to use it but you always do. In .Net if you're using Visual Studio you have a fantastic debugger when compared to trying to debug code on ASP.

Solution 9 - asp.net

For simple sites, I actually prefer ASP vs. ASP.NET, especially if you know HTML well. However with ASP, separating business logic from view is hard; the code you write will likely be challenging to read + maintain.

PHP is better than ASP though - and somewhat similar at the basic level. And you could always go to Rails or Django, if you're interested in self-contained web development stack (but a lot longer learning curve).

Solution 10 - asp.net

One advantage to ASP.NET is that you have the option of coding your site exactly as you did with classic ASP, along with access to the richness of the .NET framework. You can keep existing functionality and add new ASP.NET functionality were needed. They mix well.

Unfortunately the author of the referenced article isn't very well versed in the technology behind ASP.NET as evident by his remarks (and maybe not even classic ASP). Most of his points are invalid or simply wrong.

Solution 11 - asp.net

Everyone here has made valid points.

I was a classic ASP developer until 3 yrs ago when I switched to .NET 2.0.

I couldn't go back (even though I do still have to fix a handful of classic ASP sites).

I do miss having a recordset object, data repeaters are great for displaying data quickly, but datasets, whilst offering wonderful functionality, are dame awful when it comes to performance on 'big' sites. In fairness I've been doing datasets in a roundabout way with Arrays in classic ASP. The only time I use datasets is for my e-commerce site baskets. I do miss rs.movenext, etc...

FlySwat has made one of the biggest mistakes that I see a lot of developers make.

Yes business logic, OO etc... that .NET brings is great (scalability I wouldn’t 100% agree with, but definitely more extensible), but when using ASP.NET you are still creating a WEB SITE. Forget this nonsense of using the terminology ‘application’. I have meet many great .NET developers who build n-tier, OO sites, but they have no real understanding of the uniqueness of building a web site; such as state, or the bloody annoying problem that they over rely on Javascript. Most of these developers build MS type sites which don't normally meet W3C, aren’t cross browser friendly and never gracefully degrade. And no it is not acceptable even for back office applications to be only compatible with IE.

.NET also tends to 'fatten' simple sites. .NET in many ways was a way of getting WinForm developers to start building web sites (or as they prefer, web apps.). The problem was that this brought with it a bunch of developers who had the luxuries not having to worry about state, standards, etc...

I still maintain that any .NET site can be built in classic ASP and run faster (page response times) for the end user....

...BUT though I have fond memories of classic ASP, what I can do with .NET in terms of imaging, encryption, compression, easy web service integration, proper OO, decent n-tier, extensibility, etc...is what gives .NET the advantage. Even silly things like simply adding one line of code to the web.config to tell it to write the sessionID to the querystring if the user doesn’t accept cookies (this was a pain in classic ASP) is great.

Move to .NET, you won’t regret it, but do give yourself sometime (particularly if you don’t know about OO (inheritance, abstraction, polymorphism and encapsulation). Don’t start building .NET sites in classic compatibility mode, it’s just a cheap way of doing .NET and you’ll still end up using classic ASP practises. If VBScript was your main development language, the jump is no were near as easy as MS or others would have you believe.

Most importantly for me is that I have carried across, from my classic ASP days, fundamental web site application (;-)) design and this should never change between languages.

Solution 12 - asp.net

Rarely does a response in this thread answer the question. Instead of taking the easy way out, I'll take a stab at it:

A few benefits that have not been mentioned (JScript-centric):

  • You can learn the entire language and keep it in your memory if you use it enough - I don't know anyone who claims to know the entire .NET framework; this makes coding very rapid.
  • Weak typing - this can let you code more rapidly when banging something out quickly, e.g., do you really care about the difference between char and string most of the time? (insert religious flame-war here)
  • Eval: this much-maligned keyword is actually incredibly powerful, and lets you manipulate your code at runtime in really interesting ways
  • Client/server language compatibility: JScript's similarity to Javascript means that you can use the same include file for server-side validation as you use for client-side.

Solution 13 - asp.net

If all you make is simple little web pages, then do whatever. Or better yet learn PHP. Most of the response you are going to get are from people who make web applications, and for that asp.net blows the pants off of classic asp in power and maintainability though.

Solution 14 - asp.net

I agree with everyone here except the one who said skip webforms and go straight to MVC. This is not helpful. Webforms is very useful for database-driven applications which do lots of table displays, etc. I have worked on some very large webforms applications and it works fine. MVC is good for more interactive "Web 2.0" type applications.

Solution 15 - asp.net

I always use Classic ASP, it works beautifully.

I tried ASP.net for a couple of years but it was too complex for most website development. My customers didn't like it either because they couldn't understand it. They also like knowing they are not locked into one developer.

ASP.NET keeps changing and requires enormous/constant learning curve to keep current. MS switched primary language to C# which made the transition just that much harder.

My productivity slowed to a crawl with .net because I was forever out looking for tutorials or examples of how to do everything.

Visual Studio is pig sloooooow.

PHP has an ugly syntax and too many different frameworks which makes it impossible to learn for developer purposes. Good only for intranet use with dedicated staff, in my opinion.

Classic ASP is locked down and works perfectly today just as it did years ago. With a few library files, code writing is easy as pie and examples are unlimited on the internet.

Written correctly, which most folks don't, vbscript is clean readable, efficient code. I leave the client side stuff for libraries like jQuery and find I am many times more productive.

Solution 16 - asp.net

Having done a "rename asp to aspx and change until it compiles" port of an application to asp.net I would say that even asp classic style programming in .NET is better than asp classic. VS of course will encourage you to fall into the pit of success and drive you towards the web forms and code-behind way of doing things, but the language is expressive enough to replicate the patterns of asp classic (namely lots of golden nuggets/inline code, cross posting pages, etc)

I think I've heard it said before that you can write COBOL in any language. That's true for classic asp.

Solution 17 - asp.net

Solution 18 - asp.net

If you use classic asp at this point (without a mandate from your CTO) then you need to see a shrink. or you are a masochist. Or as satanist, in which case, you'd like it cuz you'd be in hell! :p

On a serious note... for web applications use WebForms.

For light, quick and dirty websites, use ASP.NET MVC.

Good thing about ASP is that you can use VB.NET, C#, Eiffel, Boo or PHP for your language! For PHP check out Phalanger...

Solution 19 - asp.net

Since I'm paid to create solutions and not to write code, I just prefer ASP.NET over classic ASP. While classic ASP is still practical for very small, simple sites, there's still a lot of power behind ASP.NET when writing a bit more complex sites. Besides, even with ASP.NET you could still just use Notepad to write the .aspx files yourself, including embedded vb or c# code. Visual Studio just provides a lot of additional functionality that takes away the need to write more code yourself. And, as I said, I don't get paid for writing code...

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNipView Question on Stackoverflow
Solution 1 - asp.netrp.View Answer on Stackoverflow
Solution 2 - asp.netJohn SheehanView Answer on Stackoverflow
Solution 3 - asp.netFlySwatView Answer on Stackoverflow
Solution 4 - asp.netJoel CoehoornView Answer on Stackoverflow
Solution 5 - asp.netGreg HurlmanView Answer on Stackoverflow
Solution 6 - asp.netPete DuncansonView Answer on Stackoverflow
Solution 7 - asp.netGuyView Answer on Stackoverflow
Solution 8 - asp.netGuyView Answer on Stackoverflow
Solution 9 - asp.netrywView Answer on Stackoverflow
Solution 10 - asp.netJoseph DaigleView Answer on Stackoverflow
Solution 11 - asp.netCarl BruinersView Answer on Stackoverflow
Solution 12 - asp.netD'Arcy RittichView Answer on Stackoverflow
Solution 13 - asp.netKevin SheffieldView Answer on Stackoverflow
Solution 14 - asp.netveeblefetzerView Answer on Stackoverflow
Solution 15 - asp.netDeeView Answer on Stackoverflow
Solution 16 - asp.netMatthewMartinView Answer on Stackoverflow
Solution 17 - asp.netKonstantin TarkusView Answer on Stackoverflow
Solution 18 - asp.netbbqchickenrobotView Answer on Stackoverflow
Solution 19 - asp.netWim ten BrinkView Answer on Stackoverflow