<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
 xmlns:admin="http://webns.net/mvcb/"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:content="http://purl.org/rss/1.0/modules/content/"
 xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title>In Theory...</title>
<description>Bob Balaban&#8217;s Blog</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/</link>
<language>en-us</language>
<lastBuildDate>Mon, 2 Jan 2012 04:56:33 -0400</lastBuildDate>
<item>
<title>&quot;Programming Domino With Java&quot; - Final Flush</title>
<pubDate>Mon, 2 Jan 2012 04:56:33 -0400</pubDate>
<description>
<![CDATA[ 
Happy New Year, Geeks! Here's the 7th (and final) installment of the book. Thanks again for all the positive feedback. The first installment can be found here The 2nd installment is here The 3rd ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-final-flush</link>
<category>Lotus</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-final-flush?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-final-flush</guid>
<content:encoded><![CDATA[ Happy New Year, Geeks! <br /> <br /> Here's the 7th (and final) installment of the book. Thanks again for all the positive feedback. <br /> The first installment can be found <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-first-installment"><span style="text-decoration:underline">here</span></a><a href=Notes://barkley/862572AF00068846/1836F7BFA43B56B38025716900586046/28CB28F0191647E78525793C0082F1BB></a> <br /> The 2nd installment is <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-chunk-the-second"><span style="text-decoration:underline">here</span></a> <br /> The 3rd is <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-third-gulp"><span style="text-decoration:underline">here</span></a> <br /> The 4th is <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-fourth-hit"><span style="text-decoration:underline">here</span></a> <br /> The 5th is <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-fifth-slug"><span style="text-decoration:underline">here</span></a> <br />and the 6th is <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-sixth-sip">here</a><br /> <br /> All of the book content (as is all of the content on this blog) is Copyright 1998 and 2011 by Looseleaf Software, Inc. You may not reproduce or distribute the book's content without permission from me. <strong><span style="text-decoration:underline"><br /> <br /> Some Caveats and explanations:</span></strong> <br /> - This book is now 12 years old. There are lots of things in it that are amusingly dated, even laughable. One example: the absurd emphasis on Java Applets. They died an unlamented death due to bloating a long time ago, but at the time I wrote the book, they were a hot technology. <br /> - The formatting is not exactly as it first appeared in the book, and some of it is downright awkward. Sorry! The publisher converted the original files to Word for me, perhaps they forgot to select the "high-def" option. <br /> - The Java package described in the book (lotus.notes) was superseded by lotus.domino in R5 (1999? I think). The methods are all mostly the same. Of course, IBM have added lots more classes and methods than existed when the book was written. Also, the "recycle()" method had not yet been invented in Domino 4.6, so the memory issues that call addresses are not really covered. <br /> - The figures (screen shots and so on) referred to did not make it into any file format I can deal with, so I had to leave them out. Sorry! The code samples are mostly there, and I'll also post all of the files that were on the CD that came with the original book. <strong><span style="text-decoration:underline"><br /> <br /> This Installment</span></strong>  <br />This hunk is a zip file containing the contents of the CD that was included with the original book. <br />Appendix F (previously posted) contains a description of the contents of the CD: <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Appendix F.pdf/$file/Appendix F.pdf" title="Appendix F.pdf"Appendix F.pdf/>Appendix F.pdf</a> <br /> <br />I have not gone back and checked that the samples still work. If you find that any do not, please let me know. <br />The JavaDoc, of course, corresponds to the Notes v4.0 release. "NOI" has come a long way since then, and the whole lotus.notes package was pretty much obsoleted in Notes v5, but they may still be distributing it. <br /> <br /><a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/CD.zip/$file/CD.zip" title="CD.zip"CD.zip/>CD.zip</a> <br /> <br />Enjoy! Geek ya later  <p>(Need expert application development architecture/coding help? &nbsp;Want me to help you invent directory services based on RDBMS? Need some Cloud-fu or some web services? Contact me at: bbalaban, gmail.com) <br /> Follow me on Twitter @LooseleafLLC<br /> This article ©Copyright 2010 by Looseleaf Software LLC, all rights reserved. You may link to this page, but may not copy without prior approval.   ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/programming-domino-with-java-final-flush</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-final-flush?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>&quot;Programming Domino With Java&quot; - Sixth Sip</title>
<pubDate>Tue, 6 Dec 2011 12:17:56 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! Here's the 6th installment of the book. Thanks again for all the positive feedback. The first installment can be found here The 2nd installment is here The 3rd is here The 4th ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-sixth-sip</link>
<category>Lotus</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-sixth-sip?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-sixth-sip</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <br /> Here's the 6th installment of the book. Thanks again for all the positive feedback. <br /> The first installment can be found <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-first-installment"><span style="text-decoration:underline">here</span></a><a href=Notes://barkley/862572AF00068846/1836F7BFA43B56B38025716900586046/28CB28F0191647E78525793C0082F1BB></a> <br /> The 2nd installment is <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-chunk-the-second"><span style="text-decoration:underline">here</span></a> <br /> The 3rd is <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-third-gulp"><span style="text-decoration:underline">here</span></a> <br /> The 4th is <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-fourth-hit"><span style="text-decoration:underline">here</span></a> <br /> The 5th is <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-fifth-slug"><span style="text-decoration:underline">here</span></a><br /> <br /> All of the book content (as is all of the content on this blog) is Copyright 1998 and 2011 by Looseleaf Software, Inc. You may not reproduce or distribute the book's content without permission from me. <strong><span style="text-decoration:underline"><br /> <br /> Some Caveats and explanations:</span></strong> <br /> - This book is now 12 years old. There are lots of things in it that are amusingly dated, even laughable. One example: the absurd emphasis on Java Applets. They died an unlamented death due to bloating a long time ago, but at the time I wrote the book, they were a hot technology. <br /> - The formatting is not exactly as it first appeared in the book, and some of it is downright awkward. Sorry! The publisher converted the original files to Word for me, perhaps they forgot to select the "high-def" option. <br /> - The Java package described in the book (lotus.notes) was superseded by lotus.domino in R5 (1999? I think). The methods are all mostly the same. Of course, IBM have added lots more classes and methods than existed when the book was written. Also, the "recycle()" method had not yet been invented in Domino 4.6, so the memory issues that call addresses are not really covered. <br /> - The figures (screen shots and so on) referred to did not make it into any file format I can deal with, so I had to leave them out. Sorry! The code samples are mostly there, and I'll also post all of the files that were on the CD that came with the original book. <strong><span style="text-decoration:underline"><br /> <br /> This Installment</span></strong> <br /> <br /> We're done with the main body of text (Chapters 1-14), but there's still more good stuff to post: <br /> <br /> Appendix A "Useful Links and References" <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Appendix A.pdf/$file/Appendix A.pdf" title="Appendix A.pdf"Appendix A.pdf/>Appendix A.pdf</a> <br /> <br /> Appendix B "Notes Object Interface Class Diagram" (yeah, a little out of date now...) <br /> <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Appendix B.pdf/$file/Appendix B.pdf" title="Appendix B.pdf"Appendix B.pdf/>Appendix B.pdf</a> <br /> <br /> Appendix C "Domino Setup For Writing Java Programs" <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Appendix C.pdf/$file/Appendix C.pdf" title="Appendix C.pdf"Appendix C.pdf/>Appendix C.pdf</a> <br /> <br /> Appendix D "Notes Object Interface Exceptions" <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Appendix D.pdf/$file/Appendix D.pdf" title="Appendix D.pdf"Appendix D.pdf/>Appendix D.pdf</a> <br /> <br /> Appendix E "Creating LSXs" (Note: This was WAY before Lotus released the "LSX Toolkit", known far and wide in song and legend. You can probably still get the toolkit at <a href=http://www.notes.net>this site</a>, though I haven't checked lately. It hasn't had a new release in years, and is known to be broken for recent versions of Microsoft Visual Studio) <br /> <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Appendix E.pdf/$file/Appendix E.pdf" title="Appendix E.pdf"Appendix E.pdf/>Appendix E.pdf</a> <br /> <br /> Appendix F "What's On the CD-ROM" <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Appendix F.pdf/$file/Appendix F.pdf" title="Appendix F.pdf"Appendix F.pdf/>Appendix F.pdf</a> <br /> <br /> Next installment, I'll post the samples and javadoc from the CD <br /> <br /> Enjoy! Geek ya later  <p>(Need expert application development architecture/coding help? &nbsp;Want me to help you invent directory services based on RDBMS? Need some Cloud-fu or some web services? Contact me at: bbalaban, gmail.com) <br /> Follow me on Twitter @LooseleafLLC<br /> This article ©Copyright 2010 by Looseleaf Software LLC, all rights reserved. You may link to this page, but may not copy without prior approval.   ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/programming-domino-with-java-sixth-sip</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-sixth-sip?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>&quot;Programming Domino With Java&quot; - Fifth Slug</title>
<pubDate>Mon, 28 Nov 2011 18:22:21 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! Here's the 5th installment of the book. Thanks again for all the positive feedback. The first installment can be found here The 2nd installment is here The 3rd is here The 4th i ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-fifth-slug</link>
<category>Lotus</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-fifth-slug?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-fifth-slug</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <br /> Here's the 5th installment of the book. Thanks again for all the positive feedback. <br /> The first installment can be found <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-first-installment"><span style="text-decoration:underline">here</span></a><a href=Notes://barkley/862572AF00068846/1836F7BFA43B56B38025716900586046/28CB28F0191647E78525793C0082F1BB></a> <br /> The 2nd installment is <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-chunk-the-second"><span style="text-decoration:underline">here</span></a> <br /> The 3rd is <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-third-gulp"><span style="text-decoration:underline">here</span></a> <br />The 4th is <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-fourth-hit">here</a> <br /> <br /> All of the book content (as is all of the content on this blog) is Copyright 1998 and 2011 by Looseleaf Software, Inc. You may not reproduce or distribute the book's content without permission from me. <strong><span style="text-decoration:underline"><br /> <br /> Some Caveats and explanations:</span></strong> <br /> - This book is now 12 years old. There are lots of things in it that are amusingly dated, even laughable. One example: the absurd emphasis on Java Applets. They died an unlamented death due to bloating a long time ago, but at the time I wrote the book, they were a hot technology. <br /> - The formatting is not exactly as it first appeared in the book, and some of it is downright awkward. Sorry! The publisher converted the original files to Word for me, perhaps they forgot to select the "high-def" option. <br /> - The Java package described in the book (lotus.notes) was superseded by lotus.domino in R5 (1999? I think). The methods are all mostly the same. Of course, IBM have added lots more classes and methods than existed when the book was written. Also, the "recycle()" method had not yet been invented in Domino 4.6, so the memory issues that call addresses are not really covered. <br /> - The figures (screen shots and so on) referred to did not make it into any file format I can deal with, so I had to leave them out. Sorry! The code samples are mostly there, and I'll also post all of the files that were on the CD that came with the original book. <strong><span style="text-decoration:underline"><br /> <br /> This Installment</span></strong> <br /> <br /> This time I'm posting 3 more chapters: <br /> <br /> Chapter 12: "NOI and Java Beans" (Are they really good for your heart?) <br /><a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Chapter 12.pdf/$file/Chapter 12.pdf" title="Chapter 12.pdf"Chapter 12.pdf/>Chapter 12.pdf</a> <br /> <br />Chapter 13: "JDBC and NOI" <br /><a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Chapter 13.pdf/$file/Chapter 13.pdf" title="Chapter 13.pdf"Chapter 13.pdf/>Chapter 13.pdf</a> <br /> <br />Chapter 14: A Look Ahead to Domino 5 (This ought to provide some laughs, eh?) <br /><a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Chapter 14.pdf/$file/Chapter 14.pdf" title="Chapter 14.pdf"Chapter 14.pdf/>Chapter 14.pdf</a> <br /> <br /><strong>Note: </strong>Chapter 14 is the last real chapter, but there's still plenty more to come. To wit: <br />- Appendices A through F <br />- Samples, including some javadoc, since I happen to have it anyway<br /> <strong><span style="text-decoration:underline"><br /> Release Notes</span></strong> <br /> <br /> Chapter 12: No bugs! <br />Chapter 13: No bugs! <br />Chapter 14: Also bug-free! <br /> <br />Enjoy! More soon. Geek ya later   ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/programming-domino-with-java-fifth-slug</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-fifth-slug?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>&quot;Programming Domino With Java&quot; - Fourth Hit</title>
<pubDate>Sun, 20 Nov 2011 14:30:47 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! Here's the 4th installment of the book. Thanks again for all the positive feedback. The first installment can be found here The 2nd installment is here The 3rd is here All of th ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-fourth-hit</link>
<category>Lotus</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-fourth-hit?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-fourth-hit</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <br /> Here's the 4th installment of the book. Thanks again for all the positive feedback. <br /> The first installment can be found <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-first-installment"><span style="text-decoration:underline">here</span></a><a href=Notes://barkley/862572AF00068846/1836F7BFA43B56B38025716900586046/28CB28F0191647E78525793C0082F1BB></a> <br /> The 2nd installment is <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-chunk-the-second"><span style="text-decoration:underline">here</span></a> <br />The 3rd is <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-third-gulp">here</a><br /> <br /> All of the book content (as is all of the content on this blog) is Copyright 1998 and 2011 by Looseleaf Software, Inc. You may not reproduce or distribute the book's content without permission from me. <strong><span style="text-decoration:underline"><br /> <br /> Some Caveats and explanations:</span></strong> <br />  - This book is now 12 years old. There are lots of things in it that are amusingly dated, even laughable. One example: the absurd emphasis on Java Applets. They died an unlamented death due to bloating a long time ago, but at the time I wrote the book, they were a hot technology. <br />  - The formatting is not exactly as it first appeared in the book, and some of it is downright awkward. Sorry! The publisher converted the original files to Word for me, perhaps they forgot to select the "high-def" option. <br />  - The Java package described in the book (lotus.notes) was superseded by lotus.domino in R5 (1999? I think). The methods are all mostly the same. Of course, IBM have added lots more classes and methods than existed when the book was written. Also, the "recycle()" method had not yet been invented in Domino 4.6, so the memory issues that call addresses are not really covered. <br />  - The figures (screen shots and so on) referred to did not make it into any file format I can deal with, so I had to leave them out. Sorry! The code samples are mostly there, and I'll also post all of the files that were on the CD that came with the original book. <strong><span style="text-decoration:underline"><br /> <br /> This Installment</span></strong>  <br /> <br />This time I'm posting 3 more chapters: <br /> <br />Chapter 9 (Debugging NOI Agents) - <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Chapter 09.pdf/$file/Chapter 09.pdf" title="Chapter 09.pdf"Chapter 09.pdf/>Chapter 09.pdf</a> <br />NOTE: When I wrote the book, Eclipse was not yet invented (or at least, widely known). I hadn't yet come up with the now-common "2-Headed Beast" technique of debugging Java agents (Why hasn't IBM created a way to debug agents inside Designer in the 14 years that Java agents have been loose in the world? I don't know, but it's sad). See <a href="http://bobzblog.com/tuxedoguy.nsf/dx/the-2-headed-beast-debugging-domino-java-agents-with-eclipse">here </a>for a description of "2-Headed Beast". <br /> <br />Chapter 10 (Sharing Objects Across Threads) - <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Chapter 10.pdf/$file/Chapter 10.pdf" title="Chapter 10.pdf"Chapter 10.pdf/>Chapter 10.pdf</a> <br /> <br />Chapter 11 (Upgrading Servlets to Agents) - <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Chapter 11.pdf/$file/Chapter 11.pdf" title="Chapter 11.pdf"Chapter 11.pdf/>Chapter 11.pdf</a> <br /> <br /><strong><span style="text-decoration:underline">Release Notes</span></strong> <br />  <br />Chapter 9: No bugs! <br /> <br />Chapter 10: No bugs! <br /> <br />Chapter 11: No bugs! <br /> <br />Enjoy! More soon. Geek ya later   ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/programming-domino-with-java-fourth-hit</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-fourth-hit?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>&quot;Programming Domino With Java&quot; - Third Gulp</title>
<pubDate>Mon, 14 Nov 2011 19:28:59 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! Here's the third installment of the book. Thanks again for all the positive feedback. The first installment can be found here The 2nd installment is here All of the book content ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-third-gulp</link>
<category>Lotus</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-third-gulp?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-third-gulp</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <br /> Here's the third installment of the book. Thanks again for all the positive feedback. <br /> The first installment can be found <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-first-installment"><span style="text-decoration:underline">here</span></a><a href=Notes://barkley/862572AF00068846/1836F7BFA43B56B38025716900586046/28CB28F0191647E78525793C0082F1BB></a> <br /> The 2nd installment is <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-chunk-the-second"><span style="text-decoration:underline">here</span></a><br /> <br /> All of the book content (as is all of the content on this blog) is Copyright 1998 and 2011 by Looseleaf Software, Inc. You may not reproduce or distribute the book's content without permission from me. <strong><span style="text-decoration:underline"><br /> <br /> Some Caveats and explanations:</span></strong> <br />  &nbsp;- This book is now 12 years old. There are lots of things in it that are amusingly dated, even laughable. One example: the absurd emphasis on Java Applets. They died an unlamented death due to bloating a long time ago, but at the time I wrote the book, they were a hot technology. <br />  &nbsp;- The formatting is not exactly as it first appeared in the book, and some of it is downright awkward. Sorry! The publisher converted the original files to Word for me, perhaps they forgot to select the "high-def" option. <br />  &nbsp;- The Java package described in the book (lotus.notes) was superseded by lotus.domino in R5 (1999? I think). The methods are all mostly the same. Of course, IBM have added lots more classes and methods than existed when the book was written. Also, the "recycle()" method had not yet been invented in Domino 4.6, so the memory issues that call addresses are not really covered. <br />  &nbsp;- The figures (screen shots and so on) referred to did not make it into any file format I can deal with, so I had to leave them out. Sorry! The code samples are mostly there, and I'll also post all of the files that were on the CD that came with the original book. <strong><span style="text-decoration:underline"><br /> <br /> This Installment</span></strong> <br /> <br /> I'm including 3 chapters in this post: <br /> <br /> Chapter 6 (NOI Part 5): <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Chapter 06.pdf/$file/Chapter 06.pdf" title="Chapter 06.pdf"Chapter 06.pdf/>Chapter 06.pdf</a> <br /> <br /> Chapter 7 (Writing NOI Applications): <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Chapter 07.pdf/$file/Chapter 07.pdf" title="Chapter 07.pdf"Chapter 07.pdf/>Chapter 07.pdf</a> <br /> <br /> Chapter 8 (Writing NOI Agents): <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Chapter 08.pdf/$file/Chapter 08.pdf" title="Chapter 08.pdf"Chapter 08.pdf/>Chapter 08.pdf</a> <br /> <strong><span style="text-decoration:underline"><br /> Release Notes</span></strong> <br /> <br /> Chapter 6, Page 195. Description of Registration.addUserProfile() mistakenly refers to Database.createProfileDocument(). Should be setProfileDocument() <br /> <br /> Chapter 7, no bugs! <br /> <br /> Chapter 8, Page 265. Listing 8.3 ("Waiting for Child Threads, Ex83Multi.java). Sigh. This code has a major race condition in it that I didn't catch until after the book was out. Basically, the problem is that all of the threads could finish before you get to the logic that tests to see if any of them are alive. There's a better and much more robust pattern for doing this stuff that I could write a separate article about, if there's interest. <br /> <br /> Enjoy! More soon. Geek ya later   ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/programming-domino-with-java-third-gulp</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-third-gulp?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>&quot;Programming Domino With Java&quot;: Chunk the Second</title>
<pubDate>Wed, 9 Nov 2011 17:28:19 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! Here's the second installment of the book. Thanks again for all the positive feedback. The first installment can be found here All of the book content (as is all of the content o ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-chunk-the-second</link>
<category>Lotus</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-chunk-the-second?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-chunk-the-second</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <br /> Here's the second installment of the book. Thanks again for all the positive feedback. <br /> The first installment can be found <a href="http://bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-first-installment">here</a><a href=Notes://barkley/862572AF00068846/1836F7BFA43B56B38025716900586046/28CB28F0191647E78525793C0082F1BB></a><br /> <br /> All of the book content (as is all of the content on this blog) is Copyright 1998 and 2011 by Looseleaf Software, Inc. You may not reproduce or distribute the book's content without permission from me. <strong><span style="text-decoration:underline"><br /> <br /> Some Caveats and explanations:</span></strong> <br />  &nbsp; &nbsp;- This book is now 12 years old. There are lots of things in it that are amusingly dated, even laughable. One example: the absurd emphasis on Java Applets. They died an unlamented death due to bloating a long time ago, but at the time I wrote the book, they were a hot technology. <br />  &nbsp; &nbsp;- The formatting is not exactly as it first appeared in the book, and some of it is downright awkward. Sorry! The publisher converted the original files to Word for me, perhaps they forgot to select the "high-def" option. <br />  &nbsp; &nbsp;- The Java package described in the book (lotus.notes) was superseded by lotus.domino in R5 (1999? I think). The methods are all mostly the same. Of course, IBM have added lots more classes and methods than existed when the book was written. Also, the "recycle()" method had not yet been invented in Domino 4.6, so the memory issues that call addresses are not really covered. <br />  &nbsp; &nbsp;- The figures (screen shots and so on) referred to did not make it into any file format I can deal with, so I had to leave them out. Sorry! The code samples are mostly there, and I'll also post all of the files that were on the CD that came with the original book. <strong><span style="text-decoration:underline"><br /> <br /> This Installment</span></strong> <br /> <br /> I'm including 3 chapters in this post: <br /> <br /> Chapter 3 (NOI Part 2) -- was supposed to be in the previous posting, but ooops. Sorry: <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Chapter 03.pdf/$file/Chapter 03.pdf" title="Chapter 03.pdf"Chapter 03.pdf/>Chapter 03.pdf</a> <br /> <br /> Chapter 4 (NOI Part 3): <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Chapter 04.pdf/$file/Chapter 04.pdf" title="Chapter 04.pdf"Chapter 04.pdf/>Chapter 04.pdf</a> <br /> <br /> Chapter 5 ( Yes! You guessed it...NOI Part 4): <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Chapter 05.pdf/$file/Chapter 05.pdf" title="Chapter 05.pdf"Chapter 05.pdf/>Chapter 05.pdf</a> <br /> <br /> Don't worry, the chapter titles get a <em>little </em>more inventive starting with Chapter 7. <br /> <strong><span style="text-decoration:underline"><br /> Release Notes</span></strong> <br /> <br /> Chapter 3: <br /> Page 98, All of the "Item.appendXXX" method names should have capitalized "Value" <br /> <br /> Page 113, discussion of "auto-update", it describes how you can use getNextDocument(), etc. "That'll work okay". It won't work ok, it'll potentially cause an infinite loop. Ooops. <br /> <br /> Page 117, Listing 3.6, the "for" loop starts an index at 0, should be 1. Same for the loop on Page 118 as well. <br /> <br /> Page 119, mentions a property on View named "IsHierarchical". There is no such property (or at least, there wasn't in 4.6) <br /> <br /> Chapter 4: <br /> No bugs! <br /> <br /> Chapter 5: <br /> No bugs! <br /> <br /> Enjoy! More soon. Geek ya later   ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/programming-domino-with-java-chunk-the-second</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-chunk-the-second?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>&quot;Programming Domino With Java&quot; - First Installment</title>
<pubDate>Wed, 2 Nov 2011 19:50:15 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! Here's the first installment of the book. Thanks again for all the positive feedback. All of the book content (as is all of the content on this blog) is Copyright 1998 and 2011 by ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-first-installment</link>
<category>Lotus</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-first-installment?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-first-installment</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <br />Here's the first installment of the book. Thanks again for all the positive feedback. <br /> <br />All of the book content (as is all of the content on this blog) is Copyright 1998 and 2011 by Looseleaf Software, Inc. You may not reproduce or distribute the book's content without permission from me. <br /> <br /><strong><span style="text-decoration:underline">Some Caveats and explanations:</span></strong> <br />&nbsp; &nbsp; &nbsp;- This book is now 12 years old. There are lots of things in it that are amusingly dated, even laughable. One example: the absurd emphasis on Java Applets. They died an unlamented death due to bloating a long time ago, but at the time I wrote the book, they were a hot technology. <br />&nbsp; &nbsp; &nbsp;- The formatting is not exactly as it first appeared in the book, and some of it is downright awkward. Sorry! The publisher converted the original files to Word for me, perhaps they forgot to select the "high-def" option. <br />&nbsp; &nbsp; &nbsp;- The Java package described in the book (lotus.notes) was superseded by lotus.domino in R5 (1999? I think). The methods are all mostly the same. Of course, IBM have added lots more classes and methods than existed when the book was written. Also, the "recycle()" method had not yet been invented in Domino 4.6, so the memory issues that call addresses are not really covered. <br />&nbsp; &nbsp; &nbsp;- The figures (screen shots and so on) referred to did not make it into any file format I can deal with, so I had to leave them out. Sorry! The code samples are mostly there, and I'll also post all of the files that were on the CD that came with the original book. <br /> <br /><strong><span style="text-decoration:underline">This Installment</span></strong> <br />I'm including the Dedication/Preface, and Chapters 1 ("Programmability Overview"), 2 ("NOI Part 1") and 3 ("NOI Part 2"). "NOI" is "Notes Object Interface", what we called the "back-end classes" in the day. <br /> <br />Preface/etc.: <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/ded_ack_pref.pdf/$file/ded_ack_pref.pdf" title="ded_ack_pref.pdf"ded_ack_pref.pdf/>ded_ack_pref.pdf</a> <br /> <br />Chapter 1: <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Chapter 01.pdf/$file/Chapter 01.pdf" title="Chapter 01.pdf"Chapter 01.pdf/>Chapter 01.pdf</a> <br /> <br />Chapter 2: <a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/Chapter 02.pdf/$file/Chapter 02.pdf" title="Chapter 02.pdf"Chapter 02.pdf/>Chapter 02.pdf</a> <br /> <br /><strong><span style="text-decoration:underline">Release Notes</span></strong> <br /> <br />Chapter 2: <br />Page 15, "Refer to Appendix A for a diagram...", should be "Appendix B" <br /> <br />Page 33, Listing 2.2, Missing closing curly-brace "}" right before the "catch" statement <br /> <br />Page 58, description of Database.createCopy() method, should mention that the method does not copy data, only the design of the db <br /> <br />Chapter 3: <br />Page 98, All of the "Item.appendXXX" method names should have capitalized "Value" <br /> <br />Page 113, discussion of "auto-update", it describes how you can use getNextDocument(), etc. "That'll work okay". It won't work ok, it'll potentially cause an infinite loop. Ooops. <br /> <br />Page 117, Listing 3.6, the "for" loop starts an index at 0, should be 1. Same for the loop on Page 118 as well. <br /> <br />Page 119, mentions a property on View named "IsHierarchical". There is no such property (or at least, there wasn't in 4.6) <br /> <br />Enjoy! More soon. <br />  ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/programming-domino-with-java-first-installment</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/programming-domino-with-java-first-installment?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>Anyone interested in me posting my 1998 book?</title>
<pubDate>Sat, 29 Oct 2011 10:34:15 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! In 1998 I published a book titled "Programming Domino 4.6 With Java" (see the Amazon page here). It did fairly well, but of course it's a bit dated now, and it went out of print in ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/anyone-interested-in-me-posting-my-1998-book</link>
<category>IBM</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/anyone-interested-in-me-posting-my-1998-book?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/anyone-interested-in-me-posting-my-1998-book</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <br />In 1998 I published a book titled "Programming Domino 4.6 With Java" (see the Amazon page <a href="http://www.amazon.com/Programming-Domino-4-6-Java-Balaban/dp/1558515836/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1319899114&amp;sr=1-1">here</a>). It did fairly well, but of course it's a bit dated now, and it went out of print in 2000. <br /> <br />While you can apparently get a used copy for $0.59 (plus shipping), I was thinking I might post the PDF version of the whole thing here on my blog (the rights to the book reverted to me when the publisher declared it out of print, so it's legal). There are bugs in there, which I suppose I could publish "release notes" for, too. I think it's still the best detailed description of the Java "back-end classes" for N/D, as that library existed in October, 1997. <br /> <br />Any interest? If you'd like to see it, post a comment here. If you wouldn't like to see it, post a comment here. <br /> <br />Geek ya later!  ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/anyone-interested-in-me-posting-my-1998-book</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/anyone-interested-in-me-posting-my-1998-book?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>Check out CouchConf in New York, October 24</title>
<pubDate>Mon, 10 Oct 2011 18:59:10 -0400</pubDate>
<description>
<![CDATA[ 
CouchDb has gained notice in recent years as an innovator in the "NoSQL" data management space. CouchDb was invented by Damien Katz (http://damienkatz.net/), a former colleague of mine from the old da ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/check-out-couchconf-in-new-york-october-24</link>
<category>CouchDb</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/check-out-couchconf-in-new-york-october-24?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/check-out-couchconf-in-new-york-october-24</guid>
<content:encoded><![CDATA[ CouchDb has gained notice in recent years as an innovator in the "NoSQL" data management space. CouchDb was invented by Damien Katz (<a href=http://damienkatz.net/>http://damienkatz.net/), a former colleague of mine from the old days at Iris Associates. Couch is now open-sourced (via Apache, I think) and Damien's new company, CouchBase (<a href=http://www.couchbase.com/>http://www.couchbase.com/), helps organizations use it effectively to solve all sorts of business (and other) problems.  <br />If you're in the New York City area on October 24th, check it out.</a></a>  ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/check-out-couchconf-in-new-york-october-24</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/check-out-couchconf-in-new-york-october-24?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>Geek-O-Terica 16: Easy conversion of Notes documents to MIME format (Part 2)</title>
<pubDate>Mon, 4 Apr 2011 06:45:00 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! Recently I posted some sample code showing you how to convert Notes documents to MIME format on disk, using the Notes Java APIs. Unfortunately, if you need to do this kind of conve ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-16-easy-conversion-of-notes-documents-to-mime-format-part-2</link>
<category>Lotus Notes</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-16-easy-conversion-of-notes-documents-to-mime-format-part-2?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-16-easy-conversion-of-notes-documents-to-mime-format-part-2</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <br /> Recently I posted some <a href="http://bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-15-easy-conversion-of-notes-documents-to-mime-format-part-1"><span style="text-decoration:underline">sample code</span></a> showing you how to convert Notes documents to MIME format on disk, using the Notes Java APIs. Unfortunately, if you need to do this kind of conversion using some other platform (such as .net), the job is a bit harder. A key method on the Document class (doc.convertToMIME()) is missing in the COM classes for Notes. Why? No idea, someone should ask Lotus about that. Probably has something to do with fear (but that's just speculation on my part). <br /> <br /> No worries, though. the convertToMIME() method uses public C API calls to do its work, so we can do the same from a .net program. For starters, see my blog post on calling C API from C# (c-sharp) programs, <a href="http://bobzblog.com/tuxedoguy.nsf/dx/calling-notes-capi-from-cvisual-studio"><span style="text-decoration:underline">here</span></a>. That post talks about the basic techniques and syntax for setting up any kind of call-out from C# to C, so I won't repeat that here (the idea is just about the same if you're using vb). Here's a c-sharp file that provides a bunch of wrappers for Notes C API calls, bundled together in a class called NotesEntriess. &nbsp;<a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/NotesEntries.cs/$file/NotesEntries.cs" title="NotesEntries.cs"NotesEntries.cs/>NotesEntries.cs</a><br /> <br /> The tedious bit about doing MIME conversion for a .net program is that there are several C calls you have to make for the 1 Java/LotusScript call. The tricky part is that, to do it without having to do everything at the C API level, you want to save typing by leveraging the COM classes, and only use the NotesEntries wrappers when you have to. The problem is that the COM classes do not expose the in-memory "handle" for a NotesDocument instance -- you can only get the Note ID -- while the C API calls require the handle for most things. <br /> <br />So you'll see in the sample program "BlogMIME.cs" (<a href="http://www.bobzblog.com/tuxedoguy.nsf/dx/BlogMIME.cs/$file/BlogMIME.cs" title="BlogMIME.cs"BlogMIME.cs/>BlogMIME.cs</a>) that the first part of the work (converting a document to MIME format in memory) is done with C API wrappers (after using "regular" COM classes to access the NSF and find the document in the first place, of course). I could have continued to use the C API to iterate over MIMEParts in the converted document, force Base64 encoding, and write out the results, but it's really much easier to do all that using COM classes. Unfortunately, there's no way to take the NOTEHANDLE that I get using the C API and use it to get a NotesDocument COM object. I had to save() the document back to disk, get the Note ID, and use that to "get" the document again via COM. There's a slight performance hit for the extra save, but it was worth it in this case. <br /> <br />You'll notice that the c# code that actually writes out the converted MIME document to disk is almost a line-for-line translation of the Java code I posted earlier. That's possible because the Notes COM classes are almost identical (on purpose) to the Java and LotusScript interfaces. The only reason we have to get tricky with using C API wrappers is that the Document.convertToMIME() function is missing in the COM interface. <br /> <br />There are some other nice (reusable) features of the c# code, such as mapping various C constants to c# syntax, and so on. So, take the code, use it as a source of techniques for doing this kind of integration. &nbsp;Enjoy! <br /> <br />Geek ya later. <p>(Need expert application development architecture/coding help? &nbsp;Want me to help you invent directory services based on RDBMS? Need some Cloud-fu or some web services? Contact me at: bbalaban, gmail.com) <br /> Follow me on Twitter @LooseleafLLC<br /> This article ©Copyright 2010 by Looseleaf Software LLC, all rights reserved. You may link to this page, but may not copy without prior approval.   ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/geek-o-terica-16-easy-conversion-of-notes-documents-to-mime-format-part-2</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-16-easy-conversion-of-notes-documents-to-mime-format-part-2?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>Geek-O-Terica 15: Easy conversion of Notes documents to MIME format (Part 1)</title>
<pubDate>Mon, 21 Mar 2011 06:00:00 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! MIME is a data format that has become central to transmission of email over the Internet. The nice thing about it is that everyone uses it for mail interchange, and that it's stand ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-15-easy-conversion-of-notes-documents-to-mime-format-part-1</link>
<category>Lotus Notes</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-15-easy-conversion-of-notes-documents-to-mime-format-part-1?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-15-easy-conversion-of-notes-documents-to-mime-format-part-1</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <span style="text-decoration:underline"><br /> </span><a href=http://en.wikipedia.org/wiki/MIME><span style="text-decoration:underline">MIME</span></a> is a data format that has become central to transmission of email over the Internet. The nice thing about it is that everyone uses it for mail interchange, and that it's standard. The Domino server converts incoming MIME-formatted messages into Notes documents, and outgoing Notes email documents into MIME formats. As of (I think) Notes v6, you can specify that you want incoming MIME messages to remain in their native format within the NSF database. In these cases, the Notes client will automatically convert any document that resides in MIME format to "regular" Notes rich text document format when you open it in the client UI.  <br /> <br />What does MIME format look like? It can get complicated, but the easiest way to think of it is as a sectioned box, with each compartment within the box holding data in a specified format. So, plain text is just a plain-text section. "Rich text" is usually represented as HTML, with embedded "pointers" to other sections containing embedded objects, such as images or attachments. Other data, such as file attachments, reside in their own sections, with their own "headers" specifying size, encoding (e.g., base-64) and format (e.g., JPEG or GIF). The different sections in the MIME file are separated by "boundaries", essentially a unique string. There's much more to it, of course, but these are the basics.<br /> <br /> What if you want to write script (LotusScript, Java, other) to programmatically convert Notes documents to MIME format? If you're using a recent (v8.5x) version of Notes or Domino, then most of the work is done for you with new methods in the back-end classes. This functionality is, of course, based on entry points in the Notes C API. If you're not using LotusScript or Java, you can accomplish MIME translation with &nbsp;a C or C++ program using these entry points, or, even easier, use the COM classses. I'll discuss how to do MIME conversion using the C and COM APIs in Part Deux of this post. <br /> <br />Here's a basic Java program showing the essential techniques for conversion. I'm leaving out all the surrounding code for acquiring Document objects, preparing FileOutputStreams, and so on. There is only one slightly tricky thing about this program, which we'll get to after this first section. <br /> <br />Session session = NotesFactory.<em>createSession</em>(); <br />// turn off automatic <span style="text-decoration:underline">mime</span> conversion on document open <br />// if doc is already in MIME, leave it so <br />session.setConvertMIME(<strong>false</strong>); <br />Document doc = .... // get document somewhere <br />// kill any $KeepPrivate items <br />doc.removeItem("$KeepPrivate"); <br />doc.convertToMIME(lotus.domino.Document.<em>CVT_RT_TO_HTML</em>, 0); &nbsp; // note: Designer doc has wrong spelling <br />WriteOutputMIME(doc); <br /> <br />So far, so good. We suppress automatic conversion on document open, to save work (if the document is already in MIME format, we can skip the convert step and just write it out). If the "$KeepPrivate" item is present in the document, conversion will fail, so we remove that. Then all we do is call the Document.convertToMIME() method, specifying that we want rich text converted to HTML. <br /> <br />After the convert call, the document in memory is now a sequence of items containing MIME headers, and a (possibly multi-part) body representing the rich text body of the original document, plus any attachments it contains. We can (almost) proceed to iterate over these items and write them out to disk (or wherever). <br /> <br />I say "almost", though, because there's a glitch in the conversion code deep underneath the C API layer: it does not automatically convert attachment contents to a base-64 encoding (even though the API documentation says it will) - it leaves them in binary format, which cannot be written to disk. So, we have to look for those items, and force them to be converted to base-64 text. This next section of Java code for the WriteOutputMIME() functions shows how to do that. Again, I've pared the code down to the essential bits: <br /> <br />&nbsp; &nbsp; &nbsp; &nbsp; <strong>private</strong> <strong>void</strong> WriteOutputMIME(Document doc, File outDir) <br />&nbsp; &nbsp; &nbsp; &nbsp; <strong>throws</strong> Exception <br />{ <br />&nbsp; &nbsp; &nbsp; &nbsp; File outFile = <strong>null</strong>; <br />&nbsp; &nbsp; &nbsp; &nbsp; MIMEEntity mE = <strong>null</strong>; <br />&nbsp; &nbsp; &nbsp; &nbsp; MIMEEntity mChild = <strong>null</strong>; <br />&nbsp; &nbsp; &nbsp; &nbsp; String contenttype = <strong>null</strong>; <br />&nbsp; &nbsp; &nbsp; &nbsp; String headers = <strong>null</strong>; <br />&nbsp; &nbsp; &nbsp; &nbsp; String content = <strong>null</strong>; <br />&nbsp; &nbsp; &nbsp; &nbsp; String <span style="text-decoration:underline">preamble</span> = <strong>null</strong>; <br />&nbsp; &nbsp; &nbsp; &nbsp; <strong>int</strong> encoding; <br />&nbsp; &nbsp; &nbsp; &nbsp; FileWriter output = <strong>null</strong>; <br />&nbsp; &nbsp; &nbsp; &nbsp; String noteid = doc.getNoteID(); <br />&nbsp; &nbsp; &nbsp; &nbsp; <strong>int</strong> index; <br />&nbsp; &nbsp; &nbsp; &nbsp;  <br />&nbsp; &nbsp; &nbsp; &nbsp; // access document as <span style="text-decoration:underline">mime</span> parts <br />&nbsp; &nbsp; &nbsp; &nbsp; mE = doc.getMIMEEntity("Body"); <br />&nbsp; &nbsp; &nbsp; &nbsp; outFile = <strong>new</strong> File(outDir, noteid + ".eml"); <br />&nbsp; &nbsp; &nbsp; &nbsp; output = <strong>new</strong> FileWriter(outFile); <br />&nbsp; &nbsp; &nbsp; &nbsp;  <br />&nbsp; &nbsp; &nbsp; &nbsp; <strong>try</strong> { <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; contenttype = mE.getContentType(); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; headers = mE.getHeaders(); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; encoding = mE.getEncoding(); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // message envelope. If no MIME-version header, add one <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; index = headers.indexOf("MIME-Version:"); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong>if</strong> (index < 0) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.write("MIME-Version: 1.0\n"); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.write(headers); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // for <span style="text-decoration:underline">multipart</span>, usually no main-<span style="text-decoration:underline">msg</span> content <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content = mE.getContentAsText(); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong>if</strong> (content != <strong>null</strong> &amp;&amp; content.trim().length() > 0) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.write(content); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.write("\n"); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } <br /> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // For multipart, examine each child entity,  <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // re-code to base64 if necessary &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong>if</strong> (contenttype.startsWith("multipart")) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; preamble = mE.getPreamble(); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mChild = mE.getFirstChildEntity(); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong>while</strong> (mChild != <strong>null</strong>) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; headers = mChild.getHeaders(); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; encoding = mChild.getEncoding(); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // convert binary parts to base-64 <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong>if</strong> (encoding == MIMEEntity.<em>ENC_IDENTITY_BINARY</em>) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mChild.encodeContent(MIMEEntity.<em>ENC_BASE64</em>); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; headers = mChild.getHeaders(); // get again, because changed <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; preamble = mChild.getPreamble(); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content = mChild.getBoundaryStart(); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.write(content); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong>if</strong> (!content.endsWith("\n")) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.write("\n"); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.write(headers); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.write("\n"); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content = mChild.getContentAsText(); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong>if</strong> (content != <strong>null</strong> &amp;&amp; content.length() > 0) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.write(content); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.write(mChild.getBoundaryEnd()); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mChild = mChild.getNextSibling(); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } // end while <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } // end <span style="text-decoration:underline">multipart</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // end of main envelope <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.write(mE.getBoundaryEnd()); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } <br />&nbsp; &nbsp; &nbsp; &nbsp; <strong>finally</strong> { <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong>if</strong> (output != <strong>null</strong>) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output.close(); <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } <br />&nbsp; &nbsp; &nbsp; &nbsp;  <br />} // end WriteOutptuMIME <br /> <br />So, a little tricky, but not too bad. You have to get the boundaries right, as well as the line breaks. Otherwise, it's really just copying stuff out to disk. Remember that the message has some overall headers (mE.getHeaders()), and each child entity has its own header section as well, describing what's in that chunk of data. When we re-code an entity from binary format to base-64 format, we need to re-read the entity headers, because they'll reflect that change. <br /> <br />A final comment about HTML conversion: it theoretically existed back in R5 (you know what they say about <a href="http://bobzblog.com/tuxedoguy.nsf/dx/as-you-may-recall-from-my-previous-post...">"in theory"</a>...), but it didn't start working well for real until v7.03. And it has been improving ever since, so the later the version of the product you have, the better off you'll be.  <br /> <br />In my next blog post (part deux), I'll show you how to adapt this basic code for the Notes COM classes, where (for some stupid reason) the Document.convertToMIME() function does not exist). We will not be thwarted! I'll show you how to use the Notes C API from a C-sharp program to do the MIME conversion. <br /> <br />&nbsp;Happy coding! Geek ya later!  <p>(Need expert application development architecture/coding help? &nbsp;Want me to help you invent directory services based on RDBMS? Need some Cloud-fu or some web services? Contact me at: bbalaban, gmail.com) <br /> Follow me on Twitter @LooseleafLLC<br /> This article ©Copyright 2010 by Looseleaf Software LLC, all rights reserved. You may link to this page, but may not copy without prior approval.  <p> <br /> <br />  ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/geek-o-terica-15-easy-conversion-of-notes-documents-to-mime-format-part-1</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-15-easy-conversion-of-notes-documents-to-mime-format-part-1?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>Using Fiddler to monitor HTTP traffic in Domino Java agents</title>
<pubDate>Mon, 14 Mar 2011 04:15:00 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! If you're writing Domino Java agents that use HTTP requests to talk to the Internets, you might need to debug your code by capturing the actual bits that leave your computer as Web ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/using-fiddler-to-monitor-http-traffic-in-domino-java-agents</link>
<category>Lotus Domino</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/using-fiddler-to-monitor-http-traffic-in-domino-java-agents?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/using-fiddler-to-monitor-http-traffic-in-domino-java-agents</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <br /> If you're writing Domino Java agents that use HTTP requests to talk to the Internets, you might need to debug your code by capturing the actual bits that leave your computer as Web requests, or even by looking at the responses that come back. <br /> <br /> I recently had to do just that for a customer project. I could write debug logs for the URLs and "payloads" that I was sending and receiving, but you don't easily get to see the HTTP headers that come and go. I found that I could download and configure Fiddler (it's free <a href=http://www.fiddler2.com/fiddler2/><span style="text-decoration:underline">here</span></a>) to reveal all, for both "normal" HTTP and also for HTTPS connections. <br /> <br /> First of all, if you're debugging Java agents for Notes or Domino, I hope you're doing it in Eclipse, as described in my <a href="http://bobzblog.com/tuxedoguy.nsf/dx/the-2-headed-beast-debugging-domino-java-agents-with-eclipse"><span style="text-decoration:underline">"2-Headed Beast" posting</span></a>.<br /> <br /> There's only 1 little trick you need to know to make it work properly. Because Fiddler acts as a "proxy", inserting itself between your program and your network you have to tell Java to send HTTP commands to Fiddler, instead of directly to your network adapter (other programs, like the Chrome client for GMail automatically look for proxies, and require no special configuration). The way you tell Eclipse to do what you want is to go to the "Run Configuration" (or "Debug Configuration") dialog, click on the "Arguments" tab, and enter these JVM arguments into the "VM arguments" box: <br /> <br />  &nbsp; -DproxySet=true -DproxyHost=127.0.0.1 -DproxyPort=8888 <br /> <br /> Click "Apply", and you're all set. Launch Fiddler before you run/debug your code, and it will capture all the HTTP traffic out and in. Click the "Raw" button in Fiddler to see everything (outgoing in the top pane, incoming in the bottom pane), including headers. Voilą! It's especially fun to use with Web Services. <br /> <br /> What about doing this in Domino Designer? I haven't found an equivalent setting that allows me to specify the extra JVM arguments that Fiddler needs. It may be that if you can tweak the Run Configuration for your agents in Designer (see my <a href="http://bobzblog.com/tuxedoguy.nsf/dx/want-to-debug-java-agents-inside-designer-you-can-sort-of"><span style="text-decoration:underline">blog post</span></a> on how to do that), you can get it to work - I haven't tried it. <br /> <br /> What about LotusScript? Well, unfortunately, LotusScript has never had native HTTP capabilities (probably never will). Most people who want to use HTTP from a LotusScript program use outside libraries that you can invoke using DECLARE statements, or (on Windows systems), use the COM interfaces to libraries such as MSXML. <br /> <br /> Well, there you have it. Happy coding! Geek ya later!  <p>(Need expert application development architecture/coding help? &nbsp;Want me to help you invent directory services based on RDBMS? Need some Cloud-fu or some web services? Contact me at: bbalaban, gmail.com) <br /> Follow me on Twitter @LooseleafLLC<br /> This article ©Copyright 2010 by Looseleaf Software LLC, all rights reserved. You may link to this page, but may not copy without prior approval.   ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/using-fiddler-to-monitor-http-traffic-in-domino-java-agents</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/using-fiddler-to-monitor-http-traffic-in-domino-java-agents?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>Backup your GMail account to NSF</title>
<pubDate>Mon, 28 Feb 2011 12:15:14 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! I read with concern the recent reports of some GMail accounts disappearing, as I use a couple of them for business and other purposes. I thought about writing a program to download ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/backup-your-gmail-account-to-nsf</link>
<category>Lotus Notes</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/backup-your-gmail-account-to-nsf?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/backup-your-gmail-account-to-nsf</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <br />I read with concern the recent reports of some GMail accounts disappearing, as I use a couple of them for business and other purposes. I thought about writing a program to download all my mail and store as backup in a Notes database, but then I remembered that Notes already has a built-in feature for doing that: IMAP integration. <br /> <br />It took me 5 minutes to set it up and download over 7000 messages from my (thankfully still operating) GMail account. It even converted GMail "labels" into NSF folders. <br /> <br />So, here's how you do it (I used Notes 8.52, I think it works in v7 as well): <br /> <br />1) Go to your local Contacts database (ooops, I mean "Application"!), names.nsf <br />2) Click on "Advanced" in the navigator, then "Accounts" <br />3) Create a new Account document <br />4) Name it anything ("gmail") <br />5) "Account server" is "imap.gmail.com" (don't enter the quotes) <br />6) Login is your GMail account name, including the @gmail.com part <br />7) For Protocol I used &nbsp;"IMAP online". I didn't experiment with the "IMAP offline" feature, but I suspect it adds your gmail mailbox to the replicator page for background sync. Maybe someone can confirm/deny <br />8) I changed the SSL setting to "Enabled", because I have my GMail account set up to use SSL <br /> <br />So far so good, Notes creates a new NSF for IMAP sync. When you open it, Notes goes out to the IMAP account and synchronizes. First time I tried it, though I got an error "Invalid SSL certificates". <br /> <br />I fixed that problem by going back into the Account document, and going to the "Advanced" tab. I changed the "Send SSL certificates when asked" option to "Yes". I also changed "Accept SSL site certs" to "Yes", though I don't know if that's required or not. <br /> <br />Works great! Thanks Notes! <br /> <br />Geek ya later <br /> <p>(Need expert application development architecture/coding help? &nbsp;Want me to help you invent directory services based on RDBMS? Need some Cloud-fu or some web services? Contact me at: bbalaban, gmail.com) <br /> Follow me on Twitter @LooseleafLLC<br /> This article ©Copyright 2010 by Looseleaf Software LLC, all rights reserved. You may link to this page, but may not copy without prior approval.   ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/backup-your-gmail-account-to-nsf</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/backup-your-gmail-account-to-nsf?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>Geek-o-Terica 14: How Using &quot;LimitEntries&quot; Can Mess Up Db Replication (Unintended Side-Effects)</title>
<pubDate>Fri, 18 Feb 2011 16:25:00 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! This one is going to get uber-geeky real fast, so hang onto your gaming consoles. We need a little background, but I'll keep it brief. Most of you probably know that whenever a d ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-14-how-using-limitentries-can-mess-up-db-replication</link>
<category>Lotus Notes</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-14-how-using-limitentries-can-mess-up-db-replication?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-14-how-using-limitentries-can-mess-up-db-replication</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <br /> This one is going to get uber-geeky real fast, so hang onto your gaming consoles. <br /> <br /> We need a little background, but I'll keep it brief. Most of you probably know that whenever a document is saved (written to disk in the NSF), 2 list items automatically get updated: $UpdatedBy is a list of the names of the people who modified (and, initially, created) the document. The $Revisions item is a list of date/time values indicating the times at which the updates occurred. So, these 2 lists are "parallel", in that the last name in $UpdatedBy can be assumed to have modified the document at the last date/time in $Revisions, and so on, back into history, as far as it goes. <br /> <br /> Somewhere back in the V4/V5 days, people started to notice that these lists could, over time, get pretty big. A new Distinguished Name (10-30 characters) plus a new date/time value (8 bytes) each time someone hits Ctl-S in a document can start to add up. Even small documents could end up bloated by "bookkeeping data". So someone invented two new properties in the Application (nee Database) Properties box, on the propeller-hat tab: "Limit Entries in $UpdatedBy fields" and "Limit Entries in $Revisions fields". By default, these settings have a value of zero, meaning (as usual), "no limit". But, should you desire, you can set these properties to non-zero values to keep the size of your documents from growing forever. Of course, it's nice if you set the 2 properties to the same value, to keep the 2 lists in "sync", but you're not forced to (is that recommendation even documented? I didn't check). <br /> <br /> Ok, so far so good. But, you ask, what does this have to do with replication? Aha! Well, first just a bit more background. <br /> <br /> Before Notes v4, there was only 1 replication granularity: full document. The replication logic matched up the documents in 2 NSF replicas by their UNIDs (Universal IDs). If one document's "last-modified" time is later than the others, then (keeping it simple here by skipping some gritty details) it "wins". That worked fine for quite a while, but it meant that the replicator had to copy the entire document from one NSF to another when one copy of the document had been modified, and the other hadn't. If the document contained 10mb of attachment data, well, tough, the replicator copied all 10 mb, because it had no way of knowing whether the attachment itself had been modified. <br /> <br /> Enter "Field Level Replication", somewhere in the V4 timeframe. (By the way, you may -- or may not -- be surprised to know that "replication" was never patented by Lotus or Iris. However, Field Level Replication was patented in the early 1990s). This is an optimization applied to the normal replication logic that allows for much greater efficiency, but it required a change to the on-disk representation (ODS) of documents. The key innovation in FLR was that a new C API entry point was created that could tell a caller (for example, the Replicator) the date/time of last modification of a single DATA ITEM in a given document. This new entry point allowed the replicator to enhance it's normal logic to say something like: "Ok, DocA and DocB are the same (same UNID). DocA has a later last-modified date. But I may not have to copy the WHOLE document to DocB's NSF. I can match up the pair-o'-docs item by item, and only update DocB with the items that are modified!" <br /> <br /> Clearly better when you've got a big replication with lots of changes. But, how does the item-last-modified API actually work? You certainly don't want to store a full 8 bytes of date/time data for each item in a document, that's an enourmous use of space. Instead, someone figured out that they could use only 3 or 4 bits to store an INDEX into the list of document last-modified dates for each item. My recollection is (I could be wrong about this) that the number is the count from the END of the $Revisions list. So, a "1" probably means "last entry in $Revisions", etc. Cool, huh? Clever! You get huge new functionality by spending only a few bits per data item. <br /> <br /> BUT! What if someone's set the db property to "Limit Entries in $Revision fields"?? What if (extreme case here) there are only 2 entries allowed, but items in some document have been modified 3 or 4 times in one replica, and not at all in another? Aye, there's the rub. <br /> <br /> The answer is, you lose field-level replication for that document, and any others like it. The "get me the item last-modified time" logic has to account for that, of course, and there's really only one thing it can reasonably do. If the last-mod "index" attached to an item is bigger than the length of the $Revisions list, it has to fall back to document last-modified time, because the last-modified time of the document is guaranteed to be greater than, or equal to, the last-modified time of any item in that document. <br /> <br /> So, there you have it: an unintended consequence of limiting the amount of $Revisions space used in a document is that you make replication run slower (in some situations). "Correctness" is not violated (important point!): you never lose data as a result. It's just that in some cases replication will take longer. How much longer? It depends on your data. So, as always, it's a trade-off, space vs. time. <br /> <br /> Hope this helps, Geek ya later! <br />  <br /> <p>(Need expert application development architecture/coding help? &nbsp;Want me to help you invent directory services based on RDBMS? Need some Cloud-fu or some web services? Contact me at: bbalaban, gmail.com) <br /> Follow me on Twitter @LooseleafLLC<br /> This article ©Copyright 2010 by Looseleaf Software LLC, all rights reserved. You may link to this page, but may not copy without prior approval.   ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/geek-o-terica-14-how-using-limitentries-can-mess-up-db-replication</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-14-how-using-limitentries-can-mess-up-db-replication?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>Presenting at &quot;IDoSphere&quot; - Debug Domino Java Agents With Eclipse</title>
<pubDate>Wed, 9 Feb 2011 07:34:34 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! Suffering from post-Lotusphere let-down? Never fear, sign up now for "IDoSphere"! It's cheap, it's got great content, and it's all online, no need to leave the comfort of your own ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/presenting-at-idosphere-debug-domino-java-agents-with-eclipse</link>
<category>IDoSphere</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/presenting-at-idosphere-debug-domino-java-agents-with-eclipse?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/presenting-at-idosphere-debug-domino-java-agents-with-eclipse</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <br />Suffering from post-Lotusphere let-down? Never fear, sign up now for "IDoSphere"! <br /> <br />It's cheap, it's got great content, and it's all online, no need to leave the comfort of your own desk. Register <a href=http://bit.ly/IdoSphereDiscount>HERE</a> for the special 10% discount, use the coupon code <strong>IDS2011<em>BB</em></strong> <br /> <br />My session is: <br /> <br /><strong>Debugging Notes Java Agents With Eclipse</strong> <br />There is still no Java debugger (that humans can use) built into Domino Designer. If you want to build a complex Notes or Domino agent using Java, how can you debug it without making major code changes between debug and production modes? Come to this session to learn how to use a technique called the "2-Headed Beast" - a way of writing a Java program so that it can be run both in debug mode from within Eclipse, and then pasted into Designer with zero code modifications. This session assumes a working knowledge of Java, but you need not be a guru to make friends with the 2-headed beast! <br /> <br />I'm doing this live-in-the-studio with live Q&amp;A. <br /> <br /><a href=http://bit.ly/IdoSphereDiscount target=_blank><strong><span style="text-decoration:underline">http://bit.ly/IdoSphereDiscount</span></strong></a>  <br /><strong>IDS2011<em>BB</em></strong> <br /> <br /><strong>Geek ya Online!</strong> <br />  ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/presenting-at-idosphere-debug-domino-java-agents-with-eclipse</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/presenting-at-idosphere-debug-domino-java-agents-with-eclipse?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>Geek-o-Terica 13: Notes Response Hierarchies - Without Views</title>
<pubDate>Mon, 6 Dec 2010 00:01:00 -0400</pubDate>
<description>
<![CDATA[ 
Greetings Geeks! So. Everyone who's written any interesting amount of LotusScript (or Java) code in Notes or Domino has done the whole "get a view, get a document, get the first response to that, tra ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-13-notes-response-hierarchies-without-views</link>
<category>Lotus Notes</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-13-notes-response-hierarchies-without-views?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-13-notes-response-hierarchies-without-views</guid>
<content:encoded><![CDATA[ Greetings Geeks!<br /> <br /> So. Everyone who's written any interesting amount of LotusScript (or Java) code in Notes or Domino has done the whole "get a view, get a document, get the first response to that, travel the (possibly deeply nested) response hierarchy..." thing. Probably more than once. It can be tedious, and you often have to create special views in your app that are used only for code navigation, which can blow up the size of the NSF. Yes, you can use the NotesViewNavigator class to manage categorized and nested views, it's a great piece of functionality. However, I have found that in large databases (4gb+), with complex views, the ViewNavigator class can be pretty slow to set up and use. <br /> <br /> Is it possible to figure out response hierarchies without using a view at all? Yes, it sure is! You can navigate response hierarchies just using features in the NotesDocument class. <br /> <br /> But first you have to make sure the database itself is set up to support that. Go to the properties box, and to the "propeller beanie" tab (this screenshot is from Notes 7): <br /> <br /> <img  alt="Image:Geek-o-Terica 13: Notes Response Hierarchies - Without Views" border="0" src="http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-13-notes-response-hierarchies-without-views/content/M2?OpenElement" /><br /> <br /> Make sure that the double-negative "Don't support specialized response hierarchy" is NOT checked. <br /> <br /> To explain how this works, let's start with the basics of response documents. A document is a response to another document (it can only be a response to one other document, or not at all) if it contains a data item named "$REF", and that item contains the UNID of the "parent" document. That's it, very simple. The parent does NOT (in the document itself) contain a list of "child" documents. When documents show up in a View that has response hierarchies enabled, the view display logic figures out all the parent/child/child-of-child relationships based purely on the $REF pointers. No special support from the NSF layer is required. <br /> <br /> But if you don't disable the "specialized response hierarchy" feature in your database, then NSF is also, quietly and robustly, perhaps without you even realizing it, keeping track of which documents have $REF items and to what other documents they refer. And (the important point), this information is available through the Notes C API, and, as a consequence, is also available in the LotusScript and Java Document class. <br /> <br /> How do you do it? Simple! Use the NotesDocument.Responses property. It returns a NotesDocumentCollection object containing all of the first-level responses to the &nbsp;current document (if there are any). You can then follow the nested hierarchy (if there is one) by extracting each document object from the collection and getting its Responses list in turn. <br /> <br /> Not quite as convenient as using NotesView or NotesViewNavigator getfirst/getnext calls, but there are a couple of advantages to doing it this way: <br />  &nbsp; &nbsp;- You might be able to reduce the number of views in your NSF, which saves disk space and also results in better performance at NSF indexing time <br />  &nbsp; &nbsp;- If your response hierarchies are relatively simple (e.g., only 1 level of responses), this technique is quick and easy to code <br /> <br /> Is it for you? Only you can make that determination. Try it out and see!  <p>Happy coding! Geek ya later!  <p>(Need expert application development architecture/coding help? &nbsp;Want me to help you invent directory services based on RDBMS? Need some Cloud-fu or some web services? Contact me at: bbalaban, gmail.com) <br /> Follow me on Twitter @LooseleafLLC<br /> This article ©Copyright 2010 by Looseleaf Software LLC, all rights reserved. You may link to this page, but may not copy without prior approval.  <p>  ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/geek-o-terica-13-notes-response-hierarchies-without-views</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-13-notes-response-hierarchies-without-views?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>Geek-o-Terica 12: Finding databases by Replica ID vs. by path</title>
<pubDate>Sun, 14 Nov 2010 01:43:55 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! Everyone who writes application code (LotusScript or Java) in Notes/Domino uses Session.GetDatabase(, ), if not all the time, then at least frequently. I haven't done a "Geek-o-Te ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-12-finding-databases-by-replica-id-vs.-by-path</link>
<category>Lotus Notes</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-12-finding-databases-by-replica-id-vs.-by-path?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-12-finding-databases-by-replica-id-vs.-by-path</guid>
<content:encoded><![CDATA[ Greetings, Geeks! &nbsp;<br /> <br /> Everyone who writes application code (LotusScript or Java) in Notes/Domino uses Session.GetDatabase(<server>, <filepath>), if not all the time, then at least frequently. I haven't done a "Geek-o-Terica" post in a while, so this seems like a good topic with which to revive the series. <br /> <br /> First of all, let me state that this article is NOT about whether you should use hard-coded database server/path names in your code, because you shouldn't, end of story. Why not? Because databases can (and do) move. An NSF that your app assumes is in a particular folder today might be somewhere else tomorrow (ah, those pesky admins, shuffing things around on the server again). It might even get moved to a different server. The last thing you want to do is modify your code when something moves, it can get ugly (and if you have real change processes in place, you'll have to re-test everything too). <br /> <br /> If you have code that refers to databases that are not the current one (i.e., not Session.CurrentDatabase), then the best practice is to use a Profile Document to store the outside database's server and path. That way, if it moves, you only have to update the Profile Document (via a form) with the new location. <br /> <br /> What I really wanted to talk about was the "best practice" (in quotes, because this is not necessarily a settled issue, as you'll see) for actually getting the outside database in your code. Most people don't really think about it much, they just provide the server name and the db path (hopefully from a Profile Document or other external source). But, there is another way it can be done, and in some cases, it's better. And that is, look up the database by it's Replica ID instead. <br /> <br /> First, how do you do that? The code pattern is easy, you just use the Database.OpenByReplicaID() function. Here's a sample from the Designer Help doc: <tt><br /> <br /> Dim db As New NotesDatabase( "", "" )<br /> If db.OpenByReplicaID( "Moscow", "85255FA900747B84" ) Then<br /> Print( db.Title &amp; " was successfully opened" )<br /> Else<br /> Print( "Unable to open database" )<br /> End If</tt>  <p>There are a couple of things about using this call that are inconvenient relative to just using Session.GetDatabase() or New Database():  <p>&nbsp; &nbsp; &nbsp;- You have to instantiate the db object first, then open it (more typing)  <p>&nbsp; &nbsp; &nbsp;- You have to get and store the replica ID (e.g., in a Profile document, also more typing), because of course you wouldn't hard-code a replica id any more than you'd hard-code a db path, right? Right?  <p>However, the big advantage of using the replica ID is that you don't have to know (or care) where on the server the database might be located. Given the replica ID, the server (or the Notes Client) figures out where the physical file is, and opens it for you. This doesn't eliminate the need for a Profile document in your app, as you still need to store the server name and the ID itself somewhere, but it does simplify things a bit. because if some pesky admin moves your database without telling you, you don't even have to update your Profile document. You can just laugh at them and say "Do your worst! I care not! Hahahaaa!" (actually you might not really want to say "do your worst", they might take it as a challenge...)  <p>There is, however, one drawback to using the replica ID technique that makes it unusable in some cases, and that has to do with failover.  <p>If your database is on an clustered server, you may well want to access it from your code in such a way that if the server you specify is down, you can automatically "fail over" to another server in the cluster, and get a replica of the database you specified. The way you normally do that is as follows:  <p><tt>Dim db As New NotesDatabase( "", "" )<br /> If db.OpenWithFailover( "Moscow", "sales.nsf" ) Then<br /> Print( db.Title &amp; " was successfully opened on server" &amp; db.Server )<br /> Else<br /> Print( "Unable to open database" )<br /> End If</tt>  <p>This is nicely transparent, in that (if possible) you get a database object that references your db, whether it actually lives on the server you specified, or on another server in the cluster (the call works even if the server is not clustered). The Database.Server property reflects the server the database was actually opened on, and therefore might be different from the one you specified.  <p>You may have already spotted the problem with this: there's no way to open a database with failover by specifying its replica ID. This is a design flaw, going all the way back to Notes 4, simply never got plugged. Partly that's because of the way the Notes C API is set up (both the LotusScript and Java interfaces depend on the C API to do the real work), and partly it's just an oversight. Unfortunately, it means that if you want to use replica IDs to get a database in LS or Java code, you can't take advantage of failover behavior. And if you want failover, you can't get databases by replica ID.  <p>Happy coding! Geek ya later!  <p>(Need expert application development architecture/coding help? &nbsp;Want me to help you invent directory services based on RDBMS?? Contact me at: bbalaban, gmail.com) <br /> Follow me on Twitter @LooseleafLLC<br /> This article ©Copyright 2010 by Looseleaf Software LLC, all rights reserved. You may link to this page, but may not copy without prior approval.   ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/geek-o-terica-12-finding-databases-by-replica-id-vs.-by-path</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/geek-o-terica-12-finding-databases-by-replica-id-vs.-by-path?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>Busy 2 Weeks: ILUG and DNUG</title>
<pubDate>Sun, 7 Nov 2010 04:11:30 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! Welcome to USian Standard Time (1 hour earlier in most states). I'm off later today for an 11-day swing through Northern Ireland (note proper spelling as supplied by Mr. Steve Mc ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/busy-2-weeks-ilug-and-dnug</link>
<category>LUG</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/busy-2-weeks-ilug-and-dnug?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/busy-2-weeks-ilug-and-dnug</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <br /> Welcome to USian Standard Time (1 hour earlier in most states). <br /> <br /> I'm off later today for an 11-day swing through Northern Ireland (note proper spelling as supplied by Mr. Steve McDonagh: "Norn Iron") and Germany for<a href=http://www.ilug2010.org/ilug/ilug2010.nsf><span style="text-decoration:underline"> ILUG2010</span></a> and<a href=http://www.dnug.de/><span style="text-decoration:underline"> DNUG</span></a>. <br /> <br /> ILUG continues its tradition (and I believe it was the first to establish this tradition) of having people attend for free: the sponsors pay the freight. The conference is organized and staffed by volunteers. It's a terrific event, and will mark my first ever visit to Belfast. <br /> <br /> My session at ILUG will be:  <div align=center> <br /> <br /> <form action=http://www.ilug2010.org/ilug/ilug2010.nsf/sessions.xsp method=post></div> <br /><strong><br /> Deconstructing Web Services: How Do They Really Work, and What to Do When They Don't </strong><br /> SOAP-based Web Services hosting (in Domino) and consuming (in Notes) is really great: easy to use, robust and powerful. That is, if you carefully stay within the (mostly documented) boundaries of the functionality it handles well. But what happens when you try to do things that "should work", but don't? We're not talking about bugs here, but functionality outside the scope of what Notes and Domino implement. How do you detect that? And having detected it, what do you do about it? And how does all this Web Services stuff REALLY work, anyway? Come to this session to discover the technology building blocks of Web Services (design time and runtime), and see some examples of how you can work around the bits that may not do what you need. <br /></form><br /> <br /> DNUG is a conference I have spoken at many times over the past 11 years. It still amazes me that they can put on two quality technical conferences per year, every year. I'll be attending some panel discussions and presenting two sessions in Frankfurt: <br /> <strong><br /> "Cloud" Computing with Notes: Using Google APIs to get stuff done </strong><br /> If you're like many, many people these days, more and more of your data (email, calendar entries, documents, photos, YouTube videos...) are living somewhere in the world on a server owned by Google. What if you want to write Notes or Domino apps that "reach out" to the Google cloud? Is it possible to store, access, synchronize your Google assets from a Notes agent? The answer is "YES!" All of Google's services are accessible via XML-based REST APIs over HTTP, and Google has provided some nice, client-side object-oriented class libraries for us to use. <br /> If you&#8217;re nervous about letting Google hold all your data, or if you just want to learn something about REST APIs and object-oriented web services interfaces, come to this session to see some cool demos, and learn how to get started with your own Google code. <br /> While this session is mostly for developers with some experience with Java, anyone interested in the architecture and functionality of REST and Google will find something to learn. <br /> <br /> and <br /> <strong><br /> How to make a software development project fail </strong><br /> Anyone can make software projects succeed, but it takes special skill to make them reliably fail, time after time. <br /> Come to this session to learn the secrets of guaranteed failure, such as: sabotage staffing, reduced-resourcing, goofy goal-setting, ridiculous rewarding and mangled management. Learn how to save money, assign blame and trash teams. These techniques will serve you especially well if you are in business to produce and sell anti-social software or un-collaborative systems. <br /> You will benefit from this session if you are a manager or leader of development teams. The less skill you currently have in destroying software projects, the more you will learn! Attendees who know anything about writing code will probably know less when they leave than when they arrived. <br /> <br /> That latter one should be especially interesting :-) Hope to see you there!  <p>(Need expert application development architecture/coding help? &nbsp;Want me to help you invent directory services based on RDBMS?? Contact me at: bbalaban, gmail.com) <br /> Follow me on Twitter @LooseleafLLC<br /> This article ©Copyright 2010 by Looseleaf Software LLC, all rights reserved. You may link to this page, but may not copy without prior approval.   ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/busy-2-weeks-ilug-and-dnug</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/busy-2-weeks-ilug-and-dnug?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>How to get ALL of the documents: db.search() vs. db.AllDocuments vs. AllDocuments view</title>
<pubDate>Mon, 25 Oct 2010 04:00:00 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! Have you ever had to write an agent that looks at ALL of the documents in a database? As is usual with LotusScript/Java and the back-end classes in Notes, there's more than one way ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/how-to-get-all-of-the-documents-db.search-vs.-db.alldocuments-vs.-alldocuments-view</link>
<category>Lotus Notes</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/how-to-get-all-of-the-documents-db.search-vs.-db.alldocuments-vs.-alldocuments-view?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/how-to-get-all-of-the-documents-db.search-vs.-db.alldocuments-vs.-alldocuments-view</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <br />Have you ever had to write an agent that looks at ALL of the documents in a database? As is usual with LotusScript/Java and the back-end classes in Notes, there's more than one way to do that. <br /> <br />Actually, there are (at least) 3 common techniques: <br />1) Database.AllDocuments <br />2) Get the "All Documents" view and iterate <br />3) Database.search("@all") <br /> <br />I used to always use (and recommend) Database.AllDocuments, which returns a DocumentCollection instance. It's very efficient, because it maps to an optimized C API call that retrieves a list of all NOTEIDs (as an IDTable) in the database. This translates to a LotusScript DocumentCollection instance very easily, and none of the document objects is actually "opened" until you access it from the DocumentCollection,  <br /> <br />Then, somewhere along the way, I discovered that a change had been made to the behavior of this property. Originally (Notes 4.x), the code in the back-end classes implementation filtered out any deletion stubs in the IDTable resulting from the C API call. Again, this was an efficient operation, made possible by the fact that the NOTEIDs of deletion stubs all have a high bit set (0x80000000L). So you could tell the API to remove all values in the IDTable greater than &nbsp;0x80000000L, and what was left would be all valid NOTEIDs. <br /> <br />At some point (not sure when, or why), this final filtering operation was removed. So now, if you use Database.AllDocuments, you might find that as you iterate through the document objects in the result set, some of those documents will be "invalid" or deleted. It can be hard to work around this in your code, as the DocumentCollection.getNextDocument() call does not usually work if the "current" document object is invalid. See <a href="http://bobzblog.com/tuxedoguy.nsf/dx/getnth-revisited-helpful-function-or-spawn-of-the-devil">here </a>and <a href="http://bobzblog.com/tuxedoguy.nsf/dx/yes-i-really-did-need-notesdocumentcollection.getnth-that-one-time....">here </a>for some of the details. <br /> <br />I recently worked on a project where the speed of acquiring all the document objects in the NSF and iterating through them was really important. The AllDocuments/GetNth technique was too slow. So I thought I'd try iterating through the "All Documents" view instead (this particular project was processing dbs derived from the standard mail template). I thought it would be pretty fast because all the indexing would have already been done, and it was fast. The problem, however, was that it didn't really retrieve ALL of the documents in the database. Why? Here's the mail template "AllDocuments" view selection formula (the "($All)" view): <br /> <br />&nbsp; &nbsp; &nbsp;SELECT @IsNotMember("A"; ExcludeFromView) &amp; IsMailStationery != 1 &amp; Form != "Group" &amp; Form != "Person" <br /> <br />So any document that has a field "ExcludeFromView" containing an "A", or any document with a Form field containing "Group" or "Person", or any mail stationery document would never show up in the "All" view, and your agent would never see it. For some purposes this would be fine, but not for the project I was doing at the time, I really needed ALL of the documents. <br /> <br />So I fell back on Plan C: do a Database.search using "@all" as the selection criterion. I thought it would be slow, because the search() function visits every document in the database to apply the @function selection formula. But I knew that it would also explicitly exclude any deletion stubs from the result set, and that was a major concern. It turned out that the search was not particularly slow, certainly it's faster than using DocumentCollection.GetNthDocument() on a very large (100K) result set. The performance overall was actually pretty reasonable, and since I know that the resulting DocumentCollection will not contain any deleted documents, I can avoid GetNthDocument and just use GetFirst/NextDocument. <br /> <br />So, there you have it. All 3 techniques "work" (with variations in behavior), you need to think carefully about which one you should use. <br /> <br />Geek ya later! <br /> <p>(Need expert application development architecture/coding help? &nbsp;Want me to help you invent directory services based on RDBMS?? Contact me at: bbalaban, gmail.com) <br /> Follow me on Twitter @LooseleafLLC<br /> This article ©Copyright 2010 by Looseleaf Software LLC, all rights reserved. You may link to this page, but may not copy without prior approval.  <p>  ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/how-to-get-all-of-the-documents-db.search-vs.-db.alldocuments-vs.-alldocuments-view</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/how-to-get-all-of-the-documents-db.search-vs.-db.alldocuments-vs.-alldocuments-view?opendocument&amp;comments</wfw:comment>
</item>
<item>
<title>&quot;32K limit exceeded&quot;, huh?? Why SUMMARY is not always your friend</title>
<pubDate>Wed, 20 Oct 2010 16:41:37 -0400</pubDate>
<description>
<![CDATA[ 
Greetings, Geeks! So there I was (don't you love stories that start out that way?). I was writing an agent to take journaled email messages, expand group names in the various recipient lists (SendTo ...
 ]]>
</description>
<link>http://www.bobzblog.com/tuxedoguy.nsf/dx/32k-limit-exceeded-huh-why-summary-is-not-always-your-friend</link>
<category>Lotus Notes</category>
<dc:creator>Bob Balaban</dc:creator>
<comments>http://www.bobzblog.com/tuxedoguy.nsf/dx/32k-limit-exceeded-huh-why-summary-is-not-always-your-friend?opendocument&amp;comments</comments>
<guid isPermaLink="true">http://www.bobzblog.com/tuxedoguy.nsf/dx/32k-limit-exceeded-huh-why-summary-is-not-always-your-friend</guid>
<content:encoded><![CDATA[ Greetings, Geeks! <br /> <br /> So there I was (don't you love stories that start out that way?). I was writing an agent to take journaled email messages, expand group names in the various recipient lists (SendTo, CopyTo, etc.), and then save a copy of the message with expanded lists in another database. <br /> <br /> The group expansion issue was a little tricky, because Notes lets you nest group names (an email or security group can include the name of another group). That was fun to solve, maybe I'll post that code sometime. BUT, in testing, it turned out that if an expanded recipient item got too big, Notes would throw an exception (I was using Java) on the Document.save() call, "32K field limit exceeded". What? B-b-b-but I SPECIFICALLY coded the agent to watch how long the field is getting.... <br /> <br /> Ok, background: The limits I always knew about were pretty straightforward: No single data item, of any type, can be bigger than 64KB (and that includes overhead for type codes and stuff). The CAPI documentation says you should really limit the size to 40KB, plus or minus. "SUMMARY" items (those which can appear in a View) have to be 15KB or less in size. Rich text items can be any size, but that's because when a single item containing rich text data gets too big (more than 40K or so), Notes just creates another item of the same name and tacks it onto the chain of data items that make up the document. <br /> <br /> My group expansion processing yields a Vector containing a String object for each name in the recipient field. Vectors can be any size, no problem). In order to obey the Notes limits, though, I chose to create a "recipient list" Vector, and add name to it from the original Vector, counting the length of each String as I add it, until I hit my 40K (or so) limit.<sup>** </sup>Then I can just take the new Vector and hand it to Document.replaceItemValue(). If I fill up the original field name (this is in the copy, of course, not in the original journal message), I start a cascade: SendTo_1, SendTo_2, etc., until I've used up all the names in the expanded list. No single item has more than my pre-defined maximum of 40K characters (String.length returns number of characters, remember, NOT number of bytes! Pay attention, this might be important later). <br /> <br /> So, why, after doing all this work to keep the translated items short enough for Notes, do I get the "32K limit exceeded"?? At first I thought it was because i was counting characters in Java, not bytes. Each character in a Java String object (which is normally encoded as UTF-16) actually consumes 16 bits, or TWO bytes, not one. So a 40Kchar string is actually using up 80KBytes! But.....no. Because when I pass the String objects to Notes, Notes automatically translates each one to LMBCS (the internal Notes character set, see my character set tutorial <a href="http://bobzblog.com/tuxedoguy.nsf/dx/introducing-geek-o-terica"><span style="text-decoration:underline">here</span></a> for a full explanation), which is mostly 1 byte per character (not for Kanji and other multi-byte character sets, but in this case that's not what I was dealing with). <br /> <br /> Ok, so....whatever. I dialled the max item size down to 30K and ran it again. Same error. Crap. <br /> <br /> So then I did what I often do when I'm really, really stuck. I called my friend <a href=http://www.nashcom.de/nshweb/pages/home.htm><span style="text-decoration:underline">Daniel</span></a>. We brainstormed. To make a longish story short-ish, he made a suggestion which, although it sounded a little weird, actually WORKED (he's very good at that). <br /> <br /> The key was: Turn OFF the SUMMARY flag on the new items. Here's an approximation of how I did that in my Java code? <br /> <br /> Vector expanded; &nbsp; &nbsp; // the expanded list of names. We get that in other code I'm not showing you today. List of String objects <br /> Vector newField; &nbsp; &nbsp; &nbsp; // the list for a single document Item we're going to build, and track the length of <br /> int newLength; <br /> String nextOutputItem; &nbsp; // name of next item to write to the document <br /> <br /> // skipping details of outer loop over recipient fields.... <br /> // do a loop over names for the next output item <br /> // (skipping tedious logic about cascading output items when they get too big...boring) <br /> newLength = 0; <br /> nextOutputItem = "<something...>"; <br /> for (int i = 0; i < expanded.size(); i++) <br />  &nbsp; &nbsp; { <br />  &nbsp; &nbsp; String aName = (String) expanded.elementAt(i); <br />  &nbsp; &nbsp; if (newLength >= MAX_LEN_WE_MADE_UP_SOMEWHERE) <br />  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ <br />  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// current newField is full, write it out <br />  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// MUST turn off the SUMMARY flag before doc save <br />  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Item newItem = doc.replaceItemValue(nextOutputItem, newField); <br />  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;newItem.setSummary(false); <br />  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nextOutputItem = "<next name in series>"; <br />  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} <br />  &nbsp; &nbsp; else { <br />  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;newLength += aName.length(); <br />  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;newField.append(aName); <br />  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} <br />  &nbsp; &nbsp; } // end for i <br /> <br /> Ok, I hope you get the basic idea. replaceItemValue() returns the Item object (convenient), so just use it to turn off the SUMMARY flag. Then when you save the document, you don't get that nasty 32K error. <br /> <br /> BUT, the question remains: WHY does this work? We haven't reduced the size of the items we're writing. And if the limit for SUMMARY items is 32K, why did we still get the error when we starting limiting the items to 30KB?? <br /> <br /> I'm afraid, my friends, that the answer has to be: The error message is wrong. Bogus. Full of it. Misleading, at best. There IS NO 32K LIMIT!! 14K (or so) limit, maybe. THAT's why turning off the SUMMARY flag works, we're telling Notes that the item content is allowed to go all the way to 64KB (or so). <br /> <br /> So, there you have it. Go forth and code, with no pesky, wrong error messages to befuddle and comfusticate your day. <br /> <br /> Geek ya later! <br /> <br /> ** "Got the Vector, Victor?" (Lord, I just love the movie "Airplane"...)  <br /> <p>(Need expert application development architecture/coding help? &nbsp;Want me to help you invent directory services based on RDBMS?? Contact me at: bbalaban, gmail.com) <br /> Follow me on Twitter @LooseleafLLC<br /> This article ©Copyright 2010 by Looseleaf Software LLC, all rights reserved. You may link to this page, but may not copy without prior approval.   ]]></content:encoded>
<wfw:commentRss> http://www.bobzblog.com/tuxedoguy.nsf/dxcomments/32k-limit-exceeded-huh-why-summary-is-not-always-your-friend</wfw:commentRss>
<wfw:comment> http://www.bobzblog.com/tuxedoguy.nsf/dx/32k-limit-exceeded-huh-why-summary-is-not-always-your-friend?opendocument&amp;comments</wfw:comment>
</item>
</channel></rss>

