Study thinking in Java Note 1 [browser plug-in]

Source: Internet
Author: User

Content is the abstract in the book

I. browser plug-ins

1. Script Language

With this scripting language, you can directly Insert the source code for your client program to an HTML page, and the plug-in that language will be automatically activated when the HTML page is displayed.

The scripting language is designed to address specific types of problems. It mainly involves creating a richer and more interactive GUI ). However, the scripting language may be able to solve 80% of the problems in client programming. The problem you encountered may be in the 80%. In addition, because the scripting language is designed to be simplified and fast as much as possible, before considering other more complex solutions (such as Java and ActiveX), you should first consider whether the scripting language is feasible.

Currently, the most discussed scripting languages include JavaScript (which has nothing to do with Java; The name is completely a Market Strategy) and VBScript (similar to Visual Basic) and Tcl/TK (derived from popular cross-platform GUI constructor ).

2. Java

If a scripting language can solve 80% of client programming problems, what should we do for the remaining 20%? Are they difficult issues? Currently, Java is the most popular solution. It is not only a powerful, highly secure, cross-platform programming language, but also a vigorous language.

Java uses the "Program chip" (applet) to cleverly solve the client programming problem.

A Program (or a "small application") is a very small program that can only be run in a web browser. As part of a web page, the program piece code will be automatically downloaded (similar to the picture on the page ). After activating the program chip, it will execute a program. One advantage of a program piece is that the software can be automatically downloaded from the server once the user needs the customer's software. They can automatically obtain the latest version of the customer's software, without errors or re-installation troubles.

The compiled Java program may contain many modules, so it is necessary to "hit" (ACCESS) The server multiple times for downloading (in Java 1.1, this problem has been effectively improved-using Java compression files, that is, Jar files-it allows designers to encapsulate all necessary modules for unified download ).

Java is designed to run in a secure "sandbox" in its program, which prevents operations from being performed on disks or memory areas outside the sandbox. The program chip has no right to write the file into the disk or delete the file. java 1.1 provides a framework for digital signatures. When necessary, a program piece can be taken out of the sandbox.

 

3. ActiveX

To some extent, a strong competitor of Java should be Microsoft's ActiveX, although it uses a completely different set of implementation mechanisms. ActiveX was originally a pure Windows solution. Through the efforts of an independent professional association, ActiveX is now capable of cross-platform use.

ActiveX does not limit the use of a specific language.

ActiveX is the most worrying of all. Compiling a program with ActiveX is like compiling a Windows Application -- you can do whatever you want. the current solution is "Digital Signature", and the code will be verified by an authority to show who the author is.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.