Java or Javascript

Hi,

As a newbie to the Servoy environment, I’ve read that Servoy supports a number of languages for development purposes. I was wondering if there is a preference in the development community to any particular language, such as Java or Javascript.

Thanks for your thoughts.

Ron

Hmm, I think you misinterpreted that.

The language to use is JavaScript.

But, since Servoy is built on Java you can also use Java for those tasks that are not covered by Servoy or any Plug-in/Bean.

There are some that use Java in Servoy to avoid using Plug-ins and Beans but that is a personal preference imho.

Hope this helps.

Hi Ron,

Servoy uses JavaScript as it’s primary scripting language to do all the coding inside your solution. Now if you need more powerful features that the JavaScript language and/or the Servoy Object Model (including the provided plugins and beans) doesn’t provide you can resort to coding in Java and create a plugin and/or (Servoy-aware) bean for use in Servoy. Then with JavaScript you can talk to your created plugin and/or bean inside Servoy.
Of course you can do some Java coding inside your JavaScript methods but that is another story (and constraints) altogether.
So most of us (99% or more) are coding in JavaScript-only when developing in Servoy.

Servoy provides end-user scripting via Rhino, which is an implementation of JavaScript written in Java. In addition to JavaScript though, Rhino also provides a means to “script” Java directly. You would likely script Java only to get access to packages/tools/features that are not available natively in Servoy, or via JavaScript (as mentioned before). See the link below to learn more.

http://www.mozilla.org/rhino/ScriptingJava.html

Hi Marcel,

Thanks for that information. I’m in the midst of my first read thru on as much Servoy information I can find. I’m not surprised that I’m getting some of it wrong, and I appreciate the input.

Ron

Hi Robert and j,

Thanks for that input. The clarifications on how things are done are really helpful.

Ron