Fast-start Java programming

Source: Internet
Author: User
Tags object model requires

The Java language is an excellent high-level programming language that allows us to get close enough to the problem we want to solve when we do a simple experiment with various solutions. However, in normal computing (and development), in many cases, "quickly prepare a Java program" to carry out the task is not unrealistic or too time-consuming. This article takes you into the secret World of FESI (free ECMAScript interpreter). There, expanding the Java language in a fast-start way is a standard, not an objection.

From concept to product, the Java platform and the Java programming language provide advanced functionality and comprehensive APIs that are not available in other development environments, thereby advancing the performance of software products. These features and APIs significantly increase productivity and shorten the product cycle.

It is as powerful as the Java programming language and is still a formal, compiled language program. The Java development cycle requires careful upfront planning. In a developer's daily life, in many cases he or she may need to create a simple one-time program, while development using the Java language may not be as necessary (and potentially excessive). This often happens in areas such as creating code test exploits, creating potentially one-time-only sorting code for multiple programs/behaviors, and creating rapid prototypes of application concepts. Many developers now discard the use of the Java language and turn to fast, hand-and-foot solutions such as command interpreter scripts or Win32 batch files. Unfortunately, these solutions are not portable and do not have the same functionality and support as Java platform solutions.

FESI, which is a script interpreter written in the Java language, allows it to be ported to all operating systems and hardware systems that support the Java platform. FESI supports JavaScript, called EcmaScript, and can get all the performance of the main JDK. This means that you can write EcmaScript programs using a comprehensive API as the underlying JDK. You have all the functionality of the Java platform and can control it by writing it quickly and with your hands and feet.

EcmaScript and JavaScript

EcmaScript is a portable branch of the JavaScript programming language, a programming language embedded in every modern Web browser. In fact, EcmaScript is the result of trying to standardize on a single language in a JavaScript language--making the code on a Web page work across browsers produced by different vendors (but primarily between Netscape and Microsoft browsers because they account for According to the majority of the installation group). ECMA is the European Association of Computer Manufacturers (European Computer Manufacturers Association), an association that manages many standards. EcmaScript is the ECMA standard No. 262.

In many ways, EcmaScript is the least common solution for scripting code compatibility issues in popular Web browsers. Although Microsoft Explorer 5.5 and Netscape Navigator 6.0 support EcmaScript, this is not to say that the JavaScript code created in the former can be run in the latter without any change.

To understand why this is the case, we need to look carefully at the composition of the JavaScript master environment. A description of this is given in Figure 1.

Figure 1. JavaScript Master Environment

The EcmaScript component provides only core language functionality-the original data type, expression assignment, and flow control, and so on. To do any useful work, you must use the language to manipulate the objects that the main environment provides to the scripting language. You do this by calling object methods or by changing their property values. Each JavaScript main program must expose its own set of main objects for use (for example, a browser can reveal an object model to interact with WEB pages). EcmaScript itself requires only a small set of local object support (see Resources).

In fact, within a browser, the most important difference between the available JavaScript master environment and the environment provided by FESI is the difference in the set of main objects that is revealed. FESI, by javaaccess extension, almost reveals all JDK objects for EcmaScript direct operation. In other words, we are free to use the EcmaScript program to control most JDK APIs. In addition to the javaaccess extension, FESI also provides special extension code in the following areas:

Access to the database through JDBC

File I/O

Basic I/O

These extensions help you to match object support to the EcmaScript way of programming, rather than the often more difficult Java API approach, making programming within a specific scope easier and simpler. We will experience this directly in the sample program discussed in this article. (See Resources for a download of the source code used in this article.) )

Before we go into the discussion, see "Download and install FESI" to let FESI run in your chassis.

Related Article

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.