Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lotus Programming...

Status
Not open for further replies.

CharlieIT

MIS
Apr 9, 2003
157
US
I'm hoping someone can answer this question. Years ago, my company hired a Lotus Developer to design a special database that runs on our Domino (5.0.12) server. Over the years, our developers have added and edited views in the database. What I am looking to do now is to seperate the code from the database so that I can save just the code itself in our code management software. This is not a one time thing, but it would be done everytime someone makes a change to the database. Is there some way to export and import code to and from a database in Domino?

Thanks for any help you could provide!
 
Export code is simple : use the Designer client, open the database you wish to analyze and do a Synopsis (in the Other section).
Depending on the size of the code, you may have to seperate the Synopsis into several parts if it gets too big.

Unfortunately, Lotus has not included importing code from the Synopsis, so this is a one-way deal.

LotusScript has a better deal : you can export code written in Libraries and import them back with in-client functions. However, this ability is not extended to agents or buttons of any kind - you have to save manually for those.

In short, archiving design is best done by creating a template and archiving that. Code import and export functionality in Notes is rudimentary and not up to the task of archiving and retrieving in a business environment.

Pascal.
 
You can export and import the design using the NotesDXLExporter and NotesDXLImporter classes.

Cheers,

Woonjas
IRC: #notes on EFNet
 
You'll have to write agents of course (or possibly look on-line for example code that does this).



Woonjas
IRC: #notes on EFNet
 
I agree that the export is possible with the NotesDXLExporter.
Unfortunately, the NotesDXLImporter is not reliable. If it is a simple database, then it should work all right. But when you get into DXL file sizes of over 70MB, something always hangs before the end, and the end result is a database without any views.

As far as reliability is concerned, I still root for the template db.

Pascal.
 
pascal,

try using a 6.0.3 client instead... that one's got the most stable dxl export/import engine sofar.

we created an application for a project to help with the migration of 30k apps from R4 towards R5/6 (and from windows to OS400), which used this extensively.

anything after 6.0.3 crapps out after a while.

Cheers,


Woonjas
IRC: #notes on EFNet
 
woonjas :

So, my 6.5.2 client is the reason the DXL code dies off ? Possible.
I must say that, given the size of the DXL file I got for my working example (70MB for a reasonably complicated design), an 30k file is not much of a db, design-wise. Maybe the DXL code doesn't have time to die out on a design structure that small.

Pascal.
 
pascal, the project involved migrating 30k=30000 applications.

our application analyzed the designs, of those applications (if they inherited their design from a template and the template was available in the environment it would only flag the template for (possible) changes etc. thus reducing the amount of work that needed to be done considerably.

At the time of the project 6.0.3 was out and everything worked fine. last year I used the application again to analyze some applications of a customer and it turned out that it crashed my 6.5.x client after a while (red box of death).

using the 6.0.3 client it analyzed all designs without any problems whatsoever.



Woonjas
IRC: #notes on EFNet
homepage:
 
Right. Obviously, over 30000 apps will certainly test the gamut of possibilities of just about anything. Point taken then.

We just have to wait for 6.5.x+1 to solve this issue ;-).

Pascal.
 
I guess this is one of those questions you ask that takes on a life of its own...

My original question was really about how to track code changes in Lotus Notes databases. If I have three developers working on a database (or a series of databases), how would I know what is being changed and by whom?

For instance, in VB.NET, I could use Microsoft SourceSafe, or some other tool to check out components, make changes and then check them back in. If there is a problem with the new code, I not only could tell who made the change and when, but I could compare component "A" to component "B" to see exactly what was changed--right down to extra line spaces.

To save versions of the databases we have now, I simply chose to make a new copy of the database and chose to save "design only" instead of "design and documents". Once I have the latest design saved, I can check it into our Source Control Program (we use a product called "Synergy"). Unfortunately, if someone wanted to figure out what changes I made, it would require a lot of work to look for my comments in the code--since I make changes to so many different places in the database.

It seems very rediculous to me for IBM to provide an application which encourages development (because that is one of the things it has over Outlook), and yet at the same time they provide one of the worst ways to manage code.
 
and yet at the same time they provide one of the worst ways to manage code

And yet, that's exactly what they did.

I have found that the only way to properly manage code versions is to create a template for the version in question and archive it (and document it elsewhere).

I work with a db I have named "Template Archive". Each doc contains the version number, the name of the app, the template and the description of what design elements are critical in that version.

If I want to roll back one version, all I have to do is take the appropriate doc and place it on the prod server. The design task will "downgrade" the version for the next day.
Of course, this implies that development is done one step at a time (on a dev server), properly validated (on a test server) and documented before going on to the next step.

Pascal.
 
I realize that saving the entire template is a way of archiving--in fact, that is what we are doing now. My point is though, suppose you worked for 8 hours on a database and made multiple changes to many secitions of the template, how do I know what code changes you made? Because you documented it all? In other development environments, the code changes can be seen by comparing document "A" to document "B"--in order to catch those problems where the developer says, "oh yeah, I forgot to document that", or "I really didn't think that small change would've caused this problem". Or even "typos". My point is, in Lotus Notes you have to save the WHOLE document, and there is no way to make comparisons between the two documents--and that is a horrible development environment because it makes it hard to track changes and hard to debug. In other development environments, I can see that "Richard" made a change yesterday at 3:34pm by putting a "/" in line 47 of document "X". The software tells me that--not the developer.
 
I think that the problem you are talking about is more a developer discipline issue than a template issue.
Of course, if IBM had been kind enough to give proper versioning tools, it would be less of an issue.

Pascal.
 
I can see why you would think that--because I chose poor examples to illustrate my point. It is natural for humans to make mistakes. I manage a development team. Depending on the enhancement and the strengths of my developers, I could have quite a few people working on a database in a given day. In VB/C#.NET, VB/C++ 6.0, etc., I can see exactly what was changed from day to day and who made the change. I can also see the previous code, and easily choose to roll back to it if I want to. In Lotus Notes I have to wade through the entire template clicking on each section of the template to search for the changes. I had hoped that there was a better way...but from this discussion it sounds like there isn't.
 
The day some third party manages to make a code repository for Notes that functions like what you say about VB, C++ et al, that day someone is going to get filthy rich - and he'll deserve it.

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top