开发者

Developing Applications that can interact Lotus Notes (.nsf) databases

I am a c# developer interested in developing a windows application to connect to a lotus notes .nsf db and 开发者_运维技巧display the information like 1) Number of forms 2) Number of views 3) Script Libraries 4) Actions 5) Agents

Once I do this, I want to read each form and the UI elements available in each form and generate an equivalent .aspx file.

I have lotus notes client and designer installed on my system.

Could anyone suggest how to proceed with this requirement?


You should find everything you need here http://www.ibm.com/developerworks/lotus/
It's my first stop for working with any IBM technology.

PS http://www.ibm.com/developerworks/lotus/library/domino-msnet/


Use domino interprop library that allows you to work with database. Like this:

var session = new NotesSession();
session.Initialize("password");
var db = session.GetDatabase("server name", "path to database", false);
if (db == null) throw new ArgumentNullException("cannot load database");
var collection = db.CreateNoteCollection(false);
collection.SelectScriptLibraries = true;
collection.BuildCollection();
var dxlExporter = session.CreateDXLExporter();
dxlExporter.OutputDOCTYPE = false;
var noteId = collection.GetFirstNoteId();
while (noteId != null)
{
     var doc = db.GetDocumentByID(noteId);
     var xml = dxlExporter.Export(doc);
     //do something with DXL
     noteId = collection.GetNextNoteId(noteId);
}


I had a requirement to communicate with Notes on a project a while ago and the best solution we found was to write web services on the Notes machine to expose the various bits and pieces of information.

You can use Java to do this, there is a pretty rich Java API available that should be able to help you. I'm not aware of any ways to communicate directly with Notes via a .NET API.

I want to read each form and the UI elements available in each form and generate an equivalent .aspx file.

For the section above, I'm not entirely sure what you're after - are you trying to replicate Notes forms in ASP.NET web pages? If so, that could prove to be a tricky task as you'd need to handle all possible elements that are available in Notes and translate them to an ASP.NET equivalent - not exactly something that will be quick to do!


If you want to implement some sort of Notes database migration tool to ASPX, I would suggest you to look at the Design DXL side. Although round-trip with DXL coded design elements is rather unsupported, you can easily export all design to am XML file and go from there. I am sure by parsing XML you can recreate almost everything and the success rate will only be based on your .NET skills. At the same time this way is only applicable for one-time exports, not for dynamically updated database. So assumed you want to have one time export and conversion rather than design your apps in Notes and then convert it to ASPX.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜