SonghaySystem(::)

UriTree: A Free, OPML-based, WPF System Tray Utility for Handling Hundreds of Links

CodePlex

Download the UriTree stable release at CodePlex.com.

UriTree is the name of an idea documented in 2006, “The Resource Location Manager: A Tiny C# Application That Solves the “Favorites Problem.” Now that this ‘tiny’ application has a name, UriTree, it has matured and stabilized into a more concise expression. This document highlights the following changes:

Browse this code base for release 2.x at CodePlex.com.

UriTree Takes Advantage of Windows Presentation Foundation

WPF offers the MenuItem control. When this element is used with the Hardcodet.Wpf.TaskbarNotification libraries from Philipp Sumi, we obtain all of the visual effects and experiences that we expect from professional Windows applications:

UriTree Screenshot

By the way, just to illustrate (yet again) why XML is so cool, note that the UriTree links you see in the screenshot are pulled from the same remote location that the AJaX-based kinté links page uses on kintespace.com.

UriTree showing balloon message with Hardcodet.Wpf.TaskbarNotification library

Dave Winer’s OPML 2.0

The XML format that UriTree uses is a subset of OPML 2.0; you can download and examine the source XML to see whether it is “valid”—and to see what portion of OPML 2.0 is being used. The schema referenced in this XML set, that provides IntelliSense in Visual Studio 2005 among other benefits, is also available for download.

It is worth mentioning that an InfoPath 2007 form was designed based on our schema—and it is used to edit OPML data. Significant performance problems were found when the XML set when upwards of a one hundred elements. Of course it works quite well when the XML is small. Designers experienced with InfoPath should know that sharing OPML data generated by InfoPath can cause problems since most of the OPML “validators” in the wild are not prepared to parse the namespace prefixes that must be present.

UriTree Handles More Than Just HTTP Links

XSD mavens may wonder why our schema does not declare anyURI for the OPML url attribute. This is because UriTree is a Windows Desktop application and needs to handle more than Web protocols. To assist in this design goal the app.config file for UriTree allows you to specify a local and remote XML set—this asserts a convention where a local XML set can contain desktop specific links and a remote set can contain “public” Web links. In the applicationSettings block for UriTree.exe.config, we have the settings ResourcesLocal and ResourcesRemote respectively. This convention makes UriTree eliminate the conceptual differences between local and remote links, the proprietary Windows desktop and the Word Wide Web. The following table highlights the kind of local resources you can put in UriTree:

Local Resource Remarks
<outline text="Development Server" type="link" url="http://%ComputerName%/"/> This is the link to my local Web server. UriTree takes advantage of the Environment.ExpandEnvironmentVariables() member during Resource parsing.
<outline text="Device Manager" type="link" url="%SystemRoot%\System32\DEVMGMT.MSC"/> This item links to the Windows XP Device Manager.
<outline text="Edit HOSTS File" type="link" url="%ProgramFiles%\Notepad++\notepad++.exe %SystemRoot%\System32\DRIVERS\ETC\HOSTS"/> This is a link to the Windows XP HOSTS file.
<outline text="Event Viewer" type="link" url="%SystemRoot%\System32\eventvwr.msc /s"/> This is a link to the Windows XP Event Viewer.
<outline text=".NET 2.0 SDK Folder" type="link" url="%ProgramFiles%\Microsoft Visual Studio 8\SDK\v2.0\Bin" /> This is a link to the .NET 2.0 SDK Folder.
<outline text=".NET Global Assembly Cache" type="link" url="%SYSTEMROOT%\assembly" /> A quick link to the .NET Global Assembly Cache.

Introducing Songhay.Xml.XmlUtility

Songhay.Xml.XmlUtilityThe image at right summarizes the static class Songhay.Xml.XmlUtility. UriTree depends heavily on this “helper” class. This definition instances the workhorse of all XML-related activities for Songhay System enterprise data solutions. The design goals include:

Our UriTree takes advantage of the ‘XPathDocument factory code’ and the associated namespace routines in Songhay.Xml.XmlUtility. This is a brief introduction of the Songhay.Xml.XmlUtility. Going forward, certainly this topic will come up again as this “helper” class is fundamental to the Songhay System.

Selected Resources

UriTree Source Code The Visual Studio 2005 Project files.
kinté links The current UriTree XML set.
Songhay OPML 2.0 Schema The current schema behind the UriTree XML set.
OPML 2.0 (DRAFT) It is clear to me why Dave’s specification is not widely available as an XSD: many of his definitions go beyond the features available in XSD and would require the XPath assertions that emerge from Schematron or a similar enforcer like InfoPath.
W3C XML Schema Design Patterns: Dealing With Change Dare Obasanjo of Microsoft introduces the concept of ‘schema wildcards’ among others.
How to modify an external schema for an InfoPath form Schema wildcards are used to allow InfoPath to leverage the wonderful my: namespace. I thought this feature could be used with OPML 2.0 but I found out that you can’t mix attribute with anyAttribute without unexpected results in InfoPath.
Songhay OPML InfoPath Form A brave attempt.
What’s New in System.Xml MSDN details what’s new for XML-related features in the .NET Framework Developer’s Guide.
 
This document was last reviewed on Sunday, March 14, 2010 at 04:03 PM PDT.
Copyright© 2010 by Bryan D. Wilhite All rights reserved. No part of this material may be used or reproduced in any form or by any means, or stored in a database or retrieval system, without prior written permission of the publisher except in the case of brief quotations embodied in critical articles and reviews. Making copies of any part of this material for any purpose other than your own personal use is a violation of United States copyright laws.

The information provided by Bryan D. Wilhite at kintespace.com is provided “as is” without warranty of any kind. In no event shall Bryan D. Wilhite or any of his affiliates be liable for any damages whatsoever including, but not limited to, direct, indirect, incidental, consequential, loss of business profits or special damages due to material published by Bryan D. Wilhite or any of his affiliates.