This is not meant to start a flam war it is just a simple question. I have seen a lot about java scripting in the last few months and I always wonted to know how it would be useful. Other than the fact that this technology is cool where/why would it be used.Thank you,Chris
Actually this is a perfectly valid question. A scriptable application, as you may know, is an application that can be extended at runtime through programs usually written in a high er level language than the application itself. These programs are called scripts.
The uses of an embedded scripting language really depends on your audience.
If the intended user of your application's scripting interface is you or other Java developers working on your application then scripting offers benefits such as:
- the ability to query information about objects in your application at runtime, great debugging tool
- the ability to prototype new application features quickly and easily
- the ability to provide a quick fix to your application quickly and easily
- the experience of developing with a new (more fun?) language
I think scripting adds the most to an application when it can be used by end users. Depending on how the interface is put together, embedded scripting can offer end users a way to add new features to your application, a way to customize your application beyond what is allowed in dialogs, a way to create shortcuts for common taks, and in general a way to really make your app do what they want it to do.
One of my own applications is scriptable. The interface lets users define new commands, recreate the entire menu structure in the app as they'd like it, respond to events in the application, and bind new keyboard shortcuts.
My users like it as it gives them the ability to customize the experience to what they want.
Scripting is a very cool thing that opens up a lot of possibilities for you and your end users.