Tuesday 15 March 2011

Maestro 3.0: A comprehensive walkthrough (part 1)

As I promised, this is the first part of many posts on showing the many new features of Maestro 3.0.

The Main Application Window

So after you login in, here's what you get:


Look familiar? Yes, the overall UI design is modelled on FDO Toolbox. In fact, Maestro uses a more-refined version of the same extensible foundation and design concepts used by FDO Toolbox. If something works for you, why change it? :)

Originally, I also wanted to use the same DockPanel library as I did in FDO Toolbox, but having found out that the library is riddled with P/Invokes into the Win32 API, it was instantly unsuitable for my needs because getting this thing to work in Mono is a fundamental requirement.

So after failing to find a portable alternative, and the vanilla winforms TabControl being woefully inadequate (no close buttons on tabs???? c'mon!) I had no choice but to roll my own. The end result is quite acceptable:



And, the whole reason for doing this, here's how it looks on Linux (I'm using a VM of the OSGeo Live DVD, which comes with Mono 2.4)

Aside from some visual bugs due to Mono's implementation of WinForms, the two are essentially visually and functionally identical. Mission accomplished!

Now what's this thing at the bottom?



One of my design goals of FDO Toolbox and Maestro 3.0 is for the application to be as transparent as possible, you should be able to have a good guess at what is happening behind the scenes as you do anything. Thus if something goes wrong, you should have a good log of what had happened.

The Outbound Requests view lets you see all the outbound http requests that Maestro is making to the mapagent endpoint. It's a very useful diagnostic tool. The Messages tab displays any other diagnostic or debugging messages that Maestro may show.

The Site Explorer.

In the previous version of Maestro, the Site Explorer was based on the standard TreeView component. Though it is mostly functional for our needs it had one very annoying limitation: You could only select one item at a time.

For this version of Maestro, the Site Explorer is now based on the TreeViewAdv control. The TreeViewAdv gives us the the multi-selection that we desire and works in Mono (there's Win32 P/Invokes, but they are only used for profiling performance and not in the main code). So win win!

So with multi-selection now available to us, it means we can have different context menus for different selection scenarios. Here's the current context menu for a single selected resource



If you're wondering what Repoint this resource does, it's a feature suggested by Jason Birch which lets you specify all resources referencing the current resource, to reference another resource of your choice instead.

If we selected multiple resources, we get something different.


If you're wondering what Migrate Resources does, it's another feature suggested by Jason which lets you move or copy the selected resources to another MapGuide Server. This function currently doesn't handle resource version compatibility when moving/copying to an older MapGuide Server. It will naively assume the target MapGuide Server supports the versions of the resources you are moving/copying over.

As you can see, this is an untapped design space that has been made open as a result of being able to select multiple items at once. Expect more time-saving commands in future releases as a result.

While we're on the time-saving front, the Site Explorer also supports drag and drop of many different items. Here's some of the things you can drag and drop in Maestro 3.0:
  • Drag and drop a SDF file to create a SDF feature source at the location you dropped the file. The file is embedded into the feature source.
  • Drag and drop a SHP file to create a SHP feature source at the location you dropped the file. Any related files will also be brought in. The files are embedded into the feature source.
  • Drag and drop a SQLite file to create a SQLite feature source at the location you dropped the file. The file is embedded into the feature source.
  • Drag and drop a MGP file to load the package.
  • Drag and drop a XML file to create a resource (based on the content of the XML file) at the location you dropped the file.
Applying the Unix Philosophy

The Unix Philosophy can be summarised as: Write programs that do one thing, and do it well.

Though Maestro is primarily an authoring application for MapGuide, it's core can be re-used and re-purposed for many specialized needs due to the vast array of functionality and services exposed by the MapGuide Server. You have already seen this in action in the previous version with the MgCooker tile generator. We have taken this approach further in this version with a whole bunch of little specialized tools:

The Feature Source Preview Tool

Use this to do FDO Toolbox style data queries on any MapGuide Feature Source



The MapGuide Server Monitor

Use this to observe the current Server statistics as reported by the MapGuide Server



The Feature Source Cache Viewer

Use this to view the state of the Feature Source cache, and find out what connections are currently in use.


All these tools (including MgCooker) are available under the Tools application menu.

That's all for part 1. Stay tuned for part 2!

1 comment:

rpsj said...

Extremely impressive Mr Chan!

I'll have to install this on my new laptop and get back into it.

cheers,
SeanT