Lotus Notes/Domino ::


switching from Robohelp to Xmetal

Hello, My group will be switching to use an XML editor instead of RH for the creation of online help. We need to produce an uncompiled help system that will be

Comments

A little code audit on Xerces 2.9

My company rolls its own version of Xerces for our products. We can add fixes or enhancements without fear of conlicts. Over the years, the list of things to do has decreased. Now it is just about down to removing...

Comments

PDO versus MDB2

I was just putting together a small test program and I thought I would try using PDO. I really haven't done anything serious with PDO, just try it a couple times. After recompiling PHP to include the mysql driver for PDO, I coded up the first version of my test program:

?
$db = new PDO('mysql:host=localhost;dbname=example', 'example', 'secret');
?
$tags = $db->prepare("
    SELECT 
        * 
    FROM 
        bookmark_tags, tags 
    WHERE 
        bookmark_tags.bookmark_id = ? AND 
        tags.id = bookmark_tags.tag_id 
    ORDER BY 
        tags.name");
?
$bookmarks = $db->prepare("SELECT * FROM bookmarks ORDER BY Title");
$bookmarks->execute();
while ($bookmark = $bookmarks->fetchObject()) {
    echo "
  • {$bookmark->title} "; $tags->execute(array($bookmark->id)); while ($tag = $tags->fetchObject()) { echo $tag->name, " "; } ? echo "
  • n"
    ; } echo "n"; ?

    Unfortunately, this didn't work and it took me a few minutes to figure out why. Actually, I still don't know exactly why it doesn't work, but I did find a way to make it work: by using two separate connections, one for each prepared statement. It doesn't seem like you can have two active statements at the same time on the same connection. I find this hard to believe, so I'm probably doing something wrong.

    The other thing I didn't care for with this PDO code is the non-standard method of iteration with the while loop. Well, the while loop is perfectly standard if you are coming from the PHP 4 style functional DB APIs. However, it doesn't seem to fit in with the PHP 5 Iterator and foreach integration. PDO doesn't seem to provide a distinct result set object, or a method of iterating over a result set using the standard PHP Iterator interface.

    Now, I can understand why this may be the case. The PDO interface seems to be designed to bind to php variables. Thats not going to work with the Iterator interface. However, I am not using that mode and don't want to use that mode. It would be nice to be able to acquire an iterator for an example of use such as the one above without having to use fetchAll and ArrayIterator.

    Using the Iterator style makes it easier for me to decouple my code from the data source and makes it easier to write test cases for that code.

    I was a little bit disappointed. So I moved on to MDB2 with the same code ...

    ?
    require_once 'MDB2.php';
    require_once 'MDB2/iterator.php';
    ?
    $db = MDB2::connect("mysql://example:secret@localhost/example");
    ?
    $tagLookup = $db->prepare("
        SELECT 
            * 
        FROM 
            bookmark_tags, tags 
        WHERE 
            bookmark_tags.bookmark_id = ? AND 
            tags.id = bookmark_tags.tag_id 
        ORDER BY 
            tags.name");
    ?
    $bookmarkFinder = $db->prepare("SELECT * FROM bookmarks ORDER BY Title");
    $bookmarks = new MDB2_Iterator($bookmarkFinder->execute(), MDB2_FETCHMODE_OBJECT);
        
    echo "
      n"; foreach($bookmarks as $bookmark) { echo "
    • {$bookmark->title} "; ? $tags = new MDB2_Iterator($tagLookup->execute($bookmark->id), MDB2_FETCHMODE_OBJECT); foreach($tags as $tag) { echo $tag->name, " "; } ? echo "
    • n"
      ; } echo "
    n"
    ; ?

    I have about the same level of non-experience with MDB2 as with PDO, but my code worked perfectly on the first try and allowed me to use Iterator, which will be helpful to the next stage of my test.

    I was a bit impressed. I'll see how well it handles the next stage of what I want to do.

    (And yes, I know there is no error checking in the above code.)

    Comments off

    Microsoft seeks to patent RSS

    Announced today, Microsoft has apparently applied for the patent on "web feeds". This is one of those announcements that make people roll their eyes up in their heads in puzzlement and disgust, in what I think in this case is...

    Comments

    The Desktop Conundrum

    I can now see the shape of the new real operating system ... one that doesn't have big fanfares and major release numbers and significant rollouts but instead simply is there, is organic, and evolves with time. It is pretty much ubiquitous, doesn't require a $200 license to play, and for the most part works not by pushing the edges of what's possible with the hardware at hand but by working with established technologies and tools, albeit sometimes in very new ways. It isn't produced by any one vendor, and it doesn't penalize a person because he doesn't have the latest and greatest hardware and software and the money to spend on all that premium content. It recognizes the value of advertising - advertising is, at its sole, the nervous system of capitalism, and in its place is valuable - but it doesn't bend to the point where the advertisers can corrupt the system. The new operating system places the emphasis instead upon the individual participant, not as a captive user or potential customer but as a creator in his or her own rights, no matter how simple the creations.

    Comments

    Who Invented RSS?

    re: Patent Applications in the RSS space >...We have always fully acknowledged the innovators and supporters of RSS, like Dave Winer, Nick Bradbury and many others... I think you misspelled 'innovators' - let me help. Did you mean 'inventors'? You...

    Comments

    Finding unused databases in Lotus Notes and Domino

    Organizations often have hundreds of Notes/Domino databases across many servers, only a few of which have significant usage. Learn how to find and remove unused databases to reduce the disk space and complexity of your Notes/Domino environment.

    Comments off

    Dan Thies’s Keyword Permutation Tool Video

    Dan Thies recently created a free video offering tips on how to use my free keyword list generator tool.

    Comments off

    Wii (insert pun of your choice here)

    I've finally been able to play the Nintendo Wii, and sure, I want one. I had decided not to buy yet another version of Mario Kart and that the new controller would not yield itself to most games, that it would only work for some very specific ones . After I've tried it, I still think that couldn't be my main gaming machine, but I want one anyway. The controller works very well. I didn't have the impression that it was any more precise than, say, a Gyration mouse (it was quite clumsy to use on the menu screens), but it reacts accurately to fast movements, which is what matters in games. By the way, Nintendo has already succumbed to the pitfall of thinking the movement detection was a universally good idea. It isn't. The simple...(read more)

    Comments off

    [Aristotle Pagaltzis:QOTD] To Be An XML Partisan, You Must First “Get” XML

    ongoing � JSON and XML From: Aristotle Pagaltzis (Dec 21 2006, at 18:52) Anders: It's a stretch to call the man who designed both RSS 2.0 and OPML an "XML partisan." I have no desire to get myself in any...

    Comments

    Google Update - Update

    Comments off

    Re[2]: [xml-doc] Re: “BookX” (was: towards ’single sourcing’,

    David wrote, ... Thanks for the pointer to Lyx. Not sure how I've not heard of it before. Jon

    Comments

    Re: “BookX” (was: towards ’single sourcing’, feasibility of

    Jon, Small publishers would, I think, be far ahead of the game if they began to use Lyx. Based upon LaTeX, Lyx creates *far* better looking output than Word

    Comments

    Re: “BookX”

    ... Hash: SHA1 ... Have you looked at 'antiword -x db filename'? Its output looks a bit ugly (for example, blank lines turned into pairs) on

    Comments

    Google Update

    Comments off

    Re: “BookX” (was: towards ’single sourcing’, feasibility of

    David, ... I totally agree. But I have to experiment with Word 2003 (in XML view mode, not regular mode) since there is a heavy reliance by small publishers in

    Comments

    How to cull elements from a list using Formula

    String and list handling are not completely covered in Formula language. Learn how SearchDomino.com member Peter Skold has circumvented that issue by "inventing" a Formula function to cull elements from a list.

    Comments off

    Re: Training reference request

    Thanks, David. Yes, the two folks I was referred to as tops for training were Ken Holman of Crane Softwrights (whom I've spoken with and who saw my message and

    Comments

    Merry Christmas Chuckle

    Comments off

    Notes-Like Web Applications Using YUI Ext | Blog

    Comments off