Java scripting language (JSR 223)

I'm designing a framework. I want to attach it to the scripting language API to make it more general and easier to use (for some things, I prefer scripting;) Using languages such as J ruby, Jython or Rhino (JavaScript), you can use the interpreters of many popular scripting languages. As far as I know, all these languages implement the Java scripting language API to embed them into Java applications

Do you have any experience running it this way? I am particularly interested in dealing with associative arrays (or Java beans) How is the performance (e.g. compared to CGI like methods or native Java methods)? Is it easy to switch between different interpreters (of course, it's an API specification, but I still don't know how to deal with language specific problems)?

Solution

I have run rhino, Jython, jruby and groovy There are obvious language differences between them, and the overall performance is quite slow I found groovy the easiest way to create a domain - specific language (DSL) for my application Groovy is also the easiest language to control in terms of package accessibility and runtime variables, but groovy API needs to be used instead of jsr-223

I think groovy tools / documentation / APIs can be better integrated with the JVM, but of course ruby / Python has many followers, and the syntax may be more comfortable for some people Finally, I will try all of them in your framework and choose one Multiple scripting languages sound good, but may be a headache for debugging / support / conversion

After: you can check the BeanShell

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>