download | donate | message

The XML DDR Query tool for FileMaker Pro is Fast

To begin...

What does the XML DDR Query tool do?

The DDR Query tool will let you answer questions, locate errors or determine object dependencies within your databases - fast!

The DDR Query tool allows you to delve into your FileMaker databases in a way that isn't possible using FileMaker's built in functions. It's primary distinguishing factor is that it is fast. Other excellent tools already exist. They are great tools and they aim to be complete but they take some time to load a DDR. I found that the initial load time prevented me from doing ad-hoc work which would really benefit from DDR analysis. My XML DDR Query tool will answer your questions in less than the time it takes to load a DDR into other tools.

The Catch-22 for a developer/manager of any system is that change becomes increasingly difficult as the system grows. Any change to any object is more likely to affect something else. Change has consequences! However, it takes a long time to load a large DDR into other tools. So, to speak personally, the bigger the system and the greater the need for good change management, the less likely I was to build and load a current DDR. It just takes up so much time!

I wanted to be able to handle large systems competently. I wanted to be able to dump the DDR to ask a single question without waiting an hour for it to be processed. I wanted quick answers. The XML DDR Query tool is my response to that need. Its not a 100% solution but it answers most of my questions, most of the time, in no time at all. It could help you too.

What doesn't the XML DDR Query tool do?

The XML DDR Query tool doesn't try to be comprehensive

I began writing this tool to allow me to explore the XML DDR produced by FileMaker Pro Advanced. My primary requirement for a DDR tool in my day-to-day work is to help me locate object dependencies. I wanted to know if an object is used? If, when and where. This tool does that fairly well.

Once I had it running I realised how handy it was and began to extend it. At a certain point I had to start asking questions about the type of functionality I wanted from it. How far should I go to provide a FileMaker XML DDR focussed productivity tool? For instance, did I want to be able to get complete, drill-down, cross-referenced display of layout objects? Of course I did! Did I need that often enough to warrant the after-hours development effort? Maybe...?

At that point I realised there was no need to emulate the feature sets of BaseElements or Inspector Pro. As a result, I decided that the XML DDR Query tool focus should be on productivity, not on completeness.

For completeness, there are good tools for XML analysis that provide the ability to perform advanced XQuery on the DDR and I was already using them. I already had BaseX in my toolkit. It provides XPath/XQuery search, text search and an array of visualisations. It isn't a specialised tool for FileMaker Pro DDR. It is a general XML tool and it is complete and it is free.

How is the XML DDR Query tool used?

Load your XML DDR

You load an XML DDR by copying it into the ddr folder. This may take a few seconds. You may then begin to explore it —immediately— using text searches or by browsing through the summary pages and the object catalogs.

Search and Explore

Explore: the DDR Query tool builds cross-links between objects whenever it makes sense to do that, so you can browse freely through the system.

Search: the search tool provides quick access to known objects. Use it when you already know the object that you want to locate.

Grand Summary

The grand summary presents the overview of all the files present in the DDR summary file. Click on any file name to see more detail for that file, including an summary of errors.

( FileMaker Pro Advanced 13.0v9 XML DDR produces a zero count on Privileges and Extended Privileges — ignore the number. )

Database Summary

The database summary displays top level database information and generates an error summary. In DDRs that handle one database, the top of the database detail page will appear to be much the same as the summary page. The difference is that the database summary provides extra details. You will see the summary of object reference errors and the File Options displayed. The summary of object reference errors is only displayed on the database detail page.

The reason that the database detail page loads slowly is because the object reference analysis is performed against the objects in every database. Be patient, a large solution may take up to 20 seconds to analyse. If your DDR is particularly large you may need to increase the execution time-out value for PHP. The default is 30 seconds. Particularly large databases may exceed memory because I've used the SimpleXML library and it's a hog.

Branching Out: Catalogs and Object References

Element Catalogs

Each of the main elements within the database is represented within the DDR by a catalog. The grand summary and the file summary provide a count of the number of elements in each catalog. Use the links to explore the catalog contents.

Dependencies

The analysis provides links between objects that reference or depend upon the other. In some places the link is called "Show Dependencies", in table column headings I chose the word "uses" as a short word with similar meaning. The dependency function searches the DDR for items which use the object. The objects paths are displayed in a hierarchical view for ease of recognition.

Example Usage: You need to know if you can safely change a script. Will other elements will be affected if you modify its behaviour?

Find out quickly. Locate the script using search by name or by browsing through grand summary -> scripts. Sort by script name. Select the "used by" link and you have a full description of that object’s dependencies.

Estimated time: under ten seconds.

Errors

One of the most common forms of damage to a solution is caused by deleting an object. When this occurs, the elements which referenced that object will display "missing", "unknown" or have empty attribute values. These objects are identified by the error report on the file summary page.

Follow the links to obtain list of the errors, in a hierarchical view of the object tree. The object tree leads you directly to the affected object. The path/tree of objects on layouts can be large. Walk your way through the tree, identifying each object as you go, until you arrive at the object you want to investigate.

If a file can’t be located when the DDR is being produced there may be very large numbers of missing objects. Try to locate the missing file and run the DDR again. If you use an old copy of the file for this purpose you'll reduce the sheer volume of missing object messages. If you do that you will have to be aware that you are working with an incomplete file object.

Locating Objects on the Layout

An object's position on the layout is described by bounds. The bounds of each object is given relative to the object containing it in the object tree. If you are doing pixel pushing in the layout design, the relative bounds may be exactly what you need. If you are trying to locate an object on an unfamiliar layout, you'll want to know where to find it.

I generate the top/left values as absolute references from {0,0} at the top left of the screen so you can go straight to that point. But remember that objects may be on a tab panel, a sliding panel or a pop-over button which has to be revealed before you'll see the object you are interested in.

It helps to know whether you're looking for something big or small, so I calculate and display the height and width of the object too.

Estimated time to locate objects: less than a minute

Little Things that Help

Table Sorting

Sorting information makes it meaningful and allows you to synthesise information more easily. The tables and lists are generated directly from the DDR without changing their sequence. That's important information because it describes the state of the database. However, it doesn’t have to stay that way. The sort order of the data in most of the tables can be changed by clicking on the header.

Example 1: Need to know which users are assigned to a privilege set?
Go to Summary->Accounts and click the header. Click once to sort A-Z, click a second time to reverse the sort. There they are - sorted together!

Estimated time: about two seconds.

Example 2: Need to take stock of your system?
Go to Summary->Base Tables. Double-click the records, fields and tables columns to see where the greatest resource use is occurring.

Estimated time: under five seconds.

Many of the tables use the first column to display a sequence number. Sorting on that column is effectively the same as "unsort."

Colors

Important elements are bold. Standard elements are black. Important information points are illustrated using red, yellow, blue and green. Inactive elements are grey.

Table Occurrences in the relationship graph may be color coded. The list of table occurrences and the list of relationships use the color data stored in the DDR to generate a small color swatch. This is a reminder of the color scheme used within the graph. The relationship graph uses tinted versions of these colors, so the colors swatches shown in your browser will be darker than the colors you see in the graph.

Bugs / Complaints?

You can contact me via the web site www.notyourhomework.net.

Need Help?

You can contact me via the web site www.notyourhomework.net.

Donations Welcome

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License.

If you find the program useful and you want to make a donation towards its development, please do so.