Genii Weblog

So, geeks, can you guess the technique?

Thu 8 Jan 2009, 06:01 PM



by Ben Langhinrichs
As an aside to the hardcore geeks (you others just go back to reading PlanetLotus looking for tips about 8.5), can you guess how CoexLinks 3 manages to render iNotes mail correctly?  The non-hardcore probably don't think about it, while the semi-hardcore (say, half a blue pill) probably assume we just convert all email to MIME without realizing how that would mess with people reading their e-mail in a standard Notes client.  Only the truly hardcore will figure out that we can't just convert it to MIME when it is saved or sent without risking loss for the Notes client.  It should also be clear that no template or database designs were harmed (or even touched) in accomplishing this, or anything to do with CoexLinks for that matter.

I know of two ways to accomplish the general goal, but I only chose one.  Just curious whether it will be obvious to anyone.

Copyright © 2009 Genii Software Ltd.

What has been said:


756.1. Mika Heinonen
(01/08/2009 03:49 PM)

Well, theoretically it should be possible to convert anything to DXL and back, thus avoiding all the hassle with CD records and other buggy internals.


756.2. Ben Langhinrichs
(01/08/2009 04:31 PM)

Mika - It is easy to convert CD records to DXL, but it buys you very litle. DXL doesn't display on the web or in other mail systems, as you well know. Converting from DXL to HTML or MIME is not all that much easier than converting from CD records to HTML or MIME, and conversion back and forth from CD records to DXL to CD records again is buggier than most other "buggy internals".


756.3. Richard Schwartz
(01/08/2009 10:35 PM)

Can we play 20 questions? ;-)

Is there a DSAPI hook involved?


756.4. Ben Langhinrichs
(01/09/2009 04:37 AM)

Rich - I don't think it would take you 20 questions, but the first is wrong. Still, you are on the right general track. The clue, and it is a big one, is to look at what other products Genii offers besides CoexLinks.


756.5. Mika Heinonen
(01/09/2009 11:06 AM)

Ah, then I know the answer: You're using some Midas RichText API calls from within CoexLinks 3!


756.6. Ben Langhinrichs
(01/09/2009 11:50 AM)

Mika - Close, but not quite. There are actually no scripts, agents or design changes required. I actually use some code borrowed from CoexEdit, so an extension manager using CD to MIME conversion on the backend. To get a feel for what that looks like in iNotes 8.5, see my subsequent post.


756.7. Richard Schwartz
(01/09/2009 01:40 PM)

An EM hook was going to be my second question, but I thought perhaps you might use DSAPI to try to minimize impact to just hooking http events, though I didn't really think the hooks would be at the right stage in the processing for you.


756.8. BenLanghinrichs
(01/09/2009 01:52 PM)

Rich - Since extension managers load by process, you can choose to only watch events in the http process, which solves the matter more elegantly.


756.9. Richard Schwartz
(01/12/2009 04:51 PM)

Ben - I'm aware of that, though I did forget. Possibly on purpose given that last I looked one does have to indulge in some yucky platform-dependent code in order to determine which process you are in before registering your EM callbacks. ;-)


756.10. Ben Langhinrichs
(01/12/2009 05:09 PM)

@Rich - It is a horrible, yucky task (the figuring it all out by platform), but only needs to be done once, and then can be copied from new product to new product.