Advantages of LotusScript:
- I personally know LotusScript much better than I know Java.
- It allows access to the Notes client "front end" if run from a Notes client.
- There are lots of free Visual Basic examples that you can steal and reuse in your code.
- There are lots of free useful LotusScript classes and functions that you can download from various sources and reuse. For example:
- Domino Design library examples
- OLE automation using LotusScript is really easy, particularly when integrating with Microsoft programs that use Visual Basic as their internal scripting language. For instance, you can record a macro in Excel and then just copy and paste the resulting code into your LotusScript agent to automate the same task.
- It lets you use the LC LSX for accessing relational data, which is generally more efficient than JDBC -- if you know the efficient way to write LC LSX code (see LC LSX chapter in Implementing IBM Lotus Enterprise Integrator 6).
- It's less strict than Java, making it easier to write little throw-away scripts for one-time use. For example, you aren't forced to either handle or declare every possible error condition.
Advantages of Java:
- Java is trendy, so in your resume or annual performance review, it sounds much better to say that you wrote lots of Java code than that you wrote lots of LotusScript.
- Java supports multi-threading, allowing your script to do other things during an I/O wait or while waiting for a remote process to return.
- There are a lot of other applications for which LotusScript is not an option and Java is, so you might as well get the practice.
- If you later need to convert your agent into a servlet for better performance, you don't need to rewrite the entire thing.
- There are a great many free, pre-built Java classes that you can steal and reuse. (Note, however, that you can also use most of these from LotusScript via LS2J).
- HTTP operations are easier in Java. Using classes that come with the Java environment, you can easily do both "gets" and "posts" with any content type. LotusScript just lets you do "gets," and then the content had best be HTML. And then it's not easy to get the original HTML.
- Java is more strict and formal than LotusScript, making it a good choice when you want to write bulletproof, easy-to-maintain code that will be around for a long time.
Java is far harder to debug than LotusScript is. Java Error messages are vague and useless.
-- Joe A.
That is not necessarily true. In LotusScript, you must have the debugger open in order to find the error. I find the LotusScript debugger a real pain after coming out of the Java environment. If you have any kind of Java console, you get the exact line the problem occurs on, the exact problem, and can easily adjust your code accordingly.
-- Jeff L.
Do you have comments of your own? Let us know.