Sie sind auf Seite 1von 3

A Java applet was a small application that is written in the Java programming language, or another

programming language that compiles to Java bytecode, and delivered to users in the form of Java
bytecode. The user launched the Java applet from a web page, and the applet was then executed within
a Java virtual machine (JVM) in a process separate from the web browser itself. A Java applet could
appear in a frame of the web page, a new application window, Sun's AppletViewer, or a stand-alone tool
for testing applets.

Java applets were introduced in the first version of the Java language, which was released in 1995. Java
applets are now deprecated since Java 9 in 2017 and will be removed from Java SE 11 (18.9) in 2018.[7]
[8][9][10][11]

Java applets were usually written in Java, but other languages such as Jython,[12] JRuby,[13] Pascal,[14]
Scala, or Eiffel (via SmartEiffel)[15] may be used as well.

Java applets run at very fast speeds and, until 2011, they were many times faster than JavaScript.[16]
Unlike JavaScript, Java applets had access to 3D hardware acceleration, making them well-suited for non-
trivial, computation-intensive visualizations. As browsers have gained support for hardware-accelerated
graphics thanks to the canvas technology (or specifically WebGL in the case of 3D graphics),[17][18] as
well as just-in-time compiled JavaScript,[19][20] the speed difference has become less noticeable.
[citation needed]

Since Java bytecode is cross-platform (or platform independent), Java applets can be executed by
browsers (or other clients) for many platforms, including Microsoft Windows, FreeBSD, Unix, macOS and
Linux. They cannot be run on modern mobile devices, which do not support Java.

Overview Edit

The Applets are used to provide interactive features to web applications that cannot be provided by
HTML alone.They can capture mouse input and also have controls like buttons or check boxes. In
response to user actions, an applet can change the provided graphic content. This makes applets well-
suited for demonstration, visualization, and teaching. There are online applet collections for studying
various subjects, from physics[21] to heart physiology.[2]
An applet can also be a text area only; providing, for instance, a cross-platform command-line interface
to some remote system.[22] If needed, an applet can leave the dedicated area and run as a separate
window. However, applets have very little control over web page content outside the applet's dedicated
area, so they are less useful for improving the site appearance in general, unlike other types of browser
extensions (while applets like news tickers[23] or WYSIWYG editors[24] are also known). Applets can also
play media in formats that are not natively supported by the browser.[25]

Pages coded in HTML may embed parameters within them that are passed to the applet. Because of this,
the same applet may have a different appearance depending on the parameters that were passed.

As applets were available before CSS and DHTML were standard, they were also widely used for trivial
effects such as rollover navigation buttons. This approach, which posed major problems for accessibility
and misused system resources, is no longer in use and was strongly discouraged even at the time.

JSP vs. JavaScript

JavaServer Pages (also known as JSP) is a Java based technology specifically used to help software
developers serve dynamically generated web pages (such as HTML and XML), as well as other document
types pertinent to the development of interactive web content. It was specifically created in order to
answer the scepticism that most web developers had concerning the Java platform’s ability to give
developers enough support for the web.

JavaScript is a scripting language that is object oriented (that is a programming paradigm implemented
through the use of objects, or data structures that are comprised of datafields and methods). It is used
to give programmatic access to objects that are found in both client application and other applications
pertinent to the running of a specific program. It was intentionally created client-side (meaning, client
orientated and run) in order to provide support for dynamic websites.

For all intents and purpose, JSP is a sophisticated Java servlet. JSPs are loaded into the server, and from
the Java EE Web application, operated and packaged as .war or .ear file archives. It allows Java code and
specific predefined actions to communicate with static web markup content. The page that results from
this interaction is compiled and executed on this specific server, and is viewed as an HTML or XML
document. It is comprised of two very specific syntax styles: scriptlet and markup – a scriptlet simply
being blocks of Java code that are mixed with markup, which is the standard HTML or XML.
JavaScript is a Java language; however, it is of a different dialect. It makes use of the ECMASCript
standard and is considered a dynamic, weakly typed, prototype based language that just so happens to
have first class functions. This suggests the extent to which many different languages have had on
JavaScript; however, it was designed to appear as Java – only in a format that is more feasible for non-
programmers to work with.

JSP pages are required to be compiled to Java bytecode classes in order to be able to be executed.
However, this compilation only really occurs one time – each time a change takes place to the source JSP
file. This is because Java is a compiled language, and not a scripting language – meaning the code must,
essentially, be translated to make the JSP compatible with the server.

Summary:

1. JSP is a Java-based technology used specifically in order to help software developers create dynamic
web pages; JavaScript is based on Java, but was created in order to allow non-programmers the ability to
work with it easily.

2. JSP must be compiled in Java bytecode in order to function properly; JavaScript is a Java language of a
different dialect, and does not need to be directly translated into bytecode.

Facebook3Pinterest0TwitterGoogle+PrintShare

Das könnte Ihnen auch gefallen