I am pleased to announce the release of Script Monkey. It's a Java based open-source plugin/tool/framework aimed to take Java to the next level by ahieving the power & flexibilities of interpreted/dynamic languages. Currently, it is available as IntelliJ plugin. Hopefully in the near future, I like to bring in more flavors of this tool.
I am not going to discuss the pros & cons of compiled vs. dynamic languages. Because, you may have already came across tons of articles discussing that. The key point which I would like to highlight in this article is how Script Monkey shifts the paradigm of Java plugin architecture.
Well, we all know what plugins are. Almost, every software products whether it's browser, IDE or consumer app that is released in the market today would have some form of plugin/addon support. Plugins help the software tool to be expandable, customizable or tailorable for a niche user.
Alright, let's get to the real meat of this article and discuss some underlying implementation that can help make my case. In good old days, the way we write plugins, whether it's for Eclipse, IntelliJ or Netbeans is by creating a metadata/manifest file (maybe some .xml configs) that would contain the specifics of classes(controllers,actions etc.) involved and the plugins would be coded against the Plugin API (IntelliJ has something called OpenAPI. Eclipse & Netbeans have some similar API's as well) provided by the tool. If you think abt it, there are lots of boiler plate code involved in running every plugin. Like, the code used to load, unload, assign or delegate actions to the plugins. The most important of all is that the plugin is kind off closed. If you want to perform a slight variation in what a plugin is doing, then you need to checkout it's source (if it's open-source), make changes to the code, recompile and deploy it to wherever it's supposed to go. In my opinion, one of the key reason why dynamic languages are pretty useful is because of not needing to write these kind of boiler plate code and the ability to perform lot of things during runtime. And, that is the exact same reason why Java has Scripting API & tools like Rhino, Jython, JRuby etc. are created for.
Another important thing I want to stress here is, the tool we are using, whether its Eclipse, IntelliJ or Netbeans, already has millions of lines of code running inside. If the API is designed well, we should be able to exploit/invoke the methods we need at runtime. Which in other words, code re-usability in steroids :).
Obviously, I didn't want to overload too much details on Script Monkey in one article. Hopefully in my future articles, I'll discuss more on other aspects of this tool as well.
Like I said before, currently it is available only as IntelliJ plugin. With the help of open-source community, I have confidence that I will be able to take it to Eclipse,Netbeans etc. users as well.
Thought, comments, questions?