Friday, April 21, 2006

starting to learn XSLT ? here are some tools ...

As I wanted to take a closer look at this "language", I found myself loaded with lots of articles describing what it is, how to use it and so on ... much information useful theoretically, hard to apply in practice. Why ? because as I am not so familiar with XML syntax itself I could hardly focus on what's important to get things done. And what I want is simply to play a little bit with the XML generated by a ?readviewentries Domino command and trying to transform it into something more useful.

So I started to look on the net to find useful tools which can increase my learning curve into XML/XSLT stuff. After reading articles and stuff I did find a useful example list and a great tool

Both above links are great resources, because they allow you see step-by-step what is going on when you apply an XSLT to a XML source.

Actually, the ExchangerXML allows debugging of XSLT transformations, much like the examples mentioned above. And can be used free of charge for a beginner like myself. If I will go deep into this technology I will consider buying the full license, this is a very good piece of software.

Tuesday, April 18, 2006

use domino servlets unpacked

As many others like you Domino devs out there, I am also approaching Java. For the moment, Java under Domino. And I am also playing more and more with servlets, due to their feature of being loaded into memory. I think this makes things a little faster.

I used to like packing files (classes) into *.jar files, then deploy them on the domino server using ftp, issue 'tell http restart' and test. No more this approach, at least the jar packing. Why ? Because if you deploy a new servlet into domino\servlet\someServlet.jar, you also have to specify the same relative path into the server document (the Classpath field). If you have many servlets, you may end up deal with the 32k limit for the Classpath field.

Solution is to leave the Classpath field to its default domino\servlet path, then recreate the folder hierarchy on the domino server

Example: using Eclipse, I like to keep things organized. I use packages, thus the servlet code is looking something like:

package ro.radu.mypackage ;
public class MyServlet extends HttpServlet {

When compiled, on the Domino server, I go and create the proper folder hierarchy: domino\servlet\ro\radu\mypackage and copy the MyServlet.class into the last folder.

This is old news, I know :)

The advantage is that you can have one Eclipse project called DominoServlets, and all little servlets can be developed under the same Eclipse package, deployment meaning:
- copy your class file on the Domino server proper path
- if new, modify the file under /domino/data to add an alias or whatever needed.

Monday, April 17, 2006

Domino embedded groups solution ... done !

well, I finalized the solution and it is actually working, as you can see in the picture. The biggest challenge was to find a proper tree-view builder, free of use (as I didn't want to reinvent the wheel, that's what I love to open-source community). And the best I found and can recommend is the Yahoo Tree-View Builder

Next steps were to figure how to use it and put this widget to work under AJAX Domino technique of calling an agent which performs full text searches agains groups documents within a Domino Directory.

The agent is rather simple, calling query syntax of [Members] CONTAINS "name of group" and return the names.

Then, simple matters of JS coding and put together these pieces.

So, you start by entering a search string (can be the username or the group name), then the button 'search person' gets the search string and mocks with the tree-builder. Then, on each click of a result group, the agent is called behind the scene and builds the hierarchy of embedded groups.

As you see, 'radu cadariu' belongs to the 'group test1' . 'group test 1' is embedded in 'group test 2', which in turn is embedded in 'group test 3' and so on. I didn't check for the loop in the embedded groups which can obviously be noticed by the person who builds the hierarchy.

This tool is for Domino directories which contain a lot of embedded groups, as it was born out of necessity rather than fun. Anyway, it was fun to build it :)

Friday, April 14, 2006

rediscover things ....

just had rediscovered Wikipedia , a tremendeous useful resource of information. For instance, let's take the example of the nowadays key word "AJAX". I remember I've read an article back into 2005 which defined this acronym. I even bookmarked that article, then I've lost it and obviously didn't remembered the site.

Guess what, by accidentally get on the Wikipedia page for AJAX, I rediscovered the article which invented this acronym

Wednesday, April 12, 2006

Domino embedded groups solution ...

As we all (Domino related staff) know by now, embedded groups can be a pain to manage and have an overview upon. Not to mention an old and good project I'm working on, which heavily relies on groups for security management. Editor can do whatever they want with their groups, thus resulting a mess when we try to figure out why a user cannot gain access to certain part of the site.

After thinking over for some time, I think I may have a solution for this, thanks to my more or less recent discoveries in terms of Ajax applied to Domino web apps.

In the first step, using an agent build using the Andre Guirard's LS class NotesGroupManager (more here ), I managed to search group embedded hierarchy with an URL command such as:


This command would launch the agent, get the query parameter and perform full text searches recursively against the groups, returning HTML as format. Problem is that this agent would eventually throw 'agent did not complete within time limit', so I had to gave up on this approach.

What to do ? building a separate db with a scheduled agent would be to much of work, and as I've already admitted I'm pretty lazy :)

And today it came to me: since I seem to not be able complete the embedded search in one run, I may request the user to participate. This means a simple page with an inputbox and a search button. Scenario is this:
- user enters the search string and hit Search.
- using ajax, I call the agent and full text search the string, returning the group names as JS array
- we do have the DOM and little JS skills, so we build the first level of embedding with radio buttons.
- then, if the user needs to go deep in the hierarchy, he will hit a returning entry and the same process starts again, with the results inserted right below.

Result ? my agent performs only one full text search in one run, so it will not crash. User builds the embedded hierarchy of groups as it see the results.

There might be even loops in this embedded groups of Domino, and for this project there certainly are, but I will rely on the site admin to figure this out :)

Saturday, April 08, 2006

new ideas ...

applied to Domino, coded by my own hands, with ideas taken from blogosphere. Those Domino bloggers which give back to community are pure gold for lazy programmers like myself :) Thank you guys, my hat's off.

I'll update this entry with the proper links, for the moment I'll describe my ideas, details in future posts:

1. a generic web view for inline edit of Domino fields
2. a XSL/XSLT transformation of a ?readviewentries result. In fact I would have multiple readviewentries calls performed from the same page towards several domino dbs, with ajax
3. I'd like to obtain a file selection JS window for the Domino dbs. This would be accomplished with NotesDbDirectory LS class, put in an agent and called from web. I'd like to have another solution aside the DbDirectory class, for the moment I have to stick with it and give it a tryout.

Monday, April 03, 2006

GlobalSign CA not available into the cacerts file

Just fixed an issue which is well known, related to GlobalSign Root CA not available into the cacerts file of the JVM.

The solution is described here

Disclaimer: The information in this weblog is provided "AS IS" with no warranties whatsoever, and confers no rights to any institution/person/organization. These are my personal thoughts and ideas. When I am inspired by others I give credit, I do not assume other's work and efforts. This site is NOT supported, approved, blessed etc. by Lotus Software and/or IBM Corporation.

Creative Commons License

This work is licensed under a Creative Commons Attribution 3.0 License.