Home > Domino Tips > Developer > Andre Guirard on Java vs. LotusScript
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

LOTUSSCRIPT

Andre Guirard on Java vs. LotusScript


Andre Guirard
04.05.2004
Rating: -3.40- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


View member feedback to this tip.

Andre Guirard
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.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Java
Java code inserts data from Notes documents into a SQL table
Java code shortens strings in a SQL table
How to execute a stored procedure in Lotus Notes Domino using Java
How to return an HTML representation of a Lotus Notes rich-text field
Shrink Lotus Notes databases with many attachments
Converting Lotus Notes Domino Web pages to PDF files with a Java agent
A bevy of Notes/Domino development tips
Converting Web pages to images using Java
Creating Microsoft Word documents from Lotus Notes
FAQ: Java for Lotus Notes and Domino

LotusScript
LotusScript finds the first occurrence of a string from the right
Clear Recent Contacts view and prevent repopulation in Lotus Notes 8.x
Search Microsoft Active Directory with LotusScript
Three steps to trap and handle save conflicts with LotusScript
Troubleshoot agents by displaying LotusScript variables online
LotusScript sorts lists alphabetically
LotusScript code rebuilds corrupted busytime.nsf file
Soft-code item names to facilitate LotusScript management
LotusScript agent automates selective mail file replication
LotusScript filters and attaches files to a Notes form

Java for Lotus Notes Domino
Top 10 Lotus Notes/Domino coding and development tips of 2008
Java code inserts data from Notes documents into a SQL table
Java code shortens strings in a SQL table
How to execute a stored procedure in Lotus Notes Domino using Java
Top 10 Lotus Notes Domino programming and development tips of 2007
How to return an HTML representation of a Lotus Notes rich-text field
Shrink Lotus Notes databases with many attachments
Converting Lotus Notes Domino Web pages to PDF files with a Java agent
Developing Eclipse plug-ins for Lotus Notes and Domino -- 7 tips in 7 minutes
A bevy of Notes/Domino development tips

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

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.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
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 technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts