An applet is a small program that uses the resources of a larger program and usually provides customization or additional features. The term first appeared in the early 1990s in connection with Apple’s AppleScript scripting language for the Macintosh operating system. Today Java applets represent the most widespread use of this idea in Web development (Java).
Java applets are compiled to an intermediate representation called bytecode, and generally are run in a Web browser. Applets thus represent one of several alternatives for interacting with users of Web pages beyond what can be accomplished using simple text markup ( html; for other approaches see Javascript,
php, scripting languages, and ajax).
An applet can be invoked by inserting a reference to its program code in the text of the Web page, using the HTML applet element or the now-preferred object element. Although the distinction between applets and scripting code (such as in PHP) is somewhat vague, applets usually run in their own window or otherwise provide their own interface, while scripting code is generally used to tailor the behavior of separately created objects. Applets are also rather like plug-ins, but the latter are generally used to provide a particular capability (such as the ability to read or play a particular kind of media file), and have a standardized facility for their installation and management (plug-in).
Some common uses for applets include animations of scientific or programming concepts for Web pages supporting class curricula and for games designed to be played using Web browsers. Animation tools such as Flash and Shockwave are often used for creating graphic applets. To prevent badly or maliciously written applets from affecting user files, applets such as Java applets are generally run within a restricted or “sandbox” environment where, for example, they are not allowed to write or change files on disk.
Java applets are compiled to an intermediate representation called bytecode, and generally are run in a Web browser. Applets thus represent one of several alternatives for interacting with users of Web pages beyond what can be accomplished using simple text markup ( html; for other approaches see Javascript,
php, scripting languages, and ajax).
An applet can be invoked by inserting a reference to its program code in the text of the Web page, using the HTML applet element or the now-preferred object element. Although the distinction between applets and scripting code (such as in PHP) is somewhat vague, applets usually run in their own window or otherwise provide their own interface, while scripting code is generally used to tailor the behavior of separately created objects. Applets are also rather like plug-ins, but the latter are generally used to provide a particular capability (such as the ability to read or play a particular kind of media file), and have a standardized facility for their installation and management (plug-in).
Some common uses for applets include animations of scientific or programming concepts for Web pages supporting class curricula and for games designed to be played using Web browsers. Animation tools such as Flash and Shockwave are often used for creating graphic applets. To prevent badly or maliciously written applets from affecting user files, applets such as Java applets are generally run within a restricted or “sandbox” environment where, for example, they are not allowed to write or change files on disk.
No comments:
Post a Comment