views:

3022

answers:

18

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 (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.

+9  A: 

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.

Greg Hurlman
+4  A: 

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).

ryw
+5  A: 

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.

Joseph Daigle
+55  A: 

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... geeze the list never ends.

And now, you even have the choice of classic Web forms 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.

rp
I don't mean to be picky, but the choice of MVC on .net has been there for years with Monorail
Mauricio Scheffer
"orders of magnitudes more productive, robust, and maintainable" and then some!
DrG
And you get rid of VBSCript! That was a dream since I started with ASP! We had a ton of functions just to do what modern languages and frameworks have out of the box.
Marc Climent
I'm looking forward to the day we can get ride of all our classic ASP code at work.
ICodeForCoffee
@ICodeForCoffee ... mee too!!!
mattRo55
+35  A: 

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

John Sheehan
ASP.NET is definitely orders of magnitude above and beyond Classic ASP. However, I did 5 years of classic ASP, followed by 5 years of ASP.NET, and I still state this as a categorical fact of the universe: webforms is awful for any moderately complicated application. ASP.MVC is the right way to go.
Juliet
+ millions to the comment and the answer: ASP.NET webforms is diabolical
annakata
+14  A: 

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.

FlySwat
+1  A: 

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.

Kevin Sheffield
+5  A: 

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.

Guy
The debugger in Visual Studio works great with ASP as well, do try it.
svinto
Which version of VS svinto?
Guy
+6  A: 

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!

Guy
+12  A: 

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.

Joel Coehoorn
Voted up for actually answering the question in the title ;)
AJ
+1  A: 

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.

MatthewMartin
+5  A: 

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.

@Carl, fully see your point, and notice MS AJAX vs hand rolled AJAX. MS AJAX sends down the full page request per call. Quick solution but ends up being a load of rubbish if you know what you're really doing.
JL
+2  A: 

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.

+4  A: 

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 alot 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've 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.

Pete Duncanson
Very sensible comments. It's nice to see someone open to both the old and the new ;)
AJ
I have to agree, in hindsight ASP was a pretty good technology all in all.
JL
A: 

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...

bbqchickenrobot
Or you just can't get the resources and time to replace years of code overnight. Cobol still lives and on classic asp still lives on. It's not that I like the stuff, it's just we have so much of it, replacing it all takes time.
ICodeForCoffee
If it breaks, replace it. If it needs new features, replace it. If you even have to _think_ about it, replace it. Otherwise, it ain't broke, so leave it alone.
John Saunders
Why MVC = quick and dirty?
UpTheCreek
Ok, so I'll revise the dirty part. It was more figurative than a literal statement. I just meant asp.net mvc is not *as* good for application type websites. Say, CRM, etc. But that's my opinion. MVC puts you closer to the metal and removes a lot of the asp.net webforms specific stuff that some people don't like.
bbqchickenrobot
+2  A: 

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.
RedFilter
Point 4 is plain wrong. If you use auto-compile, you can do this in ASP.NET as well.
erikkallen
@erikkallen: Point 4 removed
RedFilter
A: 

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...

Workshop Alex