1. Technical Field
The present invention relates to data processing and, in particular, to diagramming and application design. Still more particularly, the present invention provides a method, apparatus, and program for application design based on diagram specialization.
2. Description of Related Art
Diagrams may be used to represent organizational layouts, data flow, and other relationships. A typical diagram, or graph, consists of nodes and interconnecting lines, referred to as “edges.” For example, it is often very useful to diagram the design or implementation of a software application in terms of nodes and edges, each with arbitrary properties, that represent the control flow of the software application components. As a more specific example, a diagram of a Java 2 Platform, Enterprise Edition (J2EE) based Web application might consist of nodes, which represent the JavaServer Pages (JSP) and top-level business logic, and edges, which represent the top-level application control flow. Some vendors offer software development tools that support this kind of application diagramming. The Web Diagram Editor in International Business Machine's WebSphere Studio v5.0 (and later) is one such tool.
In some cases, one needs to design or develop multiple variations of an application for various different execution contexts. For example, if one were to design a Web application that targets various models of Web-capable cell phones and/or personal digital assistants, one might need a somewhat different variant of the application for each device type (or category of device type) due to screen size differences or other device differences. As another example, if one were to design a Web-based online banking application that is to serve users in multiple political/governmental jurisdictions (locales) with different banking regulations, a different variant of the application may be needed for each locale. For each variant of a software application, the diagram may have somewhat different sets of nodes and edges. Each of these kinds of contexts for which one might want to develop a set of application variants can be though of as a “dimension of variability”. The variants are typically very similar. In other words, most of the nodes and edges may be the same in all of the variants with only a relatively small subset of the nodes and/or edges being different in any particular variant.
Currently available diagramming tools are inadequate for this kind of situation. For example, when using a diagramming tool to design a software application with variants, a developer may create and maintain a single diagram to represent the union of all the application variants. This may result in a large, unwieldy diagram that is cluttered with the details of the differences between the underlying variants, obfuscating the overall, largely common application flow. Typically, a designer may want to subdivide such an overly large diagram into multiple, non-overlapping (i.e., disjoint) diagrams. However, this means sacrificing the ability to see all of the detail of the underlying common application flow in a single diagram. Also, the “dimension of variability” is lost or is at least very hard to see and is spread across the multiple diagrams. With multiple levels of variability, for example, arbitrarily deep subcategories of devices or sub-locales, the situation becomes even more difficult.
Alternatively, when using a diagramming tool to design a software application with variants, a developer may create and maintain multiple diagrams, one for each application variant. Of course, this means that the nodes and edges that are common to the multiple application variants are duplicated in each variant. This makes it difficult and error prone when changes are made to the application, because the designer must make the same change to every diagram when a common component is modified. When multiple levels of variability is desired, the number of diagrams may escalate to an unmanageable level.
The present invention recognizes the disadvantages of the prior art and provides a diagramming tool that allows a diagram to be defined, specified, and stored as a specialization of a “parent” diagram. The “child” diagram is defined based on the “parent” diagram such that the child diagram references the parent and contains only nodes and edges which represent differences between the instant diagram and its parent diagram. Conceptually and semantically, a diagram inherits all of the nodes and edges, and their properties, of its parent and adds, deletes, or redefines the nodes and/or edges that represent the differences or specializations.
The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as a preferred mode of use, further objectives and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:
The present invention provides a method, apparatus and computer program product for application design based on diagram specialization. The data processing device may be a stand-alone computing device or may be a distributed data processing system in which multiple computing devices are utilized to perform various aspects of the present invention. Therefore, the following
With reference now to the figures and in particular with reference to
Computer 100 can be implemented using any suitable computer, such as an IBM eServer computer or IntelliStation computer, which are products of International Business Machines Corporation, located in Armonk, N.Y. Although the depicted representation shows a computer, other embodiments of the present invention may be implemented in other types of data processing systems, such as a network computer. Computer 100 also preferably includes a graphical user interface (GUI) that may be implemented by means of systems software residing in computer readable media in operation within computer 100.
With reference now to
In the depicted example, local area network (LAN) adapter 212, audio adapter 216, keyboard and mouse adapter 220, modem 222, read only memory (ROM) 224, hard disk drive (HDD) 226, CD-ROM driver 230, universal serial bus (USB) ports and other communications ports 232, and PCI/PCIe devices 234 may be connected to ICH 210. PCI/PCIe devices may include, for example, Ethernet adapters, add-in cards, PC cards for notebook computers, etc. PCI uses a cardbus controller, while PCIe does not. ROM 224 may be, for example, a flash binary input/output system (BIOS). Hard disk drive 226 and CD-ROM drive 230 may use, for example, an integrated drive electronics (IDE) or serial advanced technology attachment (SATA) interface. A super I/O (SIO) device 236 may be connected to ICH 210.
An operating system runs on processor 202 and is used to coordinate and provide control of various components within data processing system 200 in
Those of ordinary skill in the art will appreciate that the hardware in
For example, data processing system 200 may be a personal digital assistant (PDA), which is configured with flash memory to provide non-volatile memory for storing operating system files and/or user-generated data. The depicted example in
As mentioned above, the present invention provides a diagramming tool that allows a diagram to be defined, represented, or specified as a specialization of a “parent” diagram. The “child” diagram is defined based on the “parent” diagram such that the child diagram references the parent and specifies only nodes and edges which represent differences between the instant diagram and its parent diagram. A diagram inherits all of the nodes and edges, and their properties, of its parent and adds, deletes, or redefines the nodes and/or edges that represent the differences or specializations. Note that a parent diagram may itself be the child of another diagram. Also, a child diagram may itself be the parent of one or more other diagrams. Therefore, the diagram inheritance structure forms a hierarchy, or tree structure, of arbitrary depth, size and complexity.
A user may view a parent diagram, for example one of the diagrams in diagram hierarchy 312, and view the diagram using display 304. The user may then create specializations by adding, deleting, or redefining nodes and/or edges using input device 302. Diagram specialization 322 may then be generated as a reference to a parent diagram and definitions of those nodes that are added, deleted, or redefined in the specialization. Diagram specialization 322 may then be stored in diagram hierarchy 312. Diagram specialization 322 inherits all of the nodes and edges, and their properties, of its parent and adds, deletes, or redefines the nodes and/or edges that represent the differences or specializations.
Diagramming tool 310 also allows a user to navigate diagram hierarchy 312 using input device 302 and display 304. Common nodes and edges between a diagram specialization and those of its parent may be displayed in a first format while added nodes and edges are displayed in a second format, deleted nodes and edges are displayed in a third format, and redefined nodes and edges are displayed in a fourth format. In other words, the specializations may be highlighted in a diagram while the common or inherited nodes and edges are presented to illustrate the dimension of variability. The user may also easily navigate from one level of the diagram hierarchy to another to view multiple levels of variability.
Diagramming tool 310 may be software running on a computer, such as data processing system 200 in
Turning to
Clients 370 may be, for example, a personal computer or network computer. In the depicted example, server 350 provides diagramming tool application 360 to client 370. Clients 370 is a client to server 350. The client server architecture may include additional servers, clients, and other devices not shown.
In the depicted example, the client server architecture may be the Internet with network 352 representing a worldwide collection of networks and gateways that use the Transmission Control Protocol/Internet Protocol (TCP/IP) suite of protocols to communicate with one another. At the heart of the Internet is a backbone of high-speed data communication lines between major nodes or host computers, consisting of thousands of commercial, government, educational and other computer systems that route data and messages. Of course, the client/server architecture also may be implemented as a number of different types of networks, such as for example, an intranet, a local area network (LAN), or a wide area network (WAN).
Diagramming tool 360 allows a user to define a diagram as a specialization of a parent diagram. Diagram hierarchy 362 is thus created, wherein a given diagram may refer to a parent diagram and contain only nodes and edges which represent differences between the instant diagram and its parent diagram. A user may view a parent diagram, for example one of the diagrams in diagram hierarchy 362, and view the diagram using display 374. The user may then create specializations by adding, deleting, or redefining nodes and/or edges using input device 372. Diagramming tool 360 also allows a user to navigate diagram hierarchy 362 using input device 372 and display 374.
In the example shown in
Edges represent interconnection and application control flow and/or data flow between nodes. Each edge has an “id” attribute which uniquely identifies the edge. Each edge also has a “source” and “target” attribute, which specify the IDs of its source and target nodes, respectively.
Diagram display area 520 presents a diagram that is selected in navigation area 510, in this case Diagram1522. In the illustrated example, Diagram1 is a specialization of Diagram0 shown in
In the example shown in
In the example shown in
Responsive to a user selection of the “View” menu in menu bar 602, a “View” menu drops down from the menu bar. The “View” menu may include, without limitation, a “Show Differences” option 604. A user may select the “View” menu in menu bar 602 and “Show Differences” option 604 using, for example, mouse pointer 606. Responsive to selection of a “Show Differences” option, the diagramming tool presents the diagram specialization with added, deleted, and redefined nodes and edges highlighted.
Similarly, edges that are redefined, such as edge 626, are presented in a particular format, while edges that are added, such as edge 628, are presented in a different format. Edges that are deleted (not shown in this example) may be presented in yet another format. The diagramming tool may also present ghost edges, such as edge 630, to show previous interconnection to deleted nodes.
Returning to step 752, if the diagram does not refer to a parent diagram, i.e., the diagram does not have a parent, the process forms the diagram from the definitions in the diagram representation (step 760). After forming the diagram in step 758 or step 760, a determination is made as to whether the user wishes to show differences (step 762). If the user wishes to show differences, the process displays the diagram with highlighted differences (step 764) and ends. However, if the user does not wish to show differences in step 762, the process displays the diagram without highlighted differences (step 766) and ends.
Thus, the present invention solves the disadvantages of the prior art by providing a diagramming tool that allows a diagram to be defined as a specialization of a “parent” diagram. The “child” diagram is defined based on the “parent” diagram such that the child diagram references the parent and contains only nodes and edges which represent differences between the instant diagram and its parent diagram. A diagram inherits all of the nodes and edges, and their properties, of its parent and adds, deletes, or redefines the nodes and/or edges that represent the differences or specializations. The parent diagram may itself be the child of another diagram. Also, a child diagram may itself be the parent of one or more other diagrams. Therefore, the diagram inheritance structure forms a hierarchy, or tree structure, of arbitrary depth, size and complexity. The specializations may be highlighted in a diagram while the common (inherited) nodes and edges are presented in such ways as to illustrate or highlight the differences. The user may also easily navigate from one diagram in the diagram hierarchy to another diagram to view any specific diagram.
The technique for diagram specialization of the present invention may be applied more generally to any diagramming tool that deals with graphs, or, more generally, hypergraphs, even outside the domain of application design and development. Diagram specialization may also be applied more generally to diagrams that consist of diagram elements other than, or in addition to, nodes and edges. For example, diagram specialization may be applied to a JSP editor to support defining a specialization of a JSP based on another JSP.
It is important to note that while the present invention has been described in the context of a fully functioning data processing system, those of ordinary skill in the art will appreciate that the processes of the present invention are capable of being distributed in the form of a computer readable medium of instructions and a variety of forms and that the present invention applies equally regardless of the particular type of signal bearing media actually used to carry out the distribution. Examples of computer readable media include recordable-type media, such as a floppy disk, a hard disk drive, a RAM, CD-ROMs, DVD-ROMs, and transmission-type media, such as digital and analog communications links, wired or wireless communications links using transmission forms, such as, for example, radio frequency and light wave transmissions. The computer readable media may take the form of coded formats that are decoded for actual use in a particular data processing system.
The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiment was chosen and described in order to best explain the principles of the invention, the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.