Java vs. LotusScript? Hmm, what does it need to do and how much time to I have to write it? The question of what language to code in -- Java or LotusScript -- most often comes down to which language you are most familiar with and the amount of time you have been allocated to write your code. It could also be determined by what the code needs to do, such as interact a great deal with the Notes client UI. Beyond that, most arguments are purely semantic. Both languages are interpreted at runtime, rely on a number of underlying libraries to run and work on all the favorite operating systems of today.
If you go to everyone's favorite search engine, Google, and search on "LotusScript," you'll get approximately 87,800 matches. Try a similar generic search on "Java" and you will get somewhere around 62,700,000 matches. Now you would expect the Java matches to be considerably higher, but over 62 million more seems a like a big gap between these two languages. Although, many of those hits could be trade journal references to the current hot technology language. Regardless, here are some key things we take into consideration when designing an application:
These are good cases for LotusScript.
These are good cases for Java.
I know, I know ... you can "do" Web services and work with XML via LotusScript using SOAPConnection and DXL, respectively. You can also make calls into Java libraries using LS2J. Is one path better than the other? It almost always depends on who you ask. If you asked me, I would reply, "It depends!"
In almost all of our consulting engagements we use LotusScript. Most companies we deal with want the agents and underlying code written in LotusScript so their internal Domino developers can support the application after our portion of the project is complete. That's because most Notes developers are still working exclusively with LotusScript and the Formula language. Java as a standard development language is something many organization using Domino have still not formally adopted.
We use Java for the development of our fleXML tool for two reasons: Java provides a standardized XML interface (versus DXL, which is Domino only); and, we can more easily take our Java application to other operating systems and server platforms (i.e. non-Domino on non-Windows; e.g. an Apache/Tomcat application running on Solaris). Java also offers all the benefits of a much larger development community -- the people behind those 62 million hits on Google.
Scott Lemieux is an expert on SearchDomino.com, and president of Stone Pond Consulting, which specializes in delivering complex data integrations using Lotus and non-Lotus technologies.
Do you have comments on this tip? Let us know.