 |
 |
| Domino Tips: |
|
 |
 |

LOTUSSCRIPT
Andre Guirard on Java vs. LotusScript
Andre Guirard 04.05.2004
Rating: -3.40- (out of 5)




|
View member feedback to this tip.
Recently a developer asked the question, What are the advantages and disadvantages of writing a Java agent over a LotusScript agent? in the SearchDomino.com developer discussion forum. We asked SearchDomino.com expert and IBM Lotus developer Andre Guirard for his opinion on this matter. His response -- "They're each better than the other one."
See what SearchDomino.com application development expert Brian Mahoney had to say about Java vs. LotusScript.
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:
- Codestore.net
- 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.
As part of the Enterprise Integration team at Lotus, Andre Guirard works on upcoming versions of LEI and the LC LSX. Andre has published several articles about Domino development (mostly in The View), is an occasional conference speaker and has coauthored the Domino Designer 6 Application Development Redbook.
MEMBER FEEDBACK TO THIS TIP
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.
 |

|
Rate this Tip
|
To rate tips, you must be a member of SearchDomino.com. Register now
to start rating these tips. Log in if you are already a member.
|


');
// -->
DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.
|
 |
|
|
 |
|
 |
 |
 |
 |
| TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of . |
|
| |
All Rights Reserved, , TechTarget |
|
|
|
|
|