MaintainJ 3.2 Released With Multiple Enhancements
MaintainJ, a reverse engineering tools that provides runtime sequence and class diagrams for Java codebases, has released version 3.2 with multiple enchancements. MaintainJ is Eclipse-based and works on any IDE that is built on Eclipse platform.
InfoQ had a small Q&A with Choudary Kothapalli from MaintainJ Inc. about this new development:
InfoQ: What are the main new features that landed in v3.2?
- Shows call context: In the sequence diagram when the mouse is hovered over a call, the tooltip shows the call context - the call argument and the return value. A more detailed view of the same along with the state of the called object is shown in the 'Properties View'.
- Displays runtime SQL - MaintainJ captures the actual runtime SQL statements going to the database with parameters populated regardless of the JDBC framework used. These database calls are shown in the sequence diagram along with the response time for each database hit.
- Supports multi-JVM applications - Users can trace applications running on multiple JVMs and see the end-to-end call flow in a single sequence diagram. For example, when an application calls a web service running in a different JVM, the call flow across JVMs is shown in a single sequence diagram. The calls in each JVM can be seen in a different color on the same diagram.
- Enhanced Outline View - The sequence diagram's 'Outline View' shows all the classes and calls in the use case. It is enhanced to select and delete multiple packages, classes or calls at one go. An option to filter out all getter and setter methods has been added to the sequence diagram.
- JSP calls - The calls to JSP(s) in a use case are shown in the sequence diagrams. If one JSP includes multiple JSPs, the runtime calls to the inner JSPs are displayed as well.
The above features are demonstrated using Alfresco, a Content Management System with 8000 Java classes and 600 XML configuration files. Alfresco runs on Tomcat and MySQL and uses Spring and Hibernate in addition to many other Java frameworks. Please check the demo video (3.5 minutes).
InfoQ: What is a typical workflow that you see people using with MaintainJ?
There are mainly two scenarios where MaintainJ is used.
1. To understand and debug applications
MaintainJ generates sequence and class diagrams for a single use case. The sequence diagram shows the concrete runtime classes for that use case along with the calls made including any SQL calls. Developers use the generated diagrams to quickly understand the use case and to find the source of defects.
Let's illustrate with a couple of examples:
One of our clients uses MaintainJ on a Swing application with a lot of event driven logic, which would be very difficult to understand by plain code reading.
Many of our clients use MaintainJ on J2EE applications. Very often the business logic in J2EE applications is distributed between Java classes, XML files, portal and rule engine configurations, etc. It takes days to understand the runtime interactions for a particular use case in such applications. MaintainJ is used to drastically cut down application analysis time and to save effort in debugging and enhancing complex applications of this kind.
2. To document Java applications
Let's illustrate with a couple of examples:
At a large US bank, a Java team was asked to enhance a legacy application which had scant documentation. The team used MaintainJ to generate sequence and class diagrams for all use cases and later used the diagrams to enhance the application.
An IT services company was required to maintain Java applications for the US government. After every release, the company was responsible for providing the UML documentation. Instead of manually drawing the sequence and class diagrams, they successfully used MaintainJ to generate the diagrams.
InfoQ: What is the future roadmap for MaintainJ? How would you like to see it evolving?
Before answering this question, let us talk about the philosophy behind MaintainJ. 90% of the software costs are spent on maintenance and about 50% of the maintenance costs go towards understanding the code. Software maintenance typically involves bug fixing and enhancing the applications.
A bug fix typically involves three steps.
1) To find the source of the bug
2) To fix the bug
3) To put the fix safely back into production. This step involves analyzing the impact of the change on other parts of the application and conducting proper regression testing.
Enhancing an application to add new features involves very similar steps.
Very often, the second step of fixing the defect takes much less effort compared to finding the source of the bug and to safely put the fix into production.
MaintainJ aims to help developers in steps 1 and 3 - to find the source of the bug and to conduct proper impact analysis. The current version addresses Step 1 – finding the source of the bug.
The Road Ahead
The next release in October will address Step 3 - Impact Analysis. MaintainJ currently stores the runtime call trace information for different use cases in a file system based database. This information will be used for impact analysis and to identify the regression test cases.
Another release planned in March 2012 will display the sequence diagrams in a browser. Call trace files for different use cases of the application will be stored in a central database. Developers, testers and managers can search this database by use case name and view the related sequence diagrams in a browser. They can also perform impact analysis to find out all the use cases that are impacted because of a change to a class or database table.
InfoQ: What are the licensing options for MaintainJ?
1. Free Evaluation license and support
- We offer 21 day evaluation license during which we provide free support. We want users to evaluate MaintainJ firsthand and realize how it can cut down the debugging and documentation effort from days to minutes.
We offer two types of commercial licenses. These licenses do not expire and can be used on future releases.
2. Node locked license
– This license costs $100 and is locked to a computer.
3. Floating license
– This license is suitable for Java teams at corporations. 5 floating licenses cost $1000.
Mike Keane Dec 21, 2014
Jeremy Stieglitz Dec 21, 2014