Why Java with Domino?

I may be asking for a drubbing and if so, go ahead I probably deserve it.

I am an experienced Notes/Domino developer. I actually installed and used V1.0 in 1989. However, I have had no exposure to Java and so far no need in my work to investigate or learn Java.

Why would I want or need to use Java? What would I use Java for in my Domino development environment? Would y’all like to wade in with your opinions or are there resources that will tell me the “why and what for” of using Java with Domino?

I’m coming from a point of ignorance. Can anyone enlighten me?

Thanks!

Subject: Why Java with Domino?

Here is my list:

Pros

  1. The language itself is powerful, with many useful data structures already included in the base API.

  2. There are a lot of useful (free) classes out there that you can re-use.

  3. The security model of Java is sufficient.

Let’s say you use LotusScript to call a third party active x control function. Q: Who says the active x control is safe? A: the

developer. This could be a bad thing.

Okay, so you run this function in your mystery ActiveX control… What language was it written in? You won’t likely know. But if it is written in C or C++, there could be potential vulnerabilities you are exposing your application to.

Java is managed source, you should not have to worry about buffer overflow exploits, and the other evils known to unmanaged source languages.

For example, you hit a site that uses js/shell code to exploit a popular control that you happen to be using for your domino app. What could happen?

Ok, to be fair. When would you ever need to use a third party control or dll from LotusScript? One example is if you need to use LotusScript to do an http transaction, you might use the msxml object.

Whereas in Java, using the java.net package would handle your requirement. And I am not saying msxml is unsafe, I just making a point that making 3rd party COM objects available for you lotusscript to work, could expose you additional risk.

  1. Flexibility. As a developer working with Lotus Notes/Domino, it is probably a good thing to be able to use all of it’s capabilities.

For example, you may decide to using JFC/Swing interface (JFrame, JTables, etc) might be a good choice in a particular feature in a notes thick client app. If you decide accomplishing the same using the subforms, tables, and dialog boxes native to the Notes designer is more limited or challenging.

  1. Can use external IDEs to generate the code. Not that I am a fan of going outside of my dev environment for this, but the reality is there are other IDEs that are more mature and will evolve at a faster rate than Lotus Designer.

For example, with Eclipse, I can use pluggins to tie my code into a shared versioning repository, such as Subversion. Or I can make my own pluggins to enhance my experience.

Or even use DomiEclipse (whenever it works on R7, Exclipe 3.2x+)

Cons

  1. As of R7, the IDE for Java is insufficient. There is no real debugging capability in Lotus Designer.

This is a huge Con actually… without this limitation, I would always use Java. But as of now, it is often necessary for me to justify using Java in Notes.

Subject: Why Java with Domino?

Thanks Everyone!

You all confirmed my suspicions. If your development environment is limited to Notes/Domino there is virtually no reason to use Java. I agree, Java is the “next big thing” in the internet centric development world. The power and flexibilbity is unparalleled. You would use Java only if you need to significanly extend your development efforts beyond what you can do with Notes/Domino.

Good, bad or indifferent, I’m working in Notes/Domino exclusively.

Thanks!

Subject: Why Java with Domino?

If a developer knows Java but isn’t familiar with dialects of Basic, it might very well be faster and easier to get going with Java than to learn LotusScript. That, of course, doesn’t apply to you.

In an organization which already uses Java, you may be able to profit from recycling existing Java components. That may or may not apply to you.

What does apply to you is the large body of useful Java machinery out there. Want to draw complex bar charts on the fly? There are free or cheap Java tools for that. Generate PDFs? There’s free or cheap Java for that. Process credit cards? There’s Java for that. Incorporate GIS? There’s Java for that. Whacky display widgets which draw from enterprise data? You get the idea. There’s a vast range of stuff where you can get Java classes for things you can’t do or can’t do quickly and easily with more “native” languages.

Subject: A few reasons (imho)

You get started learning Java so you know it for other apps (like composite apps with Hannover or Sametime 7.5!)

There are a bunch of Java classes to do things like credit card processing or web services (as a consumer) that you can use.

You can only use Java in Domino agents or web services. Only for back end work. There are no front end classes. You can use a JDE (Java Development Environment) like Eclipse to write your code, which is much better than what Domino Designer has for Java.

See TLCC Course Details - Beginner Java Programming for Notes Domino 7 if you want to start learning java for Domino.

Howard

Subject: Why Java with Domino? … Not for front-end processing

I’m a bit like you (although I was still at IBM in 1989 and only got to use Notes until after I took early returement in 1993 and R3 had just been released).

Other respondents have already pointed out some good reasons for getting familiar with Java (tonns and tons of free and commercial plug-ins, the ability to do things that otherwise you couldn’t with Notes (except maybe via the C API), the fact that Hannover is based on the Eclipse platform [which is largely but not necessarily synonymous with Java apps], etc, etc.

BUT always remember one thing, that Java only deals with Notes back-end classes so you’ll still find LotusScript useful and necessary.

Another take on this is to get the best of both worlds, by calling Java functions from within LotusScript. TLCC have a good tip on this at TLCC Tips for XPages, Notes and Domino - This tip: Use Java in LotusScript with the introductory comment: “There are many actions which can be coded much easier in Java than LotusScript. Accessing web services or accessing the content on an HTML page are good examples. In addition, there are many public domain Java classes that handle common tasks. Many payment processing vendors have a Java API to process credit cards. So, what’s a LotusScript coder to do? Use LS2J to call Java classes from within a LotusScript program! This tip will introduce the use of LS2J.”

Subject: Why Java with Domino?

For me, the reasons are

  1. how boring it is to write more LS after all these years. I just don’t enjoy it anymore, would much rather not be in robot mode

  2. To me, and others may disagree, the proprietary-ness of Notes is slowly slowly being killed. So if you can’t do anything but LS, your Notes career will be as slowly but surely die

  3. all the other things the other people said, which are the main thing…LS gives you about 30 or so objects you can use, Java gives you thousands upon thousands. LS looks like a little toy next to the functionality of Java

Subject: RE: Why Java with Domino?

The actual Java language is far superior too.

If you have ever tried doing any ‘serious’ OOP in LotusScript you will have torn out as much hair as I have. In a nutshell OOP in LS is a pain.

Java on the other hand is built to do OOP from the ground up. It’s only when one starts using Interfaces and Abstract classes etc that the real power of Java starts to become apparent.

Edit: Shameless Plug - If you do any Java development for Domino you might want to have a look at http://www.domiclipse.com.

This is an Eclipse Plugin which makes it easy to import/export Java Agents, Script Libs and Web Services into Eclipse. So, instead of using the [insert adjective] Java IDE in Domino you can use the fantastic JDT in Eclipse.

btw Domiclipse is open source so you can laugh at the source code if you want :slight_smile:

Frunobulax