asp.net常见内置对象_常见问题解答:经典ASP与ASP.NET

asp.net常见内置对象

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference:

我被问到经典ASP和ASP.NET之间的区别,所以让我将它们放在此处,以供参考:

Let's make the introductions...

让我们进行介绍...

Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interaction and server-side processing; this model is complementary to serving static web pages like well-known ".htm" files which mainly have fixed content, and opens a whole new world of possibilities in the web area. The ASP page have a mixed content of HTML and server-side VBScript (all in a single file).

经典ASP由Microsoft于1998年推出,并根据用户交互和服务器端处理动态生成网页。 这种模型是对服务静态网页(例如众所周知的“ .htm”文件)的补充,这些文件主要具有固定的内容,并在Web领域中打开了一个全新的世界。 ASP页包含HTML和服务器端VBScript的混合内容(全部在单个文件中)。

Microsoft included ASP technology in every Windows version, from Windows 2000 to the latest. However, on newer versions of server operating systems, classic ASP is blocked by default (but this can be changed by server administrator).

从Windows 2000到最新的每个Windows版本,Microsoft都包含ASP技术。 但是,在较新版本的服务器操作系统上,默认情况下会阻止经典ASP(但是服务器管理员可以更改此设置)。

By default, ASP pages have ".asp" extension and are using VBScript (which is a restricted and "light" version of Visual Basic programming language).

默认情况下,ASP页具有“ .asp”扩展名,并使用VBScript(这是Visual Basic编程语言的受限版本和“轻量”版本)。

ASP.NET is the successor of classic ASP and implements a completely new model. Released in January 2002, this technology is actively supported by Microsoft in every Windows version starting with Windows XP and server-editions.

ASP.NET是经典ASP的继承者,并实现了一个全新的模型。 Microsoft于2002年1月发布了该技术,从Windows XP和服务器版本开始,Microsoft在每个Windows版本中均积极支持该技术。

The new ASP.NET web pages have an ".aspx" extension. The dynamic program code is stored separately (using the code-behind model) in another file with an extension of .vb (Visual Basic) or .cs (C sharp), depending of the programming language used.

新的ASP.NET网页具有“ .aspx”扩展名。 根据使用的编程语言,动态程序代码将单独存储(使用代码隐藏模型)在另一个扩展名为.vb(Visual Basic)或.cs(C Sharp)的文件中。

Comparing OLD and NEW

比较新旧

Classic ASP is similar to PHP in how it works and how it is written, where ASP.NET is more similar to the J2EE Servlet / Java Server Pages architecture.

经典ASP在工作方式和编写方式方面与PHP类似,而ASP.NET与J2EE Servlet / Java Server Pages体系结构更相似。

Classic ASP is much more simpler than ASP.NET and very easy to learn, compared to ASP.NET (I personally learned classic ASP in just 5 days from a very good and short tutorial).

与ASP.NET相比,经典ASP比ASP.NET简单得多,而且非常易于学习(我个人从一个很好的简短教程中仅用了5天就学习了经典ASP)。

You can edit classic ASP even with Notepad.

您甚至可以使用记事本编辑经典的ASP。

ASP.Net is a a compiled application (resulting in DLL-type file), while Classic ASP is a script-based language. You don't have to compile anything in classic ASP, just upload the file to the server.

ASP.Net是一个编译的应用程序(导致DLL类型的文件),而Classic ASP是一种基于脚本的语言。 您无需在经典ASP中编译任何内容,只需将文件上传到服务器即可。

ASP.Net is also an event-based model implemented via a set of so-called server controls. In classic ASP, there are no server controls, you have to write everything manually (which I love, because it leaves me the freedom I need).

ASP.Net也是通过一组所谓的服务器控件实现的基于事件的模型。 在经典的ASP中,没有服务器控件,您必须手动编写所有内容(我喜欢,因为它给了我所需的自由)。

ASP.NET uses the "code behind" technique in order to keep business logic away from the presentation, while classic ASP does not force you to to that (but you can do it, with your own technique - e.g. you must write additional code - if you want).

ASP.NET使用“代码隐藏”技术来使业务逻辑远离演示文稿,而经典ASP不会强迫您这样做(但是您可以使用自己的技术来做到这一点-例如,您必须编写其他代码-如果你想)。

In classic ASP, the client-server model is obvious: if you need to obtain an action on the client-side, you have to write JavaScript, CSS and HTML; if you want to process information on the server, you have to write VBScript (ASP). In ASP.NET these things are not so clearly separated, which may result in poor understanding and bad code.

在经典的ASP中,客户端-服务器模型是显而易见的:如果您需要在客户端上执行操作,则必须编写JavaScript,CSS和HTML; 如果要在服务器上处理信息,则必须编写VBScript(ASP)。 在ASP.NET中,这些东西没有被清楚地分开,这可能导致理解不充分和代码错误。

The most important thing about ASP.NET: it is NOT fully ASP compatible, even if you might think otherwise.

关于ASP.NET的最重要的事情是:它并不完全与ASP兼容,即使您可能另外考虑。

If you are an ASP programmer and you love it, you may find very difficult to learn ASP.NET...

如果您是ASP程序员并且喜欢它,则可能会很难学习ASP.NET。

Real-life opinion

现实生活中的意见

Tim Walton (Evesham Solutions) says: "The move to a .NET development environment was expensive and a far bigger change than many expected. The uptake was, and still is, much slower than Microsoft ever expected."

伊夫舍姆解决方案(Evesham Solutions)的蒂姆·沃尔顿(Tim Walton)表示:“迁移到.NET开发环境的成本很高,而且变化幅度比许多人预期的大得多。采用这种方法的现在(现在)仍然比微软预期的要慢得多。”

Also, he says: "ASP.NET for small to medium-sized websites is a huge overhead in many ways, and so for the foreseeable future I will be sticking with regular ASP for anything but the most complex of websites."  

他还说:“中小型网站的ASP.NET从许多方面来说都是一笔巨大的开销,因此在可预见的将来,除了最复杂的网站之外,我将继续使用常规ASP。”

This is one good reason he mention: "Regular ASP has the most lightweight development environment I have ever used - Notepad. Yep, that's all you need! Installation time? - It's already installed. Start up time? - It's running in an instant. Configuration? - Not needed. Availability? - Any PC ever".

这是他提到的一个很好的理由:“常规ASP具有我使用过的最轻量级的开发环境-记事本。是的,这就是您所需要的!安装时间?-它已经安装。启动时间?-它可以立即运行。配置?-不需要。可用性?-任何一台PC”。

Friend or foe?

是敌是友?

ASP.NET has a tendency to auto-generate code. Is this a powerful and useful feature? You decide...

ASP.NET具有自动生成代码的趋势。 这是一个强大而有用的功能吗? 你决定...

Just figures

只是数字

Google says there are just 0.36 billion search results of ASP.NET while ASP gets 3.29 billion results.

谷歌表示,ASP.NET的搜索结果仅为3.6亿,而ASP获得32.9亿的搜索结果。

The future

未来

The proof that classic ASP is here to stay: there are many implementations of frameworks for classic ASP (Simplicity, CLASP) and even AJAX for classic ASP (called AJAXED).

经典ASP的证明依然存在:经典ASP的框架(简单性,CLASP)甚至是经典ASP的AJAX(称为AJAXED)都有许多实现。

A quick glance at the Google Insights for Search for keywords like 'ASP.NET' shows a markedly declining trend since 2004. I believe this is conclusive...

自2004年以来,快速浏览Google搜索分析洞察到诸如“ ASP.NET”之类的关键字的趋势就呈明显下降趋势。我相信这是结论性的...

Final word

最后的话

My opinion: despite appearances, classic ASP seems to be much more HUMAN than his younger brother (ASP.NET).

我的观点:尽管有外观,经典的ASP似乎比他的弟弟(ASP.NET)更具有人类性。

PS: If you find this article helpful, vote YES for it.

PS:如果您认为这篇文章对您有帮助,请为“是”投赞成票。

翻译自: https://www.experts-exchange.com/articles/6769/FAQ-Classic-ASP-vs-ASP-NET.html

asp.net常见内置对象

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值