-
您的位置:首页 → 网页设计 → ASP文摘 → jsp强于asp但不是asp.net
jsp强于asp但不是asp.net
时间:2004/11/7 3:08:00来源:本站整理作者:蓝点我要评论(0)
-
By Corey Roth, Senior Web Developer
Special to ZDNet
Fo r a while, the Java 2 Enterprise Edition (J2EE) architecture looked like the best way to develop multi-tiered applications. Java Server Pages (JSP) and servlets had many advantages over the Active Server Pages (ASP) and Component Object Model (COM+) platforms. However, I think that is about to change with Microsoft .Net on the horizon. Microsoft .Net is providing a similar platform but with more functionality, and it quite possibly could have the foundation for being cross-platform at some stage. According to Sun, JSP is better than ASP for the following reasons: It has platform and server independence, it has extensible JSP tags and ASP is interpreted. Luckily, ASP .Net changes all of this.
The biggest argument why Java is superior is that it is a cross-platform environment. Having cross-platform is great, but at what cost? Java is slow by design. With Java, every time you run your program it goes through the Java Virtual Machine, an interpreter, which then converts the Java byte codes to native code. Microsoft may end up having support for platform independence with the way programs are compiled with Microsoft .Net.
When a program is compiled with .Net, it is compiled into a DLL or EXE in Microsoft Intermediate Language (MSIL) format, a processor independent assembly language. MSIL does not contain any dependencies on any particular operating system or architecture. The first time this EXE is executed, it uses Just In Time (JIT) compilation to convert the MSIL into native code. So the first time you run it, it may be slower, but subsequent executions will be faster. As you can see, this has the potential for adaptation to a cross-platform situation, but Microsoft hasn't made any promises of that yet.
Now, I don't know if Microsoft will ever actually convert .Net to work on other platforms, but they are putting the support in there for it. My response to cross-platform is: Who cares? For Java, all that means is that it works on 50 different types of Unix. As far as I am concerned, the Intel platform is the only one that is worth bothering with. Designwise it may be inferior to the Sparc or Alpha, but the Intel platform is the only one Microsoft develops for.
Of tags and scripts
ASP 3.0 does not have extensible tags, an advantage that JSP has held over ASP for quite some time. Now with ASP .Net, extensible tags are available. Through the use of Web Forms, ASP .Net is able to do data binding, form validation and more without the developer having to write any script at all. Developers even have the ability to write their own custom Web Form controls to suit their own needs.
Another problem in the past with ASP was that it was an interpreted language, whereas JSP pages are compiled into servlets the first time the JSP page is accessed. What Sun neglects to mention is that the servlet is still interpreted with the Java Virtual Machine. With ASP .Net, pages will now be precompiled to MSIL and then use JIT compiling, just like JSP. The difference is .Net gets compiled once into native code, and servlets are interpreted every time they are executed. In the long run, I think this will result in .Net code being more efficient.
Microsoft's .Net may not be perfect. Since it still is in beta, it may change quite a bit before it is actually released. However, I think it is a great alternative to what we had before. In the past, using COM and the Microsoft Transaction Server (MTS) was a nightmare for developers and using J2EE was slower than death. I admit for a long time, the J2EE platform was superior to ASP and COM+. With .Net coming soon, Sun should be looking for new ways to improve its platform and remain competitive. Otherwise, it may be losing future developers.
Corey Roth is a Senior Web Developer for Word Spinners, a Tulsa, OK-based Web development company. He has five years of experience in developing Web sites, and started his Web development career at Creative Labs. Corey is also considered a local expert in Microsoft technologies, including Active Server Pages, COM+ and Microsoft Site Server.
Disclaimer: 'Your Turn' is a commentary column written by a ZDNet News reader. The opinions expressed herein are those of the author, not those of ZDNet, ZDNet News nor its editors.
相关阅读
Windows错误代码大全 Windows错误代码查询激活windows有什么用Mac QQ和Windows QQ聊天记录怎么合并 Mac QQ和Windows QQ聊天记录Windows 10自动更新怎么关闭 如何关闭Windows 10自动更新windows 10 rs4快速预览版17017下载错误问题Win10秋季创意者更新16291更新了什么 win10 16291更新内容windows10秋季创意者更新时间 windows10秋季创意者更新内容kb3150513补丁更新了什么 Windows 10补丁kb3150513是什么
-
热门文章
没有查询到任何记录。
最新文章
没有查询到任何记录。
微软放弃.net名称的背后用不着妄自菲薄 对ASP和ASP程序员的一些话技术分析:.NET的优势与劣势代码大战:哪种语言会赢得开发的霸权?
人气排行
微软提供的功能强大的ASP-HTML转换工具.它将用ASP技术实现在WEB网页上浏览目录及文件从VB 6.0到VB.NET的转换2从VB 6.0到VB.NET的转换5IIS 5.1和IIS 6.0一些显著的重要区别从VB 6.0到VB.NET的转换1将.Net应用移植到Linux上来的Mono工程Serv-U :快速构建功能强大的FTP 服务器
查看所有0条评论>>