与ASP.net相比,经典的ASP有什么好处吗

时间:2022-07-21 01:40:53

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.

通过创建100个简单的web表单,我已经和经典的ASP一起工作了2年了,现在我看不出为什么要切换到。net;但是,我不太熟悉。net,所以我确信我可能会漏掉一些东西。

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)

我经常在工作中听到的一些观点可以在这里找到:http://www.packtpub.com/article/Classic-ASP(并不是说我分享了所有这些想法,但是这是一个很好的起点)

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

我很想听听别人对这件事有什么看法。

19 个解决方案

#1


72  

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.

你错过了很多东西!ASP。NET是一种比传统的ASP更高效、更健壮、更易于维护的订单。服务器端控件、第三方控件、主页面、表单验证、表单验证、一个OO模型比鼓励适当的应用程序分区、易于部署、内置调试和跟踪、状态管理。

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.

您甚至可以选择WebForms或MVC。如果你不彻底调查你所遗漏的东西,那么说你简直是疯了,这并不是轻描淡写。

#2


53  

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

如果你喜欢ASP,想要搬到ASP。NET,跳过Webforms,学习MVC。

#3


21  

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

对我来说最大的问题是我创建的是应用程序,而不是网站……UI是问题的一个次要部分,主要部分是编写业务逻辑层和各种企业通信组件(使用SOAP连接到SAP ?没问题!)

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

. net工具包允许我用一种很好的面向对象语言(c#)进行编程,并且有一个健壮的框架来帮助我。

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

VbScript是一种尝试编写业务应用程序的糟糕语言。

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

但是,如果您所做的只是一个简单的webform,那么请使用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.
  • 我不知道部署一个编译好的DLL仅仅是一个小站点部署asp.net应用程序所需要的。

Basicly, its ignorance in a nutshell.

简单地说,它的无知。

#4


20  

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:

要关注特定的问题(“经典vs .Net的好处”),我能想到的只有两点。net不会做到:

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.

1)包括。它们只是不像你在ASP.Net中期望的那样工作。当然,ASP。Net提供了更好的方式来完成相同的事情,但是这仍然是一个损失,并且会使将一个旧站点迁移到。Net变得很痛苦。

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.

2)ASP。Net不会超出应用程序的根文件夹。在我所在的地方,我们有一个相当复杂的内部网,它仍然是典型的ASP,随着事物的更新或新东西的添加,这里和那里都有少量的。net应用。如果能够在文件夹层次结构中保持一个公共代码的拷贝相当高,但是仍然将每个单独的应用程序隔离到它自己的VD中,那就太好了。但是,这就是源代码控制的目的,所以这不是什么大问题。

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.

对我来说,从经典的ASP和ASP转移最大的优势。Net目前是IDE。能够在函数调用上右键单击并选择“Go to Definition”,而不必到处寻找实现函数的文件,这是非常好的。巨大的节省时间。在调用函数时,智能感知支持和类型安全也是一个福音。

#5


11  

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是快速开发的,易于使用/获取,不是过于复杂,并且非常适合大多数需要它的东西。

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.

以JScript/Javascript为主要语言的ASP真的非常非常有趣。VBScript是对脑力的浪费,我认为正是它给了经典ASP一个坏名声。加上它被认为是缓慢的,但是所有关于速度和用户数量的文章都是基于10年以上的老服务器。我们在两台服务器上运行一个站点,每天有60,000个用户,CPU几乎不闪烁。现代服务器为您提供了更多的功能。

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

随着Javascript的使用、设计和最佳实践的巨大飞跃,ASP JScript编码器可以获得很多好处,使生活变得更加轻松。我已经将Mootools移植到服务器端,这样我们就得到了大量的帮助,类模型,优秀的事件模型等等。ASP是伟大的乐趣。更新:Mootools现在有一个可以下载的服务器端构建(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.

net是超级强大的,但是在学习曲线上有一个很大的斜坡可以做得很好,当它有一个合适的地方的时候可以让你的整个网站崩溃,而对我来说最糟糕的是,它似乎真的可以绕着屋子转来转去完成最简单的事情。

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.

我很喜欢同时使用这两种工具,用哪一种最适合这个间隙。我有一个很棒的CMS Cacher和Thumbnailer构建在。net,我的ASP脚本使用。两全其美。

#6


11  

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

首先,性能、可伸缩性和为无状态web应用程序世界提供更好基础的框架。

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

*的ASP。Net页面有一个关于差异的部分。

#7


8  

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.

如果你有一长串的bug,修复和改进,您现在需要(或希望)补丁你的旧网站,或者你的“小型站点”越来越大,越来越complidated这是造成重大的悲伤,那么你需要后退一步,重新评估如何这些网站的结构和支持。

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.

我非常同意ASP。NET是一个非常成熟和有效的编程环境。然而,像任何工具一样,你需要知道(或学习)正确的使用方法,因为它不会在一夜之间自动将你变成一个“超级程序员”。

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

打破僵局的一种方式是同意你的老板,你创建的下一个“站点”是在ASP.NET中开发的。向他解释这将花费比你现在交付站点的时间要长得多,因为你必须“了解”ASP。NET,但是它的好处是x,y和(留给读者的练习!)

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.

就我个人而言,我还在过渡阶段(我开始使用ASP)。因为我有一个相当健壮的经典ASP框架,所以我对它很熟悉。但是,我已经使用了ASP。NET具有战略意义,并且已经发现它非常强大,并且您最终编写的代码必须更少,因为只要您能在文档中找到。NET框架就有这么多代码。

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.

我也建议你不要使用VB。NET和你的咬子弹使用c#。语言的变化是非常小的,但是你减少了写你的站点的机会和你以前一样。它能帮助你改掉坏习惯,也能给你机会学习新技术。

Good Luck!

好运!

#8


6  

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.

我有一个词“调试”——你从来都不想使用它,但你总是这么做。在。net中,如果你使用的是Visual Studio,与试图在ASP上调试代码相比,你有一个很棒的调试器。

#9


5  

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.

对于简单的网站,我更喜欢ASP和ASP。NET,特别是如果你很了解HTML的话。但是使用ASP,很难将业务逻辑与视图分离;您编写的代码很可能具有读取+维护的挑战性。

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

PHP比ASP要好,而且在基本的层次上有些相似。如果您对自包含的web开发堆栈感兴趣(但是学习曲线要长得多),您可以访问Rails或Django。

#10


5  

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.

一个优势ASP。NET是你可以选择像使用经典的ASP一样为你的网站编码,同时也可以访问。NET框架的丰富。您可以保留现有的功能并添加新的ASP。网络功能是必要的。他们混合好。

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.

不幸的是,引用文章的作者并不十分精通ASP背后的技术。他的言论很明显(甚至可能不是经典的ASP)。他的大多数观点都是无效的或完全错误的。

#11


5  

Everyone here has made valid points.

这里的每个人都有自己的观点。

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

3年前当我切换到。net 2.0时,我还是一个典型的ASP开发人员。

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

我不能回去(尽管我仍然需要修复一些经典的ASP站点)。

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

我很怀念拥有一个记录集对象,数据中继器可以快速显示数据,但是数据集,虽然提供了很好的功能,但是在“大”站点上的性能却非常糟糕。公平地说,我一直在以一种迂回的方式使用经典ASP中的数组来处理数据集。我使用数据集的唯一时间是我的电子商务网站篮子。我很想念rs.movenext等…

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

FlySwat犯了我看到很多开发人员犯的最大错误之一。

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.

是的,业务逻辑,OO等等…. net带来的好处是非常棒的(我不能百分之百地同意它的可扩展性,但绝对可以扩展),但是在使用ASP的时候。你还在创建一个网站。不要再用“应用”这个术语了。我遇到过很多很棒的。net开发人员,他们构建n-tier、OO站点,但是他们并没有真正理解构建web站点的独特性;比如状态,或者他们依赖于Javascript的恼人问题。大多数开发人员构建的MS类型的站点通常不符合W3C标准,不支持跨浏览器,并且从不优雅地降级。不,即使是后台办公应用程序也不能只与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...

. net也倾向于“增肥”简单的网站。。问题是,这带来了一群拥有奢侈品的开发商,他们不必担心国家、标准等等。

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

我仍然坚持认为任何。net站点可以建立在经典ASP和跑得更快(最终用户....页面响应时间)

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

…但是,尽管我对经典的ASP有美好的记忆,但是我可以用。net来做成像、加密、压缩、简单的web服务集成、适当的OO、体面的n层、可扩展性等等……是。net的优势所在。甚至一些愚蠢的事情,比如简单地向web添加一行代码。如果用户不接受cookie(这在经典的ASP中很痛苦),那么配置告诉它将sessionID写到querystring是很好的。

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.

移动到。net,您不会后悔,但是一定要给自己一些时间(特别是如果您不知道OO(继承、抽象、多态性和封装)。不要开始在经典的兼容模式下构建。net站点,这只是一种做。net的廉价方式,你最终还是会使用经典的ASP实践。如果VBScript是您的主要开发语言,那么跳转远没有MS或其他人让您相信的那么容易。

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.

对我来说,最重要的是我已经跨越了我的经典的ASP时代,基本的web站点应用程序(;-)的设计,这在语言之间是不应该改变的。

#12


5  

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.
  • 如果你足够多地使用它,你可以学习整个语言并将它保存在你的记忆中——我不知道有谁声称知道整个。net框架;这使得编码非常快速。
  • 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)
  • 弱类型——这可以让您在快速地敲打一些东西时更快速地编写代码,例如,您是否真的关心char和string之间的差异?(此处插入宗教读者)
  • Eval: this much-maligned keyword is actually incredibly powerful, and lets you manipulate your code at runtime in really interesting ways
  • Eval:这个饱受诟病的关键字实际上非常强大,可以让您在运行时以非常有趣的方式操作代码
  • 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.
  • 客户机/服务器语言兼容性:JScript与Javascript的相似性意味着您可以使用与客户端验证相同的include文件进行服务器端验证。

#13


3  

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.

如果你所做的只是一个简单的网页,那就做任何事情。或者学习PHP更好。您将得到的大多数响应都来自于开发web应用程序的人,因此asp.net在功能和可维护性方面击败了经典的asp。

#14


2  

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.

我同意这里的每个人,除了那个说跳过webforms直接去MVC的人。这不是有益的。Webforms对于数据库驱动的应用程序非常有用,这些应用程序可以进行大量的表显示等等。MVC适用于更交互式的“Web 2.0”类型的应用程序。

#15


1  

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)

在完成了“将asp重命名为aspx并进行修改,直到将应用程序的端口编译为asp.net之后,我想说,即使是。net中的asp经典样式编程也比asp经典要好。当然,VS当然会鼓励你进入成功的陷阱,并将你推向web表单和代码背后的工作方式,但语言的表现力足以复制asp经典模式(即大量的金块/内联代码、交叉发布页面等)。

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

我想我以前听说过,你可以用任何语言写COBOL。这对经典asp来说是正确的。

#16


1  

I always use Classic ASP, it works beautifully.

我总是使用经典的ASP,它工作得很漂亮。

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,但它对大多数网站开发来说太复杂了。我的顾客也不喜欢,因为他们不懂。他们也喜欢知道他们不是局限于一个开发人员。

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.

ASP。NET不断变化,需要巨大的/恒定的学习曲线才能保持最新。MS将主要语言转换为c#,这使得转换变得更加困难。

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

我的工作效率在。net上慢了下来,因为我总是在寻找如何做每件事的教程或例子。

Visual Studio is pig sloooooow.

Visual Studio是猪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.

PHP有一个丑陋的语法和太多不同的框架,这使得开发人员无法学习。在我看来,只适合内部网使用,并有专门的员工。

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.

经典的ASP被锁定并且在今天完美地工作,就像几年前一样。有了一些库文件,代码的编写就像饼图一样简单,示例在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.

大多数人都不知道的是,vbscript是一种干净、可读、高效的代码。我把客户端内容留给jQuery这样的库,发现自己的效率要高出很多倍。

#18


0  

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

如果您在这一点上使用经典的asp(没有来自CTO的授权),那么您需要看到一个收缩。或者你是受虐狂。或者作为撒旦教徒,你会喜欢的,因为你会下地狱!:p

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

在一个严重的注意……对于web应用程序,使用WebForms。

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

对于轻,快和脏的网站,使用ASP。净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...

ASP的优点是可以使用VB。NET, c#, Eiffel, Boo或PHP为您的语言!PHP请查看Phalanger…

#19


0  

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

因为我的工作是创建解决方案而不是编写代码,所以我更喜欢ASP。净在典型的ASP。虽然经典的ASP仍然适用于非常小的、简单的站点,但是在ASP的背后仍然有很多强大的功能。当写一个稍微复杂一点的网站时。此外,即使在ASP。NET您仍然可以使用记事本自己编写.aspx文件,包括嵌入式vb或c#代码。Visual Studio仅仅提供了许多附加的功能,而不需要自己编写更多的代码。而且,就像我说的,我不会因为写代码而得到报酬……

#1


72  

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.

你错过了很多东西!ASP。NET是一种比传统的ASP更高效、更健壮、更易于维护的订单。服务器端控件、第三方控件、主页面、表单验证、表单验证、一个OO模型比鼓励适当的应用程序分区、易于部署、内置调试和跟踪、状态管理。

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.

您甚至可以选择WebForms或MVC。如果你不彻底调查你所遗漏的东西,那么说你简直是疯了,这并不是轻描淡写。

#2


53  

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

如果你喜欢ASP,想要搬到ASP。NET,跳过Webforms,学习MVC。

#3


21  

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

对我来说最大的问题是我创建的是应用程序,而不是网站……UI是问题的一个次要部分,主要部分是编写业务逻辑层和各种企业通信组件(使用SOAP连接到SAP ?没问题!)

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

. net工具包允许我用一种很好的面向对象语言(c#)进行编程,并且有一个健壮的框架来帮助我。

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

VbScript是一种尝试编写业务应用程序的糟糕语言。

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

但是,如果您所做的只是一个简单的webform,那么请使用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.
  • 我不知道部署一个编译好的DLL仅仅是一个小站点部署asp.net应用程序所需要的。

Basicly, its ignorance in a nutshell.

简单地说,它的无知。

#4


20  

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:

要关注特定的问题(“经典vs .Net的好处”),我能想到的只有两点。net不会做到:

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.

1)包括。它们只是不像你在ASP.Net中期望的那样工作。当然,ASP。Net提供了更好的方式来完成相同的事情,但是这仍然是一个损失,并且会使将一个旧站点迁移到。Net变得很痛苦。

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.

2)ASP。Net不会超出应用程序的根文件夹。在我所在的地方,我们有一个相当复杂的内部网,它仍然是典型的ASP,随着事物的更新或新东西的添加,这里和那里都有少量的。net应用。如果能够在文件夹层次结构中保持一个公共代码的拷贝相当高,但是仍然将每个单独的应用程序隔离到它自己的VD中,那就太好了。但是,这就是源代码控制的目的,所以这不是什么大问题。

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.

对我来说,从经典的ASP和ASP转移最大的优势。Net目前是IDE。能够在函数调用上右键单击并选择“Go to Definition”,而不必到处寻找实现函数的文件,这是非常好的。巨大的节省时间。在调用函数时,智能感知支持和类型安全也是一个福音。

#5


11  

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是快速开发的,易于使用/获取,不是过于复杂,并且非常适合大多数需要它的东西。

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.

以JScript/Javascript为主要语言的ASP真的非常非常有趣。VBScript是对脑力的浪费,我认为正是它给了经典ASP一个坏名声。加上它被认为是缓慢的,但是所有关于速度和用户数量的文章都是基于10年以上的老服务器。我们在两台服务器上运行一个站点,每天有60,000个用户,CPU几乎不闪烁。现代服务器为您提供了更多的功能。

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

随着Javascript的使用、设计和最佳实践的巨大飞跃,ASP JScript编码器可以获得很多好处,使生活变得更加轻松。我已经将Mootools移植到服务器端,这样我们就得到了大量的帮助,类模型,优秀的事件模型等等。ASP是伟大的乐趣。更新:Mootools现在有一个可以下载的服务器端构建(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.

net是超级强大的,但是在学习曲线上有一个很大的斜坡可以做得很好,当它有一个合适的地方的时候可以让你的整个网站崩溃,而对我来说最糟糕的是,它似乎真的可以绕着屋子转来转去完成最简单的事情。

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.

我很喜欢同时使用这两种工具,用哪一种最适合这个间隙。我有一个很棒的CMS Cacher和Thumbnailer构建在。net,我的ASP脚本使用。两全其美。

#6


11  

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

首先,性能、可伸缩性和为无状态web应用程序世界提供更好基础的框架。

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

*的ASP。Net页面有一个关于差异的部分。

#7


8  

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.

如果你有一长串的bug,修复和改进,您现在需要(或希望)补丁你的旧网站,或者你的“小型站点”越来越大,越来越complidated这是造成重大的悲伤,那么你需要后退一步,重新评估如何这些网站的结构和支持。

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.

我非常同意ASP。NET是一个非常成熟和有效的编程环境。然而,像任何工具一样,你需要知道(或学习)正确的使用方法,因为它不会在一夜之间自动将你变成一个“超级程序员”。

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

打破僵局的一种方式是同意你的老板,你创建的下一个“站点”是在ASP.NET中开发的。向他解释这将花费比你现在交付站点的时间要长得多,因为你必须“了解”ASP。NET,但是它的好处是x,y和(留给读者的练习!)

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.

就我个人而言,我还在过渡阶段(我开始使用ASP)。因为我有一个相当健壮的经典ASP框架,所以我对它很熟悉。但是,我已经使用了ASP。NET具有战略意义,并且已经发现它非常强大,并且您最终编写的代码必须更少,因为只要您能在文档中找到。NET框架就有这么多代码。

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.

我也建议你不要使用VB。NET和你的咬子弹使用c#。语言的变化是非常小的,但是你减少了写你的站点的机会和你以前一样。它能帮助你改掉坏习惯,也能给你机会学习新技术。

Good Luck!

好运!

#8


6  

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.

我有一个词“调试”——你从来都不想使用它,但你总是这么做。在。net中,如果你使用的是Visual Studio,与试图在ASP上调试代码相比,你有一个很棒的调试器。

#9


5  

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.

对于简单的网站,我更喜欢ASP和ASP。NET,特别是如果你很了解HTML的话。但是使用ASP,很难将业务逻辑与视图分离;您编写的代码很可能具有读取+维护的挑战性。

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

PHP比ASP要好,而且在基本的层次上有些相似。如果您对自包含的web开发堆栈感兴趣(但是学习曲线要长得多),您可以访问Rails或Django。

#10


5  

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.

一个优势ASP。NET是你可以选择像使用经典的ASP一样为你的网站编码,同时也可以访问。NET框架的丰富。您可以保留现有的功能并添加新的ASP。网络功能是必要的。他们混合好。

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.

不幸的是,引用文章的作者并不十分精通ASP背后的技术。他的言论很明显(甚至可能不是经典的ASP)。他的大多数观点都是无效的或完全错误的。

#11


5  

Everyone here has made valid points.

这里的每个人都有自己的观点。

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

3年前当我切换到。net 2.0时,我还是一个典型的ASP开发人员。

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

我不能回去(尽管我仍然需要修复一些经典的ASP站点)。

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

我很怀念拥有一个记录集对象,数据中继器可以快速显示数据,但是数据集,虽然提供了很好的功能,但是在“大”站点上的性能却非常糟糕。公平地说,我一直在以一种迂回的方式使用经典ASP中的数组来处理数据集。我使用数据集的唯一时间是我的电子商务网站篮子。我很想念rs.movenext等…

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

FlySwat犯了我看到很多开发人员犯的最大错误之一。

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.

是的,业务逻辑,OO等等…. net带来的好处是非常棒的(我不能百分之百地同意它的可扩展性,但绝对可以扩展),但是在使用ASP的时候。你还在创建一个网站。不要再用“应用”这个术语了。我遇到过很多很棒的。net开发人员,他们构建n-tier、OO站点,但是他们并没有真正理解构建web站点的独特性;比如状态,或者他们依赖于Javascript的恼人问题。大多数开发人员构建的MS类型的站点通常不符合W3C标准,不支持跨浏览器,并且从不优雅地降级。不,即使是后台办公应用程序也不能只与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...

. net也倾向于“增肥”简单的网站。。问题是,这带来了一群拥有奢侈品的开发商,他们不必担心国家、标准等等。

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

我仍然坚持认为任何。net站点可以建立在经典ASP和跑得更快(最终用户....页面响应时间)

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

…但是,尽管我对经典的ASP有美好的记忆,但是我可以用。net来做成像、加密、压缩、简单的web服务集成、适当的OO、体面的n层、可扩展性等等……是。net的优势所在。甚至一些愚蠢的事情,比如简单地向web添加一行代码。如果用户不接受cookie(这在经典的ASP中很痛苦),那么配置告诉它将sessionID写到querystring是很好的。

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.

移动到。net,您不会后悔,但是一定要给自己一些时间(特别是如果您不知道OO(继承、抽象、多态性和封装)。不要开始在经典的兼容模式下构建。net站点,这只是一种做。net的廉价方式,你最终还是会使用经典的ASP实践。如果VBScript是您的主要开发语言,那么跳转远没有MS或其他人让您相信的那么容易。

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.

对我来说,最重要的是我已经跨越了我的经典的ASP时代,基本的web站点应用程序(;-)的设计,这在语言之间是不应该改变的。

#12


5  

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.
  • 如果你足够多地使用它,你可以学习整个语言并将它保存在你的记忆中——我不知道有谁声称知道整个。net框架;这使得编码非常快速。
  • 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)
  • 弱类型——这可以让您在快速地敲打一些东西时更快速地编写代码,例如,您是否真的关心char和string之间的差异?(此处插入宗教读者)
  • Eval: this much-maligned keyword is actually incredibly powerful, and lets you manipulate your code at runtime in really interesting ways
  • Eval:这个饱受诟病的关键字实际上非常强大,可以让您在运行时以非常有趣的方式操作代码
  • 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.
  • 客户机/服务器语言兼容性:JScript与Javascript的相似性意味着您可以使用与客户端验证相同的include文件进行服务器端验证。

#13


3  

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.

如果你所做的只是一个简单的网页,那就做任何事情。或者学习PHP更好。您将得到的大多数响应都来自于开发web应用程序的人,因此asp.net在功能和可维护性方面击败了经典的asp。

#14


2  

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.

我同意这里的每个人,除了那个说跳过webforms直接去MVC的人。这不是有益的。Webforms对于数据库驱动的应用程序非常有用,这些应用程序可以进行大量的表显示等等。MVC适用于更交互式的“Web 2.0”类型的应用程序。

#15


1  

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)

在完成了“将asp重命名为aspx并进行修改,直到将应用程序的端口编译为asp.net之后,我想说,即使是。net中的asp经典样式编程也比asp经典要好。当然,VS当然会鼓励你进入成功的陷阱,并将你推向web表单和代码背后的工作方式,但语言的表现力足以复制asp经典模式(即大量的金块/内联代码、交叉发布页面等)。

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

我想我以前听说过,你可以用任何语言写COBOL。这对经典asp来说是正确的。

#16


1  

I always use Classic ASP, it works beautifully.

我总是使用经典的ASP,它工作得很漂亮。

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,但它对大多数网站开发来说太复杂了。我的顾客也不喜欢,因为他们不懂。他们也喜欢知道他们不是局限于一个开发人员。

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.

ASP。NET不断变化,需要巨大的/恒定的学习曲线才能保持最新。MS将主要语言转换为c#,这使得转换变得更加困难。

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

我的工作效率在。net上慢了下来,因为我总是在寻找如何做每件事的教程或例子。

Visual Studio is pig sloooooow.

Visual Studio是猪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.

PHP有一个丑陋的语法和太多不同的框架,这使得开发人员无法学习。在我看来,只适合内部网使用,并有专门的员工。

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.

经典的ASP被锁定并且在今天完美地工作,就像几年前一样。有了一些库文件,代码的编写就像饼图一样简单,示例在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.

大多数人都不知道的是,vbscript是一种干净、可读、高效的代码。我把客户端内容留给jQuery这样的库,发现自己的效率要高出很多倍。

#17


#18


0  

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

如果您在这一点上使用经典的asp(没有来自CTO的授权),那么您需要看到一个收缩。或者你是受虐狂。或者作为撒旦教徒,你会喜欢的,因为你会下地狱!:p

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

在一个严重的注意……对于web应用程序,使用WebForms。

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

对于轻,快和脏的网站,使用ASP。净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...

ASP的优点是可以使用VB。NET, c#, Eiffel, Boo或PHP为您的语言!PHP请查看Phalanger…

#19


0  

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

因为我的工作是创建解决方案而不是编写代码,所以我更喜欢ASP。净在典型的ASP。虽然经典的ASP仍然适用于非常小的、简单的站点,但是在ASP的背后仍然有很多强大的功能。当写一个稍微复杂一点的网站时。此外,即使在ASP。NET您仍然可以使用记事本自己编写.aspx文件,包括嵌入式vb或c#代码。Visual Studio仅仅提供了许多附加的功能,而不需要自己编写更多的代码。而且,就像我说的,我不会因为写代码而得到报酬……