The present invention relates to a method and system for developing software. More particularly, the invention relates to a method and system for tracking changes made to source code, and displaying the source code with these changes.
Computer instructions are written in source code. Although a skilled programmer can understand source code to determine what the code is designed to accomplish, with highly complex software systems, a graphical representation or model of the source code is helpful to organize and visualize the structure and components of the system. Using models, the complex systems are easily identified, and the structural and behavioral patterns can be visualized and documented.
The well-known Unified Modeling Language (UML) is a general-purpose notational language for visualizing, specifying, constructing, and documenting complex software systems. UML is used to model systems ranging from business information systems to Web-based distributed systems, to real-time embedded systems. UML formalizes the notion that real-world objects are best modeled as self-contained entities that contain both data and functionality. UML is more clearly described in the following references, which are incorporated herein by reference: (1) Martin Fowler, UML Distilled Second Edition: Applying the Standard Object Modeling Language, Addison-Wesley (1999); (2) Booch, Rumbaugh, and Jacobson, The Unified Modeling Language User Guide, Addison-Wesley (1998); (3) Peter Coad, Jeff DeLuca, and Eric Lefebvre, Java Modeling in Color with UML: Enterprise Components and Process, Prentice Hall (1999); and (4) Peter Coad, Mark Mayfield, and Jonathan Kern, Java Design: Building Better Apps & Applets (2nd Ed.), Prentice Hall (1998).
As shown in
Methods and systems consistent with the present invention provide an improved software development tool which overcomes the limitations of conventional software development tools. The improved software development tool of the present invention allows a developer to track changes made to source code, and display the source code with these changes. Accordingly, the developer can recollect the modifications that were made to the source code during the development of the source code.
In accordance with methods consistent with the present invention, a method is provided in a data processing system for displaying versions of source code. Each version reflects an instance in an edit history. The method comprises the steps of storing indications of the edits to the source code, and displaying the versions of the source code with the indications of the edits.
In accordance with articles of manufacture consistent with the present invention, a computer-readable medium is provided. The computer-readable medium contains instructions for controlling a data processing system to perform a method. The data processing system has versions of source code. Each version reflects an instance in an edit history. The method comprises the steps of storing indications of the edits to the source code, and displaying the versions of the source code with the indications of the edits.
Other systems, methods, features and advantages of the invention will be or will become apparent to one with skill in the art upon examination of the following figures and detailed description. It is intended that all such additional systems, methods, features and advantages be included within this description, be within the scope of the invention, and be protected by the accompanying claims.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an implementation of the invention and, together with the description, serve to explain the advantages and principles of the invention. In the drawings,
Methods and systems consistent with the present invention provide an improved software development tool which displays versions of source code. Each version reflects an instance in an edit history, i.e., reflects the changes made to the source code.
As depicted in
The improved software development tool provides simultaneous round-trip engineering, i.e., the graphical representation 204 is synchronized with the textual representation 206. Thus, if a change is made to the source code 202 via the graphical representation 204, the textual representation 206 is updated automatically. Similarly, if a change is made to the source code 202 via the textual representation 206, the graphical representation 204 is updated to remain synchronized. There is no repository, no batch code generation, and no risk of losing code.
The data structure 300 of the language-neutral representation is depicted in
For example, the data structure 500 for the source code 400 depicted in
Although aspects of the present invention are described as being stored in memory, one skilled in the art will appreciate that these aspects can also be stored on or read from other types of computer-readable media, such as secondary storage devices, like hard disks, floppy disks or CD-ROM; or other forms of RAM or ROM either currently known or later developed.
IDE 708 is the API 702 needed to generate custom outputs based on information contained in a model. It is a read-only interface, i.e., the user can extract information from the model, but not change the model. IDE 708 provides the functionality related to the model's representation in IDE 708 and interaction with the user. Each package composing the IDE group has a description highlighting the areas of applicability of this concrete package.
RWI 710 enables the user to go deeper into the architecture. Using RWI 710, information can be extracted from and written to the models. RWI not only represents packages, classes and members, but it may also represent different diagrams (class diagrams, use case diagrams, sequence diagrams and others), links, notes, use cases, actors, states, etc.
SCI 712 is at the source code level, and allows the user to work with the source code almost independently of the language being used.
There are a variety of modules 704 in the software development tool 610 of the present invention. Some of the modules 704 access information to generate graphical and code documentation in custom formats, export to different file formats, or develop patterns. The software development tool also includes a quality assurance (QA) module which monitors the modifications to the source code and calculates the complexity metrics, i.e., the measurement of the program's performance or efficiency, to support quality assurance. The types of metrics calculated by the software development tool include basic metrics, cohesion metrics, complexity metrics, coupling metrics, Halstead metrics, inheritance metrics, maximum metrics, polymorphism metrics, and ratio metrics. Examples of these metrics with their respective definitions are identified in Tables 1–9 below.
The QA module also provides audits, i.e., the module checks for conformance to predefined or user-defined styles. The types of audits provided by the module include coding style, critical errors, declaration style, documentation, naming style, performance, possible errors and superfluous content. Examples of these audits with their respective definitions are identified in Tables 10–17 below.
If the QA module determines that the source code does not conform, an error message is provided to the developer. For example, as depicted in
The improved software development tool of the present invention is used to develop source code in a project. The project comprises a plurality of files and the source code of one of the plurality of files is written in a given language. The software development tool determines the language of the source code of the file, converts the source code from the language into a language-neutral representation, uses the language-neutral representation to textually display the source code of the file in the language, and uses the language-neutral representation to display a graphical representation of at least a portion of the project. The source code and the graphical representation are displayed simultaneously.
The improved software development tool of the present invention is also used to develop source code. The software development tool receives an indication of a selected language for the source code, creates a file to store the source code in the selected language, converts the source code from the selected language into a language-neutral representation, uses the language-neutral representation to display the source code of the file, and uses the language-neutral representation to display a graphical representation of the file. Again, the source code and the graphical representation are displayed simultaneously.
Moreover, if the source code in the file is modified, the modified source code and a graphical representation of at least a portion of the modified source code are displayed simultaneously. The QA module of the software development tool provides an error message if the modification does not conform to predefined or user-defined styles, as described above. The modification to the source code may be received from the display of the source code, the display of the graphical representation of the project, or via some other independent software to modify the code. The graphical representation of the project may be in Unified Modeling Language; however, one skilled in the art will recognize that other graphical representations of the source code may be displayed. Further, although the present invention is described and shown using the various views of the UML, one of ordinary skill in the art will recognize that other views may be displayed.
The software development tool is collectively broken into three views of the application: the static view, the dynamic view, and the functional view. The static view is modeled using the use-case and class diagrams. A use case diagram 1200, depicted in
The dynamic view is modeled using the sequence, collaboration and statechart diagrams. As depicted in
A statechart diagram 1600 is depicted in
The functional view can be represented by activity diagrams 1700 and more traditional descriptive narratives such as pseudocode and minispecifications. An activity diagram 1700 is depicted in
There is also a fourth view mingled with the static view called the architectural view. This view is modeled using package, component and deployment diagrams. Package diagrams show packages of classes and the dependencies among them. Component diagrams 1800, depicted in
Although discussed in terms of class diagrams, one skilled in the art will recognize that the software development tool of the present invention may support these and other graphical views.
The improved software development tool of the present invention is used to display versions of source code. Each version is an instance in an edit history. The software development tool determines a language of the source code, stores indications of the edits to the source code, converts the source code with the indications of the edits from the language into a language-neutral representation, uses the language-neutral representation to display the source code in the language with the indications of the edits, and uses the language-neutral representation to display the corresponding graphical representation of the source code with the indications of the edits. The rate at which the source code with the indications of the edits is displayed is adjustable. Moreover, the source code with the indications of the edits may be displayed sequentially or in reverse order.
The steps performed by the software development tool to sequentially display the source code with the edit history is depicted in
In the forward mode shown in
In the reverse mode depicted in
While various embodiments of the application have been described, it will be apparent to those of ordinary skill in the art that many more embodiments and implementations are possible that are within the scope of this invention. Accordingly, the invention is not to be restricted except in light of the attached claims and their equivalents.
The following identified U.S. patent applications are relied upon and are incorporated by reference in this application: U.S. Provisional Application No. 60/157,826, entitled “Visual Unified Modeling Language Development Tool,” filed on Oct. 5, 1999;U.S. Provisional Application No. 60/199,046, entitled “Software Development Tool,” filed on Apr. 21, 2000;U.S. patent application Ser. No. 09/680,063 entitled “Method And System For Developing Software,” and filed on the same date herewith;U.S. patent application Ser. No. 09/680,030 entitled “Method And System For Generating, Applying, And Defining A Pattern,” and filed on the same date herewith; andU.S. patent application Ser. No. 09/680,064 entitled “Method And System For Collapsing A Graphical Representation Of Related Elements,” and filed on the same date herewith.
Number | Name | Date | Kind |
---|---|---|---|
4558413 | Schmidt et al. | Dec 1985 | A |
4599692 | Tan et al. | Jul 1986 | A |
5428729 | Chang et al. | Jun 1995 | A |
5555410 | Tsuchiya | Sep 1996 | A |
5579469 | Pike | Nov 1996 | A |
5649200 | Leblang et al. | Jul 1997 | A |
5960196 | Carrier, III et al. | Sep 1999 | A |
6247020 | Minard | Jun 2001 | B1 |
6330008 | Razdow et al. | Dec 2001 | B1 |
6346945 | Mansurov et al. | Feb 2002 | B1 |
6493868 | DaSilva et al. | Dec 2002 | B1 |
20010011367 | Logan et al. | Aug 2001 | A1 |
20020049962 | Kelbaugh et al. | Apr 2002 | A1 |
Number | Date | Country |
---|---|---|
1 030 242 | Aug 2000 | EP |
1 030 252 | Aug 2000 | EP |
Number | Date | Country | |
---|---|---|---|
60157826 | Oct 1999 | US | |
60199046 | Apr 2000 | US |