Judoscript
Encyclopedia
Judoscript is one of several general purpose programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

s designed primarily for scripting
Scripting language
A scripting language, script language, or extension language is a programming language that allows control of one or more applications. "Scripts" are distinct from the core code of the application, as they are usually written in a different language and are often created or at least modified by the...

 on the Java platform. Its originator and primary developer is software engineer James Jianbo Huang.

Overview

Judoscript was one of the first general purpose scripting languages designed specifically for use with the Java platform.

History

James Jianbo Huang originated Judoscript initially as a collection of several separate packages, libraries and Domain specific language
Domain-specific programming language
In software development and domain engineering, a domain-specific language is a programming language or specification language dedicated to a particular problem domain, a particular problem representation technique, and/or a particular solution technique...

s that he originated for use with the Java platform in J2EE Enterprise applications.

Huang designed and intended Judoscript and to provide a globally simple and intuitive scripting framework capable of leveraging the full suite of Java packages and third-party extensions to Java. The foundation of this design strategy was to provide an infrastructure: 1) with all the flexibility of a command shell; 2) with full interoperability and access to all facilities of Java; and 3) a simplified syntax that was intuitive to developers who are not necessarily Java programmers.

Language design

Because of the design principles of Judoscript, Huang has stated that it is generally not suitable for Enterprise-scale application development, and is not intended to replace traditional Java syntax. For example, unlike the Beanshell
BeanShell
BeanShell is a Java scripting language, invented by Patrick Niemeyer. It runs in the Java Runtime Environment and uses Java syntax, in addition to scripting commands and syntax.- Features :...

 scripting language, Judoscript has many simplifying syntax constructs (i.e., "syntactic sugar
Syntactic sugar
Syntactic sugar is a computer science term that refers to syntax within a programming language that is designed to make things easier to read or to express....

") that is not available within traditional Java syntax. This means that code written for Judoscript cannot be expected to compile in a Java compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

without any changes.

The advantage gained by this trade-off is that Judoscript allows for specialized constructs that are designed specifically for use with a given problem-domain. This obviates the need for "bottom up" programming that is designed from scratch using basic data structures and custom-made algorithms. Admittedly, such "bottom-up" programming is already obviated in large part by the extensive availability of standard and third-party libraries within the Java platform itself. The problem, according to Huang, is that these libraries often assume a higher level of experience with Java programming than is feasible or practical given the development requirements of most scripting applications.

Language features

Example: a simple HTML scraping routine written as a loop:


// print out information found inside HTML
do 'http://www.example.com' as sgml {
: println 'Found a hyperlink:' , $_.href;

: println 'Found a paragraph tag.';
TEXT: println 'Found some text:' , $_.length;
}

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK