Mind Map of Database Design
If you haven't yet seen the mind map Chris created to describe the Notes URL protocol, check it out. I've played with mind maps, but it hadn't occurred to me to use them for training purposes, and in retrospect it makes sense.
One of the uses I've been hoping to expand Decepticon to support is to transform the entire design of a database into a mind map to provide a visual representation of application complexity. Trouble is, that's probably gonna require some serious XSLT. But a few minutes of tinkering with just some core LotusScript produced this. It maps (most of) the design element categories of my mail file. I left out image resources, because there are hundreds in the mail template, and that's apparently just too much data for poor old NotesDOMParser to serialize.
UPDATE: By request, here's the code of the agent that produces the XML which feeds the FreeMind applet:
'Declarations
Dim dbMail As NotesDatabase
Dim nodeDocument As NotesDOMDocumentNode
Dim nodeDbTitle As NotesDOMElementNode
Public Sub AnalyzeElementCategory (Byval p_strCategory As String)
Dim ncElements As NotesNoteCollection
Dim docElement As NotesDocument
Dim nodeCategory As NotesDOMElementNode
Dim nodeElement As NotesDOMElementNode
Dim strNoteID As String
Set ncElements = dbMail.CreateNoteCollection(False)
Select Case p_strCategory
Case "Agents"
Let ncElements.SelectAgents = True
Case "Folders"
Let ncElements.SelectFolders = True
Case "Forms"
Let ncElements.SelectForms = True
Case "Framesets"
Let ncElements.SelectFramesets = True
Case "Outlines"
Let ncElements.SelectOutlines = True
Case "Pages"
Let ncElements.SelectPages = True
Case "Script Libraries"
Let ncElements.SelectScriptLibraries = True
Case "Shared Fields"
Let ncElements.SelectSharedFields = True
Case "Shared Files"
Let ncElements.SelectMiscFormatElements = True
Case "Shared Images"
Let ncElements.SelectImageResources = True
Case "Subforms"
Let ncElements.SelectSubforms = True
Case "Views"
Let ncElements.SelectViews = True
End Select
Call ncElements.BuildCollection()
If (ncElements.Count > 0) Then
Set nodeCategory = nodeDocument.CreateElementNode("node")
Call nodeCategory.SetAttribute("text", p_strCategory & { (} & ncElements.Count & {)})
Call nodeCategory.SetAttribute("folded","true")
Let strNoteID = ncElements.GetFirstNoteId()
Do While (Len(strNoteID) > 0)
Set docElement = dbMail.GetDocumentByID(strNoteID)
Set nodeElement = nodeDocument.CreateElementNode("node")
Call nodeElement.SetAttribute("text",Replace(docElement.GetItemValue("$TITLE")(0),{'},{'}))
Call nodeCategory.AppendChild(nodeElement)
Let strNoteID = ncElements.GetNextNoteId(strNoteID)
Loop
Call nodeDbTitle.AppendChild(nodeCategory)
End If
End Sub
Sub Initialize
Dim sesCurrent As New NotesSession
Dim dompDesign As NotesDOMParser
Dim nodeMap As NotesDOMElementNode
Dim nodeRoot As NotesDOMElementNode
Dim strmInput As NotesStream
Dim strmOutput As NotesStream
On Error Goto errorHandler
Set dbMail = sesCurrent.GetDatabase("","mail\ttripcon.nsf") 'lazy hardcoding...
Set strmInput = sesCurrent.CreateStream()
Call strmInput.WriteText("<map />") 'Becomes root node for the output XML
Set strmOutput = sesCurrent.CreateStream()
Set dompDesign = sesCurrent.CreateDOMParser(strmInput,strmOutput)
Call dompDesign.Process()
Set nodeDocument = dompDesign.Document
Set nodeRoot = nodeDocument.DocumentElement
Set nodeDbTitle = nodeDocument.CreateElementNode ("node")
Call nodeDbTitle.SetAttribute("text",dbMail.Title)
Call nodeRoot.AppendChild(nodeDbTitle)
Call AnalyzeElementCategory("Agents")
Call AnalyzeElementCategory("Folders")
Call AnalyzeElementCategory("Forms")
Call AnalyzeElementCategory("Framesets")
Call AnalyzeElementCategory("Outlines")
Call AnalyzeElementCategory("Pages")
Call AnalyzeElementCategory("Script Libraries")
Call AnalyzeElementCategory("Shared Fields")
Call AnalyzeElementCategory("Shared Files")
Call AnalyzeElementCategory("Subforms")
Call AnalyzeElementCategory("Views")
Call dompDesign.Serialize()
Print {Content-type: text/plain}
Let strmOutput.Position = 0
Print strmOutput.ReadText()
Exit Sub
errorHandler:
Print {Error in line } & Erl() & {: } & Error$
Exit Sub
End Sub

Comments
Posted by John Head At 05:45:35 PM On 06/25/2007 | - Website - |
I find working with mind maps on technology topics helps me get a better understanding of the big picture and visualize connections between elements and concepts that I might not otherwise have seen. Very nice work! I look forward to learning more about Decepticon.
Posted by Chris Blatnick At 09:28:26 PM On 06/16/2007 | - Website - |
Posted by Rich Waters At 09:51:19 AM On 06/18/2007 | - Website - |
Posted by Keith Strickland At 05:45:23 PM On 03/03/2009 | - Website - |
Posted by null At 08:16:15 AM On 06/15/2009 | - Website - |
Posted by tiffany At 03:50:51 AM On 10/20/2009 | - Website - |
Posted by Edward At 03:36:46 AM On 12/18/2009 | - Website - |
Posted by Paul At 10:27:37 AM On 08/10/2010 | - Website - |
Posted by placement argent At 03:45:31 AM On 06/26/2010 | - Website - |
Posted by pari At 09:38:15 PM On 02/26/2011 | - Website - |
Posted by buyerss22 At 04:43:36 AM On 05/04/2011 | - Website - |
Posted by corporate image At 05:15:38 AM On 06/07/2011 | - Website - |
Posted by terry At 08:21:58 AM On 11/17/2011 | - Website - |
Posted by barry At 02:13:55 PM On 12/21/2011 | - Website - |
Posted by Linda At 01:14:25 PM On 03/03/2012 | - Website - |