Discussions

News: MaintainJ, Eclipse Plugin to generate sequence and class diagrams

  1. MaintainJ is a new project that generates sequence and class diagrams for a use case of the application, helping the users to quickly understand a complex Java application. It's written as an Eclipse plugin, and requires running the tracing from within Eclipse. Running a J2EE application through MaintainJ is a little more work, but is possible. MaintainJ uses AspectJ to log the call sequence for a use case and generates sequence and class diagrams from that log. MaintainJ is tightly integrated with Eclipse and offers common features like Outline view, Delete, Undo, Redo etc. Users can interactively explore sequence diagram by collapsing and expanding calls. It avoids clutter by removing loop calls. Class diagram shows class dependencies based on call sequence. Hierarchy of a class can be seen as needed. One can export diagrams as jpgs and also print them. Changes done to a diagram can be persisted. What do you think of the tool? It has applications beyond just understanding the code - it could be very useful for debugging code or finding performance issues. How would you use it? Message was edited by: joeo@enigmastation.com

    Threaded Messages (30)

  2. I've seen similar feature in Rational tools and I was wondering why wasn't it implemented by other vendors or open-source communities. Visual runtime analysis greatly improves productivity when working with legacy systems (rarely well documented). For some companies this tool can be priceless :-) http://www.enterpriseware.eu
  3. One more Free Option for this[ Go to top ]

    One more Free Option for this is Oracle JDeveloper It allows you to drag your classes into a diagram to create a class diagram, and it also allows you to debug your code and it creates a sequence diagram tracing your route. These have been there for a while .... http://otn.oracle.com/jdev
  4. The perpetual flaw of all roundtrip engineering tools I've ever used is that they have no intelligence. For instance, if you have a logical flow of calls that you want to show in a sequence diagram, but show it by interface rather than implementation, most of the time you are completely stuffed: It either shows the flow of each individual implementation, or the sequence just ends at the first interface encountered. What I always end up doing anyway if I need to document is to do things like sequence diagrams as a separate task, in something like Visio, just because of these flaws.. Does this tool address any of those flaws? I read something about filters etc, are they able to filter out implementation classes in some manner?
  5. For instance, if you have a logical flow of calls that you want to show in a sequence diagram, but show it by interface rather than implementation, most of the time you are completely stuffed:
    It either shows the flow of each individual implementation, or the sequence just ends at the first interface encountered.
    MaintainJ shows implementation classes. That is the purpose of MaintainJ. One needs to get more information than one gets by looking at the source code. If you check the sample sequence diagram on MaintainJ homepage, CartHTMLAction is an implementation class. You would not think RequestProcessor directly refers to CartHTMLAction. This is a real sequence diagram for a use case. From front to back. Please try the sameples.
    What I always end up doing anyway if I need to document is to do things like sequence diagrams as a separate task, in something like Visio, just because of these flaws.
    Well, I hope you don't have to do it again.
    I read something about filters etc, are they able to filter out implementation classes in some manner?
    I didn't understand your question. It does not fitler out any implementation classes. It rather filters out loop calls. One can always delete a class they don't want to see. It's very simple...you run a use case and see clear and focused sequence diagram. If you don't want to see a class, just delete it. Hope this helps. Regards, Choudary.
  6. For round trip engineering you typically do not want a complete call trace. Othewise the diagram gets WAY too messy. You need to be able to easily filter methods in the call stack. For example, If you are tracing the interaction between Class A and B and C. You may want to filter out calls from A to itself . A simplified way of saying this is that you may want to only trace calls from a Public method (in A for example ) to another Public method ( in B for example ). The reason being is that private methods MAY be too detailed for a general interation diagram ( note this is NOT always true, but this is what we found when using Rational to generate interaction diagrams after the code was built. ) Generally speaking, we found it too dificult to get the filtering to give us usable diagrams when using the Rational product. Good luck.
  7. Thanks for the post. I hope to clear any misgivings about MaintainJ in this response. First, a disclosure: I am a developer, who worked at 6 different companies, on different J2EE applications with varied complexity, in less than 3 years. I found it very hard to get a grasp of the system at each company. It takes lot of time, really lot of time that has no justification to get a grasp of overall design and code. All I needed was a simple sequence diagram generator that shows all concrete classes involved. No simple, low-cost tool was on the horizon. After 3.5 years, I took a break and started developing MaintainJ. Now to answer your queries, MaintainJ filters out private calls and shows only public and protected calls. The calls that are shown as self calls in the samples are calls from framework classes(calls from servlet/ejb containers for example). Messy diagrams: Yes, sequence diagrams get messy very easily. I think I solved that problem to my satisfaction, but I really hope to get the feedback from the community. First, I remove all the loop calls from a method. If A.m1() calls B.m2() in a loop, I just show a single call from A.m1() to B.m2(). Second, calls can be collapsed and expanded as needed. One can explore the diagram step by step. To give an analogy, Windows Explorer helps to navigate a very large file system in one small window. MaintainJ takes clue from that. MaintainJ initially collapses all calls into a single call. User expands the first call to see other calls from that method, collapses those call he does not want to see and so forth. If there are some calls/classes that he does not want to see, he can delete them. They can be retrieved later from outline view. Third, there can be instances, more likely in GUI apps, where there are many repeated calls from frameworks. For every mouse move, there might be a call to the application object. This will create a really messy diagram. Such calls are not removed automatically becauses they are not from a method in the diagram. One typicaly captures all calls to the application objects and so calls from frameworks don't originate from a method in diagram. My solution for this is to delete all repeated calls except the first one. In most cases, you can see what you need to see to get a high-level understanding. Keep in mind that some information is lost in this operation. But the primary purpose of MaintainJ is to quickly give an understanding of the system using simple focused sequence diagrams. Fourth, Outline views help to quickly navigate to a class/method call. Deleted calls/classes can be retrieved here. Outline views are synchronized with the diagram. To conclude, I believe MaintainJ is very usable and solves the real problems developers face everyday. But I would like to get your feedback to make it better. Please try the samples and if you are satisfied, implement MaintainJ in one of your projects. Regards, Choudary.
  8. Looks great - shame there is no install guide. I've dumped the main jar into my plugins directory and booted up with a "- clean" flag, but still can't find any sign that the plugin has been installed. Also it is not obvious if the ADJT library is a pre-requisite or not ?
  9. Looks great - shame there is no install guide. I've dumped the main jar into my plugins directory and booted up with a "- clean" flag, but still can't find any sign that the plugin has been installed.

    Also it is not obvious if the ADJT library is a pre-requisite or not ?
    Hi Ben, It works either with Eclipse 3.1.2 and GEF 3.1.1 or Eclipse 3.2 and GEF 3.2. If you are using the correst version of Eclipse and install corresponding GEF plug-in, it should work. AJDT is not required to run the samples but, it is needed to weave aspects into a application inside Eclipse. You can also weave aspects outside Eclipse and open the trace files generated in Eclipse to view the diagrams. This is documented in 'Quick Start Guide'. I will look into it again to make it more understandable. Choudary.
  10. Yeah, the docs look a bit on the extreme light side. From the Getting Started page, it looks like you're expected to install the Swing demo and see how the tool is applied to that. It also does state that you need to instrument your code using AJDT first.
  11. Yeah, the docs look a bit on the extreme light side. From the Getting Started page, it looks like you're expected to install the Swing demo and see how the tool is applied to that. It also does state that you need to instrument your code using AJDT first.
    The basic idea is to instrument the code, run the application with the instrumented classes, capture the call trace and to generate the diagram from the call trace. Yes, you need to instrument the code first. One can do it easily in Eclipse by using AJDT. But just like one can compile a java application outside Eclipse, one can instrument the application using AspectJ outside Eclipse. That process is described in the 'J2EE Sample'. I will definitely work on the docs. I expected a little knowledge of AspectJ but, the fact seems to be that it is used very little in the industry right now. Regards, Choudary.
  12. Yeah, the docs look a bit on the extreme light side.
    I have updated the web site with a detailed user guide and a flash demo. Please take a look and let me know if things are clearer now. Regards, Choudary.
  13. Thanks Choudary. The flash demo really helps get a feel for what the plugin can do. Looks very sharp!
  14. Hi Choudary, Congrats for the idea and the implementation, i will download and give it a try on my projects ASAP, candidate for my presonal "Eclipse plugin-of-the year" list ! Any posibility to have an animated sequence diagram linked to a debug session ? It would rock for demos and debugging sessions ! Cheers, Christian
  15. Hi Choudary,
    candidate for my presonal "Eclipse plugin-of-the year" list
    Hi Christian, Thanks for the best compliment I have received to date :-) Right now, I don't have any plans to link it to a debug session. I believe instrumenting code with AspectJ offers more flexibility. Rational XDE and Sparx Systems IDE, the two tools that offer a comparable feature seem to go that route. Once I take the current feature set of MaintainJ to the level that users love to use it, I will add some more features that aid in application maintenance. I believe AspectJ helps to implement the other ideas I have. Regards, Choudary.
  16. "What do you think of the tool? It has applications beyond just understanding the code - it could be very useful for debugging code or finding performance issues. How would you use it?" Joe, do you mean something like... http://www.jinspired.com/images/whatsnew-xa-tx.gif http://www.jinspired.com/images/webwork.jira.paths.gif This capability has been in JXInsight (formerly JDBInsight) since 2.x. We even added distributed JVM tracing sequence diagrams in 3.2. http://www.jinspired.com/images/distracestimeline.gif http://www.jinspired.com/products/jxinsight/new-in-3.2.html By the way I do believe the Eclipse Test & Performance Tools Platform (TPTP) Project has a similar sequence diagram to what JMaintain is displaying. Is JMaintain based on this project or a completely separate codebase? Kind regards, William Louth CTO, JInspired "Java EE tuning, testing, tracing, and monitoring with JXInsight" http://www.jinspired.com
  17. William, To quickly answer your second question about TPTP, MaintainJ is not related to TPTP project in anyway. AFAIK, TPTP does not use AspectJ to capture call trace. I need to take a look the sequence diagrams generated by TPTP to comment on the usability aspect. As many people pointed out, usability is a major bottleneck for such auto generated sequence diagrams. The primary concern of MaintainJ is to help developers to quickly understand code and to aid them in debugging. Performance analysis is not a primary concern, though it might be used for that purpose. I need to look into JXInsight to compare the features. Regards, Choudary.
  18. That's pretty lame. You have no idea how tools become popular by word of mouth, do you? I'm always eager to influence purchase of a commercial tool and spread the word on a good one if it's really useful. You won't let me download and try your tool because I am requesting from a "non-company" email account? That's absurd. I am still here as a professional Java developer, tester and book author despite the rise and fall of many companies that may employ me. People are itinerant, companies, not so much.
  19. That's pretty lame. You won't let me download and try your tool because I am requesting from a "non-company" email account?
    Scott, I suspect you were trying to download JInspired. Anyway, just to clarify, MaintainJ plug-in download doesn't ask for any user information. Regards, Choudary.
  20. You should read all sentence[ Go to top ]

    Scott You should read all sentence “TO PREVENT REPEATING EVALUATION LICENSE ABUSE WE NOW ISSUE LINKS TO INSTALLERS VIA EMAIL.” Please try download at TIBCO,IBM,SAP,ORACLE,BORLAND,COMPUWARE,QUEST download sites by filled your non-company email. And retry download software. :) JXGovern(JXInsight) guys are well know how to spread and marketing in software community. JINSPIRED is Proven leader in Application performance testing. It is not just a company like the rise and fall of many companies. JXInsight (JDBInsight) is Winner of “Best Java Application Monitoring Tool” JDJ http://java.sys-con.com/read/43939.htm
  21. Both IBM and Oracle allow it[ Go to top ]

    Please try download at TIBCO,IBM,SAP,ORACLE,BORLAND,COMPUWARE,QUEST download sites by filled your non-company email.
    Do you mean these websites don't allow downloads using a non company email? I have registered myself with IBM and Oracle using my yahoo account and I haven't had any problems. In fact the only software company I know of that doesn't allow non company email address is Quest Software (TOAD). Chintan http://ChintanRajyaguru.com
  22. I'd like to get involved...[ Go to top ]

    Congrats for rolling out the cool plugin. I believe it can help a lot in terms of applying Agile practices if it really is a neat design using AspectJ. I'm interested, tell me where to download the latest revision and how to get involved in this project?
  23. Re: I'd like to get involved...[ Go to top ]

    I'm interested, tell me where to download the latest revision and how to get involved in this project?
    Hi, You can download the plug-in from http://www.maintainj.com. This is not a open source project now. If you could implement MaintainJ to one of your projects and provide the feedback, it would help in making the plug-in more usable. Regards, Choudary.
  24. Why is dynamic / run time info needed?[ Go to top ]

    A great tool. Just wondering why was there a need to instrumnet the code and gather run-time data to construct essentially sequence diagram ? Couldn't this data have been gathered from stati analysis itself (esp from info within Eclipse for auto-completion)? Some time back there was a great debate here on static v/s dynamically typed languages. One of the advantage of statically typed languages like Java was that IDEs could provide a lot more information and checking with complete confidence. But this appraoch seems to counter that conclusion.
  25. Static analysis does not provide the the concrete(implementation) classes that are used at runtime. Sequence diagrams in MaintainJ show the concrete classes that are used at runtime. That helps in both understanding and debugging code. I am all for statically typed languages like Java. The advantages are well documented and I don't want to get into that discussion now. Statically typed language need not mean that there should not be any runtime binding. Most of the Java applications use runtime binding a lot. MaintainJ aids a developer to understand such applications.
  26. Cool[ Go to top ]

    This is a nice one ! The flash demo is nice too.
  27. The whole idea is really marvellous, capturing runtime trace by aspectj without touching the source code. I especially like the idea of expanding and collapsing the sequence, which can avoid messy. I have tried it under Eclipse 3.2 with AspectJ 1.5.2. I worked perfectly for both standard Java application and Web Application. However, it cannot work under IBM's RAD (Rational Application Developer 6.0), where eclipse is 3.0. That's not end of the world. Here is a word around. I installed 1.2.2 AspectJ plug-in in RAD to be able to capture the runtime trace, review and study the generate sequence diagrams and class diagrams under eclipse 3.2. Of course you gotta put AspectJ runtime and MaintainJAspect.jar in your web project. It sounds inconvenience, but it really helps me in my work, maintaining a quite complicated project. By the way, Choudary, just a small comment on your AspectServlet code with your example, JoinPointList.addJoinPoint is not visible. JoinPointList.setAddJoinPoint (true) should be used. Good work, Choudary
  28. Charlie, Thanks a lot for posting your feedback! It's great to know that you could instrument and run a J2EE app in RAD. This would make the adoption of MaintainJ much easier. One request to the other users of MaintainJ. If you could provide me with your feedback, it would help me to improve the plug-in as well as helping others in the community to use it on their applications. Regards, Choudary Kothapalli. http://www.MaintainJ.com
  29. Not without touching the source code[ Go to top ]

    The whole idea is really marvellous, capturing runtime trace by aspectj without touching the source code.
    I am not sure that it's exactly 'without touching the source code' in the examples there is a class that needs to be hardcoded into your implementation to start and stop logging...
  30. I am not sure that it's exactly 'without touching the source code'
    One does not need to do any changes to the existing application code to use MaintainJ. Yes, a simple JSP and servlet to define start and stop points for a scenario need to be added to the application. The sample JSP ans servlet are provided in samples. Regards, Choudary Kothapalli www.MaintainJ.com
  31. I am evaluating this plugin in Eclipse 3.5.  Plugin is version 2.9.  It does not seem to work with Maven 2.x projects.  Is this true?  Any workaround or fix for this?  thx.