Four commonly used dynamic network technologies

1.CGI

CGI (Common Gateway Interface, Common Gateway Interface) is an earlier technology used to create dynamic web pages. When the client sends a request to the specified CGI program on the Web server, the Web server will start a new process to execute some CGI programs, and after the program is executed, the result will be sent back to the client in the form of a web page.
The advantage of CGI is that it can be written in many languages, such as C, C++, VB and Perl. There is a lot of flexibility in the choice of language. The most commonly used CGI development language is Perl.
The main disadvantage of CGI is that the maintenance is complicated and the operation efficiency is relatively low. This is mainly caused by the following methods:

  • The CGI program runs as an independent process. When multiple users want to establish a connection with the server, the server needs to create a CGI program process for each user response.
  • CGI programs are not resident in memory, therefore, frequent access to CGI programs will result in a large number of disk I/O operations.
  • Writing programs to access the database is more complicated.
    (Application of CGI in the embedded web:


    1. Since hardware such as I/O ports and servos need to be operated in the web page, CGI (Common Gateway Interface) technology is used, that is, the CGI program located in the server is called in the web page. , and then call the specific hardware operation in the CGI program. CGI is usually called through the action value of the form in the web page, such as:

<form action= "xxx.cgi " method=post>
When the form is submitted, the xxx.cgi program is executed.
2. After the cgi program is executed, it usually returns a new web page, but sometimes we do not expect to do so. We hope that cgi only executes the tasks assigned to it, and keeps the original web page that called it unchanged. The output form of CGI is fixed, there are usually three types, marked with different output headers: Content-type, Location, and Status. Among them, Status can achieve the effect we want: only execute the specified program, and do nothing else. Variety. A simple Bourne Shell version of the cgi program is as follows:
#!/bin/sh
do_something
echo "Status: 204 No Response"
echo
exit 0
3. Sometimes we need to automatically call the CGI program when javascript meets certain conditions, without the need for The mouse on the webpage clicks the button, and the following program can automatically submit the form, thereby triggering the CGI program:

)

2.PHP

PHP (Personal Home Pages) is a server-side scripting language embedded in HTML that can run on multiple platforms. It draws on the syntax of C language, Java language and Perl language, and has its own unique syntax.
Since PHP adopts the Open Source method, its source code is open, so that it can constantly add new things to form a huge function library to achieve more functions. PHP supports almost all databases out there.
The disadvantage of PHP is that there is no support for components like JSP and ASP, and the extensibility is poor.

3.JSP

JSP (Java Server Pages) is a Java-based technology for creating dynamic web pages that support cross-platform and cross-Web servers. JSP is not the same as the server-side scripting language JavaScript. JSP is to add Java program fragments and JSP tags to traditional static pages to form JSP pages, which are then compiled and executed by the server.
The main advantages of JSP are as follows:

  • JSP supports most platforms, including Linux systems, and the Apache server also provides services for JSP, enabling JSP to run across platforms.
  • JSP supports component technology, you can use JavaBeans to develop targeted components, and then add them to JSP to increase their functions.
  • As part of the Java development platform, JSP has all the advantages of Java, including "write once, run anywhere".
    The main disadvantage of JSP is that it is more complicated to write JSP programs, and developers often need to have a better understanding of Java and its related technologies.

    4.ASP

ASP (Active Server Pages) is a technology for developing dynamic web pages provided by Microsoft. It has the advantages of simple development and powerful functions. ASP makes the work of generating web dynamic content and constructing powerful web applications very simple. For example, when you want to collect data in a form, you only need to embed some simple instructions into an HTML file to collect data from the form and analyze it. With ASP, ActiveX components can also be easily used to perform complex tasks, such as connecting to a database to retrieve and store information.
For experienced program developers, if you have mastered a scripting language, such as VBScript, JavaScript or Perl, and already know how to use ASP. Any scripting language can be used in ASP pages as long as the appropriate engine that conforms to the ActiveX scripting standard is installed. ASP itself has two script engines, VBScript and JavaScript. From the technical level of software, ASP has the following characteristics:

  • There is no need to compile ASP scripts and embed them into HTML, and they can be directly interpreted and executed without compiling or linking.
  • Easy to generate ASP pages can be designed using conventional text editors (such as Notepad under Windows).
  • 独立于浏览器 用户端只要使用可解释常规HTML代码的浏览器,即可浏览ASP所设计的主页。ASP脚本是在站点服务器端执行的,用户端的浏览器不需要支持它。因此,不需要通过从服务器下载ASP页面。
  • 面向对象 在ASP脚本中可以方便地引用系统组件和ASP的内置组件,还能通过定制 ActiveX服务器组件来扩充功能。
  • 与任何ActiveX脚本语言兼容 除了可使用VBScript和JavaScript进行设计外,还可通过Plug-in的方式,使用由第三方所提供的其他脚本语言。
  • 源程序码不会外漏 ASP脚本在服务器上执行,传到用户浏览器的只是ASP执行结果所生成的常规HTML码,这样可保证编写出来的程序代码不会外漏。

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325330008&siteId=291194637