About Duffbert...

Duffbert's Random Musings is a blog where I talk about whatever happens to be running through my head at any given moment... I'm Thomas Duff, and you can find out more about me here...

Email Me!

Search This Site!

Custom Search

I'm published!

Co-author of the book IBM Lotus Sametime 8 Essentials: A User's Guide
SametimeBookCoverImage.jpg

Purchase on Amazon

Co-author of the book IBM Sametime 8.5.2 Administration Guide
SametimeAdminBookCoverImage.jpg

Purchase on Amazon

MiscLinks

Visitor Count...



View My Stats

« If you're looking for a book to learn Java, you have GOT to check this one out.... | Main| The last of my "reserve" paperbacks... »

What would you like to see in a Java article focused for Notes/Domino developers?

Category Software Development

Rocky Oliver contacted me last weekend and asked if I would like to write a series of articles for Advisor magazine.  These articles would focus on Java and how it relates to the average Notes/Domino developer.  Joe Litton and I are going to co-author this, and it should be a lot of fun...

The target for this series is the Notes/Domino developer who is competent in LotusScript, but isn't the type who writes their own LotusScript classes or anything esoteric like that.  They feel the need to learn Java because seemingly the whole world is going that way and IBM keeps telling them to get on the ball.  But rather than pick up a thousand page bookstop and turn to page 1 (or xvii), they need a quick jumpstart on the language, basic syntax, how it works with the Domino object model, and how they would use it in a Notes application.


I'd be interested in any feedback out there on what you'd be interested in for this series.  Joe and I are starting to list the subjects we want to cover and figure out how to break it up, and input at this point would be valuable to make sure we hit the mark...


The comment lines are now open for your use...

Comments

Gravatar Image1 - Another area to look at right at the begining is the development environment. Specifically the configuration of external IDE's like Eclipse and Netbeans and how to use these in conjunction with Notes. I realise initially Designer will probably be the first port of call but the other IDE's can really help master the basics.

One area I use Java alot for is accessing HTTP resources via GETs & POSTs and then dealing with that information in Notes. Something LS could never do, could make an intresting article.

Gravatar Image2 - you need it because your code will look cool!! i have an agent that spits out some html that we use sometimes here and there that is written in java. the other day one of the developers on our team was saying he wanted to learn more about java and he wanted to use my agent. and i was like, why? and he said, because this code looks so cool! he didn't actually have any real technical reason, he just like the look of my code. so, its one way to remake your development team in your image. ;-)

[insert the whole maniacal laughter mad scientist taking over the world thing here - oh wait that's twice on this thread...]

Gravatar Image3 - BWHA-HA-HA!!!! Advisor shall become ours! All bow to Tom and Joe! Resistance is... ahem....

Sorry... I'm back now.

Seriously, Rocky's approach is pretty dead-on to how we'll approach it. Joe and I have both struggled to learn this, so you're not going to get the "from on high" lecture here. Expect a lot of LS/Java comparisons, lots of code snippets, liberal doses of irreverent humor, and general mayhem. And along the way, we'll all learn a thing or two. In the beginning stages, we do want to get people quickly going on coding a Java agent, if for no other reason than it's a different way to do things. Once there, we can move into some of the more practical reasons why Java would be better in some situations over LotusScript. And finally, we can get into things that you just can't do in LS that Java handles with ease.

Joe and I will be learning right along with everyone else. We've both been very proactive in trying to get people interested in Java in our respective spheres of influence. Rocky was kind enough to just give us a wider audience to annoy! :-)

Gravatar Image4 - Let me tell you the things that attract me to learning more about Java then perhaps you can work out how you would cover them in your articles.

I had a very practical Java problem which I eventually gave up on. I needed to interface a domino 5 application running on a solaris server to ESRI's ArcIMS - running on the same server. An ideal solution would have been a Java agent but this was not a goer because Domino 5 only supports Java 1.1 and ArcIMS requires Java 1.2. The next option was to use a Java servlet running on Tomcat that accessed the Domino datbase through the Java classes. We tried this using both of the options given in Designer Help but they didn't even come close to working - we couldn't establish a session let alone do anything useful. Eventually we gave up and went to passing info between Domino and Tomcat in sequential files.

So what I would like to see covered is how to do this sort of thing with a bit more detail than is contained in the Help file.

Another reason that will one day make me want to move to Java is the huge amount of open source code that is available. For instance being able to zip up a file from a Java agent ,being able to produce a PDF file without needing Acrobat and in particular being able to render SVG to PDF using FOP http://xml.apache.org/fop/. The there is the Lostus XML toolkit. The issue with all of these is knowing what is possible with Release 5 and its Java limitations.

Gravatar Image5 - Yeah, what jonvon said ;-) But seriously, good idea, and best of luck with the articles!

What I'd like to see is focus on what Java can offer to the Domino developer: XML processing (OK, ND6 brings some of this to the table with the new classes, but lots of developers will be on R5 in their production environments for some time yet), network operations, threaded operations, servlets instead of agents, and so on.

What not to focus on: creating Java agents that simply process document collections. Coders can already do that in LS and formula -- you really need to show when / why coding a Java agent makes sense for the average Domino bod.

Gravatar Image6 - Since I'm the one that tasked Joe and Tom with this, let me give my slant:
Everything said thus far would be good to cover :) One thing to keep in mind is that this is a series - and we have as many issues to cover this as we want. So, I do believe that we can start small and grow into the "advanced" topics that jonvon and Ben mentioned.

I think we have to start with the "how", with a generous mapping of "here's how you do it in LS, and here's how it looks in Java". Explain along the way that there's no real reason to do these basic things in Java, but that they're being demonstrated to get the reader used to the new syntax and see how it "maps" across. In the earlier articles you can "preview" what's going to be covered in future articles - the "why" you would use it, the advanced concepts, and so on. I think the liberty and freedom of having as many articles as you need should provide the time and space needed to cover these concepts fairly well.

Clear as mud now?

Rock

Gravatar Image7 - The series sounds good; you've defined your target group, so comparing LS with Java seems like a valid way to go, esp. as you're saying "OK, so this is how a loop looks in Java vs. LS, but that doesn't mean you'd always do it in Java" (or whatever). The comparison is valid because you're demonstrating syntax differences, if nothing else.

So, good stuff. I think a lot of people will benefit from these articles!

Gravatar Image8 - i'd think the first thing developers should know is when its appropriate to use java. or, why would i want to, as a practical matter, in my practice. as in,

- since there aren't any ui classes, then almost never in the client. but do use it for the web. kinda thing. i try to write all of my (agent based) web code in java.
- use it to take advantage of native java classes that aren't available in lotusscript (list some of these)
- if you do use it in the client, maybe its just to take advantage of the native classes, so then maybe you do lotusscript and call out to java (in ND6 of course).
- use it for web agents.

well anyway if it were me i'd start there, with very development-centric use cases. whenever i talk to someone who is "anti-java" its because they don't understand why they need it.

then i'd probably show a simple lotusscript agent (or 3), and then mimic it in java, just to show how similar the calls are going to the api. when i figured that out, i understood that it wasn't going to be that hard. the help documentation for designer is really pretty good for that kind of stuff.

something i'd make sure to cover is error handling. that is really important. how do you allow an agent to recover from an error. we probably all know how to do that in lotusscript (i hope anyway), but this is a java thing that really needs explanation since its handled so differently.

anyway, just some (probably really obvious) ideas off the top of the old head. :-)

Gravatar Image9 - Make sure you include this: http://java.sun.com/docs/books/tutorial/java/TOC.html

It will help more than any book.

Gravatar Image10 - maybe the argument that IBM says this is the way to go will be enough to move people to start doing it. with the economy the way it is, it might be. usually people don't start doing something until a situation gets personal. if it were me i'd probably try to make the argument to myself - why java? and try to convince me. :-)

i think i see the useful routines thing as very connected to the question, why should i learn this? but maybe people are clamouring to get on board (because of economic realities and fear of getting laid off or whatever), and this is what advisor is reacting to.

for me its just been about curiosity, wanting to learning new things. i like java a lot, i think its cool. still got a lot to learn though!!!!

btw joe, you are an inspiration to me. thanks for sharing all the stuff you have about your certs and things you have done. its way cool. i'm sure whatever you and tom do will knock it out of the park.

Gravatar Image11 - im interested in use cases. I give you two examples how this look:

1. http://www.jnotes.de/jnotes/jix.nsf/id/~ADialog01 = a java demo how to build a java webinterface for an adressbook dialog similar to the Notes client (indeed, a lookup into the Domino NAB/Directory)

2. http://www.jnotes.de/jnotes/jix.nsf/id/~Planer46 = JNotes planer => a java based customized Notes calendar with with drag&drop functions, e.g. you can book cars and drag the time line however you wish .

Here is the planer online demo: http://www.jnotes.de/JNOTES/JIX.NSF/ID/~PLANERONLINE?OPENDOCUMENT&PLANER~ONLINEDEMO .. simply double click, enter an appointment and see the result (try to drag the time lines..)

Gravatar Image12 - I agree with Chris King. I want to see that it's really going to be an effort to pay off before I start messing with it. Up to this point, the only thing I've needed Java for is some XML stuff. Everything else I've done on Notes web based apps I've been able to do with @formulas, JavaScript and LotusScript. That includes all kinds of real-time integration with relational dbs, etc. Maybe I haven't pushed the limits on that type of thing. Maybe there's so much more I can do that I'm just blind to because I haven't seen the light of Java yet. That's what I want to know about before I start getting to the nitty gritty. I want the security hug with a- "yes, Tom, it's not a conspiracy, you really will be able to do more with this by learning it- you really will be happy you spent time on it."

Am I wrong or is Java slower that LotusScript? It seems I remember an Advisor article that compared methods of reading and writing to external data soucrces (in this case I think it was an ODBC compliant database) and Java lost in every test... Why would I want to put an extra burden on the server if I can do it another way faster?

I flip flop constantly- I see someone post something in a blog about Java and decide that I'm going to go learn it and start writing everything in Java. Then the constraints of time and an unclear goal turn me back to the other tools.

Anyway, I can't wait for the series to start. Time to go re-subscribe to Lotus Advisor!

Gravatar Image13 - John, You're correct that the thrust is "getting someone up to speed on java basics". I know a number of folks who have been doing Notes (and sometimes Domino) development for years, and who realize that the IBM stated direction is Java, and that there is much of the industry yearning for more standards-based development (like Java) ...but these folks are so busy with workload (and often reduced staffing to boot!) that it's hard to get the time to learn a NEW language.

So the target audience is the LotusScript-er who's looking for a hand getting going with some useful Java routines that they can understand without spending weeks reading about polymorphism, anonymous inner classes, etc. Those topics need to be absorbed eventually, but one can begin doing some practical Java work beforehand.

And I, too, learned about recycle() the hard way :-)

Gravatar Image14 - We're certainly gonna try! :-)

Gravatar Image15 - it strikes me that your mission statement is more along the lines of "getting someone up to speed on java basics" than what ben and i seem to be interested in seeing (or at least think is relevant). this is a bit of a conundrum, because once you figure out how to do the basic stuff, learning the syntax and so forth, you are sort of jumping into advanced topics.

maybe i'm off base, but perhaps this is where some of the disconnect has come from in the developer community. a lot of people have been scratching their heads... why java? everything i need to do, i can do right now with the common tools. of course this all depends on your development environment and the problems you are trying to solve. but i think there are a lot of people who just aren't convinced. all that to say an article or a series of articles on just the basics (like processing a doc collection as ben says) begs a lot of important questions.

when you do cover the basics, one to not forget to cover is recycle()! why, when to use it, what objects not to recycle and so forth. and explain that its only for Notes objects, not native java objects (learned that the hard way). maybe cover string handling, that's something that seems to come up a lot. its obviously pretty different in java than it is in lotusscript, so maybe something covering String and StringBuffer would be good.

ok, i'm all done now! :-)

Gravatar Image16 - I know that I'm the umpteenth person to say this, but it really would be helpful to know when Java is appropriate to use. I have taken all of the Java classes (pun intended), am comfortable with the syntax, and have even coded a couple servlets (non-Domino). However, I have never used Java and Domino together because I haven't found a compelling reason to do it and I can't accurately predict how it will affect my scope on a project. A list of "here's when to use it" scenarios would be very helpful. Honestly, I wouldn't even bother with LS/Java syntax comparisons until this "convince me why I need it" hurdle was cleared.

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)

Want to support this blog or just say thanks?

When you shop Amazon, start your shopping experience here.

When you do that, all your purchases during that session earn me an affiliate commission via the Amazon Affiliate program. You don't have to buy the book I linked you to (although I wouldn't complain!). Simply use that as your starting point.

Thanks!

Thomas "Duffbert" Duff

Ads of Relevance...