Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Advice on which API to use

Posted on 2004-08-26
Medium Priority
Last Modified: 2013-12-18
I have code that I wrote for outlook in C++ using Extended MAPI.  I had started out with the Outlook Object Model, but it turned out to be prohibitively too slow.  This is literally what my C++ code does:

The module is designed to create an XML database of all of your contacts (either from e-mail or actual Contacts).  

It goes through every message in every folder the end user selects, and creates ContactInfo objects in memory.  These ContactInfo objects contain data like e-mail address, subject of last communication, date of last communication, name (interpreted from name field if it is not a real Contact vs. just an email).  I do NOT go through the body or attachments.  For Contacts in Outlook, I grab the address, company name, job title, etc.  (every field I can).
The list of ContactInfo objects is then spit out to XML (I have about 1700 unique contacts where unique is defined by e-mail address).  

At a later time, I can read back in this XML, and go through all selected folders again, ONLY reading objects that were received/created after Date X, where Date X was the time of the last extraction.  

Now, there are many other things we do to write back data to Outlook/Exchange, but for now, I just want to be able to do that.  

Is LotusScript feasible here?  If not, is C++ API any faster?  
Question by:jjacksn
LVL 24

Expert Comment

ID: 11906720
With your background I believe C++ API would be the best, addition to that it has more flexiblity compared to LS and is faster...

LVL 19

Accepted Solution

RanjeetRain earned 1000 total points
ID: 11909342
Depends a lot on your specs. carrying over from your last thread; stop looking around, you know you need LotusScript. C++ API is truely faster and C fastest. But C or C++ API doesn't push your HDDs to start spinning @100000 rpm. Your HDD still does a 7200 rpm and maximum you get is what is defined by your disk controller. The REAL question is -- What do I need to use the available resources in a optimum way. YOu do not want your program to make your CPU go over 80%, do you? C, C++ is best when processing is the requirement. YOur requirement is data-extraction (read disk I/O).

You are not making a .EXE here. You are not making a stand-alone product. Your application runs as an extra (add-on in MS lingua). You want it to perform well, but doesn't mean you want the system to become non-responsive when your program runs.

Like Exchange/Outllok, there is a Domino/Notes pair here. Do you have any ideas at this moment what you wanna do it for? The server? The Workstation? An individual? An organization?

These are all open questions, whose answers you need. But these questions themselves reveal a lot. They reveal the way your app may come out. My another suggestion is -- firstly try n understand Domino/Notes environment. Then make up your mind what you want to do. Freeze your specs.

I see your MAPI/VBA thing. This is trivial to do in Domino. Trivial, as long as you know what is it that you are gonna do.
LVL 19

Expert Comment

ID: 11909414
Oh, did I hear Qwaletee say Use DXL API :)
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 11922016
I have been asking around elsewhere, and its not common sentiment, but, occasionaly, someone will says, "this is trivial to do using the ODBC provided for NotesSQL".  What is the argument against using this method?
LVL 19

Expert Comment

ID: 11929897
No arguments againts NotesSQL. Just that I am not comfortable it (My own argument).

See, the problem of this world is that, everyone has certain likings and dislikings. I feel you will be happiest doing it with C++ API (just becoz you are very very comforatble with it). But, one thing is sure. NotesSQL would be slower than C++ API (and may be even slower than LotusScript).

Another thing is: I do not know why someone would suggest you NotesSQL. NotesSQL ain;t particularly suitable for this purpose. As far as I understand, your need is more of "data-extraction" than "data-query". COrrect me if I am wrong.

I will again suggest, take a look at LotusScript. Its capable, reasonably fast and easy to learn. If you are looking at reducing your development time, take a llok at DXL API. I do not know how fast/slow that is, but it can be the fastest whereas developement time is concerned.
LVL 31

Expert Comment

ID: 11935541
Yes, you could use DXL for this, but the extra I/O of irrlevenat item transform, and extra logic for handling it, would make it silly.  if you are using C++, and are willingt  to spend the time to learn the AOPI, go with the C++ API.  It has relatively simple atomic functions for searching content by date.  I say relatively simple, because you really will have to learn the overall API structure first before you can do much with it.

On the LotusScript side, you can do similar things, but the XML interface won't be nearly as easy, and there will be a significant performance difference in many cases.  Same goes for Java, minus the XML issue.
LVL 19

Expert Comment

ID: 11940872
Qwaletee, I am surprised you didnt recommend DXL strongly ;)
LVL 31

Assisted Solution

qwaletee earned 1000 total points
ID: 11946574
First f all, I have many tools, so not every problem is a nail.  Second, this mighthave to work in older environments.  Third, DXL strikes me as overkill here, but I could be wrong.  So, if DXL works well, they use pure R6, then get out that hammer, cause we're nailing DXL's in.  Otherwise...
LVL 19

Expert Comment

ID: 11954685
I was hoping to hear it would be easier to do with DXL. That's all. I hope you didn't misread.
LVL 63

Expert Comment

ID: 13032970
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    Split: RanjeetRain {http:#11909342} & qwaletee {http:#11946574}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month11 days, 12 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question