Comparison of three technologies: ASP, JSP and PHP

At present, the three most commonly used languages ​​for dynamic web pages are ASP (Active Server Pages), JSP (JavaServer Pages), and PHP (Hypertext Preprocessor).

    Introduction

    The full name of ASP is Active Server Pages, which is a WEB server-side development environment, which can be used to generate and execute dynamic, interactive, high-performance WEB service applications. ASP uses scripting language VBScr

 

ipt (Java script) as its own development language.

 

    PHP is a cross-platform server-side embedded scripting language. It borrows a lot of syntax from C, Java and Perl languages, and couples PHP's own features, so that WEB developers can quickly write dynamically generated pages. It supports the vast majority of current databases. Another point, PHP is completely free, you can download it freely from the official PHP site (http://www.php.net). And you have unlimited access to the source code, and you can even add your own features to it.

    JSP is a new generation of website development language launched by Sun. With its extraordinary attainments in Java, Sun has transformed Java from Java applications and Java Applet to new fruits, namely JSP, Java Server Page. JSP can complete powerful site programs with the support of Serverlet and JavaBean.

    All three provide the ability to mix some kind of program code in HTML code and have the program code interpreted and executed by the language engine. But the JSP code is compiled into a servlet and interpreted by the Java virtual machine. This compilation operation only happens on the first request to the JSP page. In ASP, PHP, JSP environment, HTML code is mainly responsible for describing the display style of information, while program code is used to describe processing logic. Ordinary HTML pages only rely on Web servers, while ASP, PHP, and JSP pages require additional language engines to analyze and execute program codes. The execution result of the program code is re-embedded into the HTML code and sent to the browser together. ASP, PHP, and JSP are all technologies for Web servers, and client browsers do not require any additional software support.

  Technical Features:

    ASP:

    1. Using simple and easy-to-understand scripting languages ​​such as VBScript and JScript, combined with HTML code, you can quickly complete the application of the website.

    2. No need to compile and compile, easy to write, and can be executed directly on the server side.

    3. Use a common text editor, such as Windows Notepad, to edit the design.

    4. Browser Independence, as long as the client uses a browser that can execute HTML code, it can browse the web page content designed by Active Server Pages. The scripting languages ​​(VBScript, Jscript) used by Active ServerPages are all executed on the WEB server side, and the client's browser does not need to be able to execute these scripting languages.

    5.Active Server Pages can be compatible with any ActiveX scripting language. In addition to designing with VB Script or JScript language, other scripting languages ​​provided by third parties, such as REXX, Perl, Tcl, etc., can also be used by means of plug-in. The script engine is a COM (Component Object Model) object that processes script programs.

    6. The server-side script can be used to generate the client-side script.

    7. ActiveX Server Components (ActiveX server components) have unlimited scalability. You can use Visual Basic, Java, Visual C++, COBOL and other programming languages ​​to write the ActiveX Server Component you need.

    PHP:

    1 database connection

    PHP can be compiled to have functions that interface with many databases. PHP and MySQL are an excellent group combination right now. You can also write your own peripheral functions to access the database indirectly. In this way, when you change the database used, you can easily modify the code to accommodate such changes. PHPLIB is the most commonly used series of base libraries that can provide general transaction needs. However, the database interface support provided by PHP is not unified with each other. For example, the interfaces to Oracle, MySQL and Sybase are different from each other. This is also a weakness of PHP.

    JSP:

    1.将内容的产生和显示进行分离

    使用JSP技术,Web页面开发人员可以使用HTML或者XML标识来设计和格式化最终页面。使用JSP标识或者小脚本来产生页面上的动态内容。产生内容的逻辑被封装在标识和JavaBeans群组件中,并且捆绑在小脚本中,所有的脚本在服务器端执行。如果核心逻辑被封装在标识和Beans中,那么其它人,如Web管理人员和页面设计者,能够编辑和使用JSP页面,而不影响内容的产生。在服务器端,JSP引擎解释JSP标识,产生所请求的内容(例如,通过存取JavaBeans群组件,使用JDBC技术存取数据库),并且将结果以HTML(或者XML)页面的形式发送回浏览器。这有助于作者保护自己的代码,而又保证任何基于HTML的Web浏览器的完全可用性。

    2.强调可重用的群组件

    绝大多数JSP页面依赖于可重用且跨平台的组件(如:JavaBeans或者Enterprise JavaBeans)来执行应用程序所要求的更为复杂的处理。开发人员能够共享和交换执行普通操作的组件,或者使得这些组件为更多的使用者或者用户团体所使用。基于组件的方法加速了总体开发过程,并且使得各种群组织在他们现有的技能和优化结果的开发努力中得到平衡。

    3.采用标识简化页面开发

    Web页面开发人员不会都是熟悉脚本语言的程序设计人员。JavaServer Page技术封装了许多功能,这些功能是在易用的、与JSP相关的XML标识中进行动态内容产生所需要的。标准的JSP标识能够存取和实例化JavaBeans组件,设定或者检索群组件属性,下载Applet,以及执行用其它方法更难于编码和耗时的功能。通过开发定制化标识库,JSP技术是可以扩展的。今后,第三方开发人员和其它人员可以为常用功能建立自己的标识库。这使得Web页面开发人员能够使用熟悉的工具和如同标识一样的执行特定功能的构件来工作。 JSP技术很容易整合到多种应用体系结构中,以利用现存的工具和技巧,并且扩展到能够支持企业级的分布式应用。作为采用Java技术家族的一部分,以及Java 2EE的一个成员,JSP技术能够支持高度复杂的基于Web的应用。由于JSP页面的内置脚本语言是基于Java程序设计语言的,而且所有的JSP页面都被编译成为Java Servlet,JSP页面就具有Java技术的所有好处,包括健壮的存储管理和安全性。作为Java平台的一部分,JSP拥有Java程序设计语言“一次编写,各处执行”的特点。随着越来越多的供货商将JSP支持加入到他们的产品中,您可以使用自己所选择的服务器和工具,修改工具或服务器并不影响目前的应用。

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326987900&siteId=291194637