Thursday, February 02, 2012

How do you work with Java libraries in LDD?

Hi guys,

We have faced up (actually long time ago) with problem which is related to Java libraries. Back-end of our applications on Domino is written on Java fully. Each Java library has ofc own classes and packages. However LDD allows to work only 1 person with 1 library at same time and it is really painful for us as we have to wait till another developer finish his job. Does anybody know if there is a way (SVN?) which may resolve our problem?
What we really would like to get - possibility to sync java classes with library, so developers would be able to work with same library and just sync changes to it.
We need something like on screen: java library transform into files and each of file represent own class. So we would sync it in both side...



Any help would be appreciated :)

10 comments :

Luc said...

been using IBM source control enablement for designer wich is an eclipse plugin proposed by ibm (http://www.openntf.org/Internal/home.nsf/project.xsp?databaseName=CN=NotesOSS2/O=NotesOSS!!Projects\pmt.nsf&documentId=AD6B9E0B436268D3862577D1002D83E7&action=openDocument)

It allows you to synchronise the content of your nsf (including all the java backend) with an ondisk folder.

You can then have a large developper team work together on the same project. you just have to make sure each developper has his own environment with his own copy of the application. You can synchronise devs, commit, and so on with the source control tool.

Been using git for this usage, now for more than 3 years.

Hope this helps.

Dmytro said...

8.5.3 has already integrated sync. inside of LDD. so its not a problem.

the main point is - extract classes from Java libraries as files and able to work with them and sync back

Luc said...

well... Perhaps i dont get it, but on one side i have LDD, with in the package explorer view webcontent\webinf\[source folder]\my java libraries.

And when i synchronise, these java libraries are available as flat files on your disk, and you can use them for source control as much as you want.

Now, if you re talking of java libraries in agents... i have no solution... but i think you could move them to the \webcontent\webinf folder, isnt it?

NotesSensei said...

Have your Java files as regular Java project (DDE after all is Eclipse) and have your build there write the Jar into the Domino project. Can be done using an ANT build task. So you actually never extract and write back but provide the jar new. Since it looks like you wrote them like that in the first place, the ANT build task is all you need to add

Andriy Kuba said...

Stephan, could you explain how do you replace jar in the Domino Library or Domino Agent?

I mean automatically. I know how to build jar by ANT, but I do not know how to add it to the Domino Java Library or Agent.

The only one way - by arms.

Andriy Kuba said...

Luc, "\webcontent\webinf" folder works only for xPages but not for Agents. This situation was few years ago when I test it last time.

axel said...

Dmytro,

even on Domino 6 & 7 I developed the Java Agent and Java Script Libraries (which is different from Javascript Script libraries as we all know) in Eclipse and imported them in Domino Designer with the import files button. I even had an in the end not so rudimentary stub project that mocked the behaviour of the Domino classes for junit tests, which is lost (unfortunatedly or not).
There are and possibly allways have been better ways as proposed by Luc and Stephan.
Loosen the dependence on Domino Designer when developing java for Domino is worth the effort me thinks. Just do it. Interesting debate btw.

NotesSensei said...

Andriy,
for Java agents it is tricky, you would need some "wrap it in DXL magic" to get it to work. For Jars in /webcontent/web-inf/lib you can use the Import/Export plugin on OpenNTF - it has an ANT interface.

Andriy Kuba said...

"/webcontent/web-inf/lib"
Is only for xPages, isn't ?

"wrap it in DXL magic"
This is known way. DXL is the key.

Dmytro said...

Stephan,

what u wrote, would it work with Java Libraries? Would we be able to work at /webcontent/web-inf/lib and then sync it with Java Libraries?