One of the common questions I get from partners that are extending our products is whether they should use Java or our scripting language to build the extensions. The answer is usually "depends", which is not what they sometime want to here. If you are pondering the same then here are a few considerations to help you make that decision:
- Performance - Our internal tests show that cached performance of both java and scripting are the relatively the same. There is a slight overhead in the scripting as the engine interprets the code for the first load but after that the performance is about the same.
- Scalability - If your extension is high volume then Java has the edge over the scripting engine.
- Flexibility - The Oracle XPATH2 engine we use internally in the product is very flexible for coding, with support for lots of functions that are inbuilt into XPATH. If you require more sophisticated code that does advanced data manipulation, then Java certainly has more flexibility in that you have access to a wider group of functions. XPATH2 is limited to what XPATH offers. Most people are happy enough with the XPATH2 side of the equation but sometime you can have site specific extensions that require advanced data manipulation (like matrix processing for example). Java handles that better.
- Development Tools - The development tools provided with the Oracle Utilities SDK for Java development are superior to the tools provided for the scripting language. Do not get me wrong, the scripting environment is sufficient for developers but since it is within the browser it is limited when compared to an Eclipse based IDE (which is what the Oracle Utilities SDK is based upon).
- Building - One of the advantages of the scripting language is that you do not need to compile or deploy code to get it to work. You build the code within the browser user interface of the product and save it. On the Oracle Utilities SDK side, you need to build the code and deploy it to the product. We have made that as simple as we can (in development you can run expanded mode) but when you deploy it means some externalization work on the technical side to build the jar files, include them in the product WAR and EAR files and deploy it to the server. This is typical in Java development. The Oracle Utilities SDK provides a set of utilities to aid in this process.
These are the typical considerations when choosing the technology to use. Happy extending our products.