Another aspect of scripting engines that influences their applications is how
they reuse/construct modules. This memo may help you understand the differences
among the scripting engines.
Reuse - What are the components?
(1) Java classes (a.k.a POJO)
(2) Java classes that implement a particular interface
(3) Functions or classes of the language, accessible via a module system
(4) Symbols that are available when script files are loaded
Construction - How to make a component
(A) Generate Java classes from scripts
(B) Write Java code and compile it
(C) Provide a set of functions/classes in a script file
Normative
Optional
Pnuts
2
1, 3, 4
(Reuse)
B (C)
A
(Construction)
Rhino
2 (4)
1, 3
B
A, C
Jython
3
1, 4
C
B, A
Groovy
1
4
A (B)
C
Beanshell
4 (1)
-
C
B
Caveat:
- Each section is a typical usage that I found on the web.
Summary:
- Pnuts, Rhino, and Jython make use of their own module system.
Jython makes use of existing Python libraries provided as script files.
- Groovy uses Java classes as their components.
- Beanshell uses simple script files for small applications, and Java classes for larger applications.