UrlPlug: Browse The Universe!

White Paper
Suggest Features

Related Resources:
UrlPlug home-page at sourceforge.net simontuffs.com home-page licensing information contact us SourceForge.net home-page
Copyright P. Simon Tuffs, 2004. All Rights Reserved.Version 0.1.0

UrlPlug: Browse The Universe!

by P. Simon Tuffs, Software Architect and Consultant (www.simontuffs.com)

Introduction

Have you ever been in the middle of development using Eclipse and needed to pull in a document from the web? Have you ever opened an XML document and seen a DTD or XML Schema reference and had to fire up Internet Explorer(1) to go look at it? Then saved it to disk and imported it into your project? Have you ever been editing a web-page inside Eclipse and broken a link without knowing it?

If so, then you've already discovered that Eclipse just isn't integrated with the World Wide Web, something which is rather surprising in these web-centric times. You've also qualified yourself as a power-user who needs the capabilities of UrlPlug.

Install And Go

Point your Eclipse 3.0 Software Update Manager at http://www.simontuffs.com/url-plug/site, install the software, then enable the view if it doesn't show up in the bottom of the Eclipse workbench.


Fig.0: The Eclipse Installation Manager Fig.0: Enabling the View

Fig.0: Installing UrlPlug and Enabling the View

What is UrlPlug?

UrlPlug is a browser for the web, and beyond. It's not a conventional web-browser, it doesn't open and render a page by default: instead it builds a link-view for the document, and lets you navigate that view.

As always, an example is worth a thousand words. When you install UrlPlug and open its Eclipse view, this is what you see in the bottom window of Eclipse:


Fig.1: The Initial UrlPlug View

Fig.1: The Initial UrlPlug View

At this point, you enter a URL. UrlPlug currently understands the http://, jar: and file:// protocols, with the default being file:// if no protocol prefix is specified. Lets suppose that you're interested in browsing files on your own computer. The URL for that is "/":


Fig.2: Browsing Your Own Computer

Fig.2 : Browsing Your Own Computer

You'll note that this display is subtly different from the typical Navigator window in Eclipse. UrlPlug shows three basic kinds of resources:

So What's different? Notice that files have an open-icon next to them. UrlPlug can look inside regular files. What does it look for? Links. UrlPlug assumes that files can contain hypertext links to other documents.

Browsing Your File-System

Let's browse something in the file-system which demonstrates this. Fig.3 shows the UrlPlug view after opening a folder called OAGIS. OAGIS is a suite of standard XML Schema documents for business transactions. The path /OAGIS/8.1/BODs takes us down to a number of XML Schema documents, one of which is AcknowledgePurchaseOrder.xsd.


Fig.3: OAGIS, Documents With Hyperlinks

Fig.3: OAGIS, Documents With Hyperlinks

Inside AcknowledgePurchaseOrder.xsd there are two hyperlinks to file:// documents which are annotated with <xs:include>, indicating that they are XML Schema include directives.

Here is where the power of this browsing model becomes apparent. Suppose we want to see the content of those include files. Simply double-click on the URL's, and they are imported into the Eclipse workbench.


Fig.4: Opening A Document

Fig.4: Opening A Document.

Drilling Down

Of perhaps greater interest, though, is the fact that you can drill down into the include files, and that they in turn contain include files, and so on. In fact, the schema for an OAGIS Business Objects Document (BOD document) is extremely deep, as the following figure shows:


Fig.5: Drilling Down

Fig.5: Drilling Down.

Notice that documents without a URL prefix have the same root as their parent document. When a terminal document (one which contains no further links) is reached, it is assigned a new terminal-file icon: .

Browsing the Internet

While browsing your filesystem this way may be useful, it's not revolutionary. The following, however, may be. Pick a document in your filesystem which will be published as a web-page on the Internet. For example, the header file for this document (a nice bootstrap demonstration don't you think?).


Fig.6: Drilling Out

Fig.6: Drilling Out.

This links to various locations on the web, using http:// URL's one of which is the SourceForge.net site for the UrlPlug project. This in turn contains a DTD (annotated as <!doctype>) and then a number of links to advertising links (which appear across the top of the SourceForge.net web-sites).

Cycles

If you follow links for long enough, eventually, you will run around in a circle. UrlPlug indicates this with a special icon: .

And finally...

For a bit of fun, try browsing the following three web-sites using UrlPlug. You may find it very informative.


Fig.7: Comparisons

Fig.7: Comparisons

The difference in style, and underlying philosophy, is striking. Stay away from www.microsoft.com, something they are rendering currently crashes UrlPlug.


(1)Internet Explorer is a registered trademark of Microsoft Corporation.


If you like UrlPlug then you might want to check out some of the other Open-Source projects developed by simontuffs.com:
Look Inside Your Jar Files Deliver Your Java Application in One-JAR XML Instance Generator Java Network Benchmark Customer Driven Design simontuffs.com