IBM® is a registered trademark of International Business Machines Corporation, Armonk, N.Y., U.S.A. Other names used herein may be registered trademarks, trademarks or product names of International Business Machines Corporation or other companies.
This invention relates to legacy software applications, and particularly to genetically visualizing and navigating extendible application models for legacy software applications in a unified diagram.
There are many “legacy” software applications that are utilized by businesses. These applications tend to be large, monolithic in structure, and lacking in documentation. The first step in maintaining and reusing these applications is to understand their architecture. Generating models and using graphical diagram tools to visualize application structure can be an effective way to help in understanding the applications.
However, it is expected that, for many legacy applications, these generated models will be quite large, consisting of thousands of nodes and connections. In this situation, user interface complexity becomes a big issue. For example, how should the model be displayed such that it provides meaningful information to the user and is easily navigable, without overwhelming the user with large volumes of information and user interface (UI) complexity. This becomes more of an issue in the modern Integrated Development Environment (IDE) which divides the screen window into many small views.
The traditional approach in commercial IDEs to display a large model is to provide filtering capability on top of the model to either include or exclude a subset of the model in the UI. Usually, this takes the form of the user specifying a name or attribute filter that is compared to each artifact. This can be useful if the artifacts follow a standard naming convention, but is ineffective if a name pattern cannot be derived that filters only the artifacts the user is interested in. Another drawback to such filtering is that connections between artifacts that are showing and artifacts that are filtered out are not shown. This forces the user to make a trade-off between a simpler UI and a loss of information being shown.
The traditional approach to displaying models that contain multiple levels of detail is to have the user specify which level of detail the user wants to see and only show details for that level. This is usually accomplished by providing a menu option to select the level of details. There are a couple drawbacks to this approach. First, the lower levels of detail may have thousands of nodes and connections and may contain so much information that the user and the UI hardware are both overwhelmed. Second, the approach described above causes each artifact type to determine how many levels of details are available, so some artifact types may have only two levels of details while others may have five. However, the user may want to see the second level of details for some artifacts, the third level of details for some artifacts, and the fourth level of details for others.
A second approach, the full-zoom approach, may reveal different level of details in datasets according to the zoom level chosen by user, i.e., the full-zoom approach provides details only on a current zoom level without higher level data. The problem is that the user does not have enough context when the user is zoomed in.
A third approach is to show details for the part that the user selected while showing less detail for other parts of the structure. The third approach uses a degree of interest function to decide which part should be shown in details.
The second and third approaches, however, do not define a unified semantic model which can be visualized consistently across different types of input to the modeling tool. In order to apply the second and third approaches, the diagram user interface developer has to understand the particular application and apply the approach case by case which is tedious and inefficient.
It would be desirable to have an approach which generically and effectively navigates very large extensible application models in an IDE, which would greatly improve the usability of the diagram tool, and which would make it easy for an IDE tool developer to build the navigation function generically.
In accordance with an exemplary embodiment, a method of incrementally visualizing graphical extensible models for legacy software applications via a user interface is provided. A model for a legacy software application is generated, and the model includes artifacts having relationships to one another. Direct connections for the relationships between top level artifacts in the model are displayed in a top level diagram.
Expansion icons for the top level artifacts that contain lower level artifacts are provided, and the expansion icons for the top level artifacts containing lower level artifacts may be selected to drill down to the lower level artifacts. The lower level artifacts are scanned to determine inferred relationships between the top level artifacts and other top level artifacts.
Direct connections for the inferred relationships between the top level artifacts to the other top level artifacts are displayed in the top level diagram, without having to select the expansion icons. Direct connections are displayed for relationships between the lower level artifacts in the lower level diagram, and the lower level diagram is displayed in response to the expansion icons being selected for the top level artifacts having the lower levels. After expansion, the direct connections for inferred relationships between the top level artifacts continue to be displayed, but the source and target endpoints are updated to point to the lower level artifacts in which the inferred relationships are computed from. The direct connections for explicit relationships between the top level artifacts continue to be displayed without change. The top level artifacts are displayed with the lower level artifacts.
A computer program product, tangibly embodied on a computer readable medium, for providing graphical extensible models for legacy software applications via a user interface. The computer program product includes instructions for causing a computer to execute the above-described method.
Additional features and advantages are realized through the techniques of the present invention. Other embodiments and aspects of the invention are described in detail herein and are considered a part of the claimed invention. For a better understanding of the invention with advantages and features, refer to the description and to the drawings.
The subject matter which is regarded as the invention is particularly pointed out and distinctly claimed in the claims at the conclusion of the specification. The foregoing and other objects, features, and advantages of the invention are apparent from the following detailed description taken in conjunction with the accompanying drawings in which:
The detailed description explains the preferred embodiments of the invention, together with advantages and features, by way of example with reference to the drawings.
An exemplary embodiment address two sub-problems which include how to display only the subset of information that the user is specifically interested in, and how to generically visualize a model that contains multiple levels of detail to help the navigation (or hierarchical data).
The model in the exemplary embodiment illustrates a framework and method for building and displaying a unified model of a software application that uses multiple artifact types. At the highest level, the framework consists of a model definition and collectors. The model comprises generic, high level constructs, such as “artifacts” and “relationships” between artifacts. Although the generic model may be extended with artifact specific models, the model is not meant to be limited to artifact specific models. Extensions of the model may be provided by tool writers and plugged into the generic model. Extensions may provide additional artifact types, relationships, and details about the artifact types. The collectors populate the model with information about development and runtime artifacts used by the application and relationships between those artifacts. Multiple collectors may be used to populate a single model instance.
In accordance with the exemplary embodiment, the model is extensible, and multiple levels of details are contained in the hierarchy structure. As non-limiting examples, consider a source file written in a procedural programming language in which, at the highest level, there is an artifact in the model to represent the source file. At the next lower level of details, each procedure in the source file could be stored, and at the lowest level of details a flow chart could be stored for each procedure. This may be illustrated as follows:
Level 1: Source file artifacts
In the exemplary embodiment, the graphical diagram may display the model graphically with each artifact in the model rendered as a node and relationships rendered as connections between nodes. Each artifact type can control how its user interface (UI) is rendered, and connections can take different forms such as solid or dashed lines.
As discussed herein, the exemplary embodiment describes a generic way to visualize the unified hierarchical model of a legacy software application which may address the sub-problems described above in, e.g., a single solution. The exemplary embodiment may provide the user with a functional zoom capability to display and navigate the underlying application model. The exemplary embodiment allows any model to be plugged in for a specific layer of artifacts and applies functional zoom on top of the model. Each nested layer could be its own modeling language, unrelated to layers above and below. Because the model is extendible and different third party tooling can be applied to contribute to the model and specify how to visualize the model, the exemplary embodiment provides a general way to display the extendible model. Moreover, the model allows each layer's visualization to be customized.
Turning now to the drawings in greater detail, it will be seen that
The model may visually contain inferred relationships and explicit relationships between artifacts. Because of the nested, hierarchical nature of the model, relationships between higher level artifacts can be inferred from explicit relationships between lower level artifacts. When the node (having an expansion icon) is expanded, any connections (inferred from lower level relationships) that previously connected to the higher level artifact are updated to connect to the appropriate artifact in the lower level details, and any connections whose target or source is the higher level artifact continue to point to the higher level artifact at 130.
In accordance with the exemplary embodiment, the user gains much better control over the UI. The user may start with a very high level picture of the model and then drill down on the parts that the user is interested in. Meanwhile, the other surrounding artifacts are still shown at their highest level and all relationships are still visible.
On demand loading is provided in the exemplary embodiment. As a non-limiting example, if the model were large enough that it was infeasible to completely populate up-front, the exemplary embodiment would allow for only the highest level artifacts to be initially added to the model and for the “sub-model” of each artifact to be loaded as required (i.e., when the user expands to see the details of the artifact, the sub-model is loaded). In the exemplary embodiment, the initial build and display of the model may be faster while the relationships between higher level artifacts that are inferred from lower level details of the artifacts are not shown. Furthermore, the details for what is shown when an artifact is expanded could be determined at runtime. When the user expands an artifact, the user may be prompted with a list of options of the type of information that the user may like populated into the model and displayed. As such, when the user expands an artifact, if there are two or more models for the next lower level, the exemplary embodiment allows the user to choose which model to display. For example, when expanding a procedure that may be in the source file, the user may be given the option of viewing either a flow chart or data flow diagram for the procedure.
Moreover, the exemplary embodiment is not restricted to any specific legacy application and provides a general approach to visualize an extensible application model which can be extracted from many different legacy applications.
In accordance with the exemplary embodiment, using the incremental viewing as described herein, a diagram may start by displaying only top level details. The attributes of the top level artifacts and relationships (either explicit or inferred) at the top level are drawn in canvas. The user may choose the nodes that the user interested in and expand these nodes. When the nodes are expanded, the details from lower levels are drawn, and the un-selected node(s) remains unchanged.
As non-limiting examples, two exemplary processes (e.g., algorithms) may be used for drawing the diagram on a canvas. The term canvas is used to represent the area of the UI device where the diagram will be visually rendered, which may be understood within the context of an editor or window. The term draw is used to represent the programmatic steps of visually rendering a graphic on the canvas.
First, an exemplary process for drawing the initial diagram is provided below, which may be used when a model is first displayed:
for each top level artifact in the model
for each direct connection between top level artifacts in the model
for each top level artifact in the model
Second, an exemplary process for expanding an artifact (e.g., a node) is provided below, in which may be used when the user expands an artifact that contains lower level details:
One implementation of the above first and second non-limiting examples of exemplary processes is to build on top of Eclipse Graphical Editing Framework (GEF). When the diagram is initially presented, GEF EditParts (the control classes of model node visual representation) and ConnectionEditParts (control class of model relationship visual representation) are created for top level model elements and relationships among them. When the user expands the diagram, the corresponding EditParts and ConnectionEditParts are created, and as a result, the lower levels of model details are displayed.
In the diagram 200, the highest level artifacts include three source files src_a.rpgle 210, src_b.rpgle 220, and src_c.rpgle 230, two database tables table 1 and table 2, a database view view A, and a message queue msg_queue_1.
The source files src_b.rpgle 220 and src_c.rpgle 230 have both been expanded to show lower level details. As non-limiting examples, a call graph may be used for the procedures contained inside the source files src_b.rpgle 220 and src_c.rpgle 230. The source file src_b.rpgle 220 includes procedures proc_c1, proc_c2, and proc_c3, and the source file src_c.rpgle 230 includes procedures proc_c4 and proc_c5. The procedure proc_c2 within src_c.rpgle 220 has been expanded to display the lower level details (e.g., a flow chart of the source code inside of the procedure proc_c2) of the procedure proc_c2. In accordance with the exemplary embodiment, various connections to nodes may be illustrated in the diagram 200. It is understood, that the depictions illustrated in the diagram 200 are only for explanatory purposes and are not meant to be limiting.
As non-limiting examples, the exemplary embodiment may be implemented in a device (e.g., general purpose computer) which includes a processor executing computer program code stored on a storage medium in order to perform the processes described herein. The device may include or may be operatively coupled to a display screen. It is understood that other processor-based devices (e.g., servers) may implement the exemplary process described herein.
As discussed herein, an inferred relationship is a relationship not explicitly defined in higher level container artifacts but computed from the relationships defined at lower levels. For example, within the flow chart model, there could be a call to an external procedure defined in a different source file which would be modeled as a relationship between that node in the source flow chart and the start of the flow chart inside of the called procedure. This direct relationship implies that there is an implicit “calls” relationship between the two procedures stored in the model at the next higher level of details, which in turn implies a dependency relationship between the two source files. If the runtime artifacts (e.g., programs and libraries) are included in the model then there will also be at least one direct relationship between each source file and its compiled program or library object.
The capabilities of the present invention can be implemented in software, firmware, hardware or some combination thereof.
As one example, one or more aspects of the present invention can be included in an article of manufacture (e.g., one or more computer program products) having, for instance, computer usable media. The media has embodied therein, for instance, computer readable program code means for providing and facilitating the capabilities of the present invention. The article of manufacture can be included as a part of a computer system or sold separately.
Additionally, at least one program storage device readable by a machine, tangibly embodying at least one program of instructions executable by the machine to perform the capabilities of the present invention can be provided.
The flow diagrams depicted herein are just examples. There may be many variations to these diagrams or the steps (or operations) described therein without departing from the spirit of the invention. For instance, the steps may be performed in a differing order, or steps may be added, deleted or modified. All of these variations are considered a part of the claimed invention.
While the exemplary embodiment to the invention has been described, it will be understood that those skilled in the art, both now and in the future, may make various improvements and enhancements which fall within the scope of the claims which follow. These claims should be construed to maintain the proper protection for the invention first described.