Welcome!

Bill Green

Subscribe to Bill Green: eMailAlertsEmail Alerts
Get Bill Green via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


PowerBuilder: Article

Visual Expert v4.5x by Novalys

Visual Expert v4.5x by Novalys

Ever worked on an application you didn't write or that you wrote more than three months ago? Chances are most of us have, and we all face the same issues when looking to modify the code. What is this application doing? What is affected if I make changes to this object?

We're talking about impact analysis, of course, something we often don't do because it's simply too much work. Performing a thorough impact analysis on an object-oriented application would take several times longer than the change being requested. Should we do it? Of course. Any amount of time spent before making physical changes translates to a lower risk of problems appearing when the modified application goes into production. If only there was a tool that would do the time-consuming drudgework we all loathe, so we could make better decisions and get changes into production more quickly with less risk. Now there is.

Visual Expert, an analysis product from Novalys, will perform impact analysis for you, allowing you to see within minutes what the impact of a change might be. Have to change a DataWindow? A click on the analysis TreeView will show you all the objects the DataWindow is referenced in.

Visual Expert delivers powerful impact analysis capabilities, but it also does something else we often want to do - produce technical documentation on our system. The documentation capabilities are thorough, producing good-looking documents in either RTF or HTML format. This is very useful in getting new developers to understand the system; however, it's of less importance to me personally, as technical documents need to be constantly updated to provide any measurable benefit. Of course, if you are a third party developing for a client, then the added benefit is that of delivering comprehensive - and accurate - technical documentation of the system.

As a side benefit, Visual Expert will also perform some rules checking on the application's code. It's not touted as a code quality auditing tool, but it does provide some rudimentary rules-checking capabilities so you can quickly see whether objects meet naming convention standards, if references in objects are being used, and more.

Strengths
Visual Expert reads the objects in the PBLs that contain the application's source code. In PB7 and earlier, the objects are determined by the library list for the application; in PB8, that list comes from the specified target. The product is capable of analyzing a large application quickly. The example application I tested with is spread out over 62 PBLs and contains a lot of interreferenced code. I was able to easily navigate between the various views to determine what the impact would be on any object in my application. The main view was split over various categories, making it easier to pinpoint the starting point for the analysis, and the processing was fast and painless.

Impact Analysis
As shown in Figure 1, the main display is divided into three distinct areas. The navigation TreeView, a main detail display, and a secondary detail display that will show the actual code if needed.

On the main TreeView, a collection of top-level items gives you a route to take, and developers will quickly find the navigation intuitive and quite flexible. You can position on the window group, for example, and see all the windows in the application; right-mouse button options: a core group of reference-related components (the sidebar to the right of the TreeView) provides quick access to impact-analysis type of information about the object in question. The right-mouse button typically also offers a preview option that you can use to preview the object (and see what it would look like), and/or a locate option that will quickly show you which PBL the object is stored in. The display also indicates where duplicates might exist.

A quick click on any of the impact analysis options (shown in Figure 1 as Related Components) gives you an instant insight into the object. You can see its ancestry, any descendants, peek into the architecture of the object, and, as each option is selected, the TreeView expands with additional entries, each with an additional set of options.

Figure 2 shows that the object display can be expanded to show the details about an object, including which objects reside within it, e.g., User Objects and DataWindows, and optionally, show the hierarchical references as to where the object is being used. For example, when you select a DataWindow control, you'll see the DataWindow that's assigned to it. A simple right-click menu option will then show where that DataWindow might be referenced elsewhere in the application. Further selections will tell you which windows and which PBLs are involved. That's very powerful, yet quite simple, impact analysis.

Continuing the tracking trend, you can position on any object, and in the main detail view in the top right you can see all the attributes associated with an object.

When an item in the main detail is selected, the secondary detail window will change to show the details based on the selection; for example, selecting a function will display its code. All functions and objects are hyperlinked within the code view window and can be used to position to the referenced item, where you see a reference to an external object. Selecting this will change the display to that object and therefore allow further impact analysis to take place.

The last tab in the main detail view is development rules. Development rules include verifying naming conventions, determining variables that are unused, detecting scripts with no comments, and more. There's an optional component for Visual Expert that will allow you to capture more specific rules for your particular needs.

Documentation
Finally, we'll talk about the documentation capabilities. Choosing the menu option "Documentation Center" brings you to a dialog window to select the documentation options. You can set the parameters for the required documentation, then press run to create the documentation.

After making your selections and running the process, the output is generated in either RTF or HTML format. An example of the output is shown in Figure 3.

All in all, the tool is packed with features that allow you to perform a very detailed analysis of the application and its objects. The layout is generally very easy to use and adjust to, although it will take a short period of time to adjust to the type of data you can access.

Weaknesses
Having used other analysis tools in the past, I was pleasantly surprised to find that this tool has few weaknesses. One very obvious one is that the vendor, Novalys, is located in France, and every now and then it becomes apparent that the language translation has not been easy. These types of nuances are easy to overlook, however, when viewing the product as a whole.

Again, because the vendor is located in France, there's currently no local support. The product is fairly new though, and I expect this will change as demand grows.

As with any script-parsing tool, the product is subject to the inventive whims of programmers. References composed of string concatenations will not be made, for example, "d_" + "Status_log" or is_mydwname being used to set up a dynamic datastore can't be found. Regular string expressions, however, are detected, for example, is_myDWName="d_status_log".

The online help needs some work. In addition to not being detailed enough, many of the images used are out of focus, detracting from an obviously professional product.

A key that you have to obtain from the vendor controls installation. Taking into account the time zone difference between the U.S. and France, it may take 24 hours to obtain the keycode needed to unlock the product. I expect that this will also change as further support structures are put in place.

Conclusion
Given our propensity as developers to avoid any task that takes too much time, to avoid documentation at almost any cost, and to make changes to applications by relying on our testing practices to determine the impact, it's my opinion that Visual Expert would go a long way toward making many of our lives easier, and our jobs less risky.

This tool will help reduce the risk of change to any application, and provide a mechanism for accurate and up-to-date documentation of our applications. The tool should be a must-have on any software consultant's list, and can provide a significant benefit to any user of the product regardless of the developer's experience level with PowerBuilder.

More Stories By Bill Green

William (Bill) Green is a PowerBuilder developer with more than 10 years of PB experience. A charter member of TeamSybase, Bill is a cofounder of Power3 (www.power3.com), an enterprise training solutions provider based in Philadelphia. Bill has been a contributing author and coauthor of several PowerBuilder books, including PowerBuilder Foundation Class Library Professional Reference, and is a regular instructor at the Sybase user conferences.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.