views:

48

answers:

2

Hi All,

This questions is inspired from How to navigate around and get familiar with large C or C++ code base ?

This is indeed an major problem for someone how has just joined the team and who is not aware of Application Architecture and Code Design. Currently I am in similar situation but in my case I have very large Java/Java EE code base for Web Application and am looking for tools that can help me in understanding the flow of the Application and establish relationship between different classes and packages.

If someone has been through similar situation and have used any kind of source code analyzing tool or another tool/approaches for the situation and could share them, than it would be very valuable.

A: 

If this application is following some architecture principles and naming conventions (I hope for you it is), then pick up one flow (e.g. the main scenario of a use case) and follow the code (the sources) from the user interface to the database to understand how the application is designed and is working.

A large scale application usually have a high level document covering this. If this one doesn't, then maybe someone more experimented with this application could spend some time siting with you and provide some guidance.

Pascal Thivent
Actually this application is not very well documented from technical point of view but there are business requirement documents but they just give the business overview of the application and not the technical one and currently there is release for newer version for the application and so no one is readily available to spend some time to run through the Application. Do we have any code analyzer tool that establishes some relation between the different scattered classes/packages ?
Rachel
@Rachel Some UML tools can generate class diagrams from existing sources but such diagrams don't help much in my opinion (a sequence diagram would be more useful but you can't generate it from source code).
Pascal Thivent
A: 

Code browsing tools (such as Eclipse) are vital, you need to be able to find references to objects and classes for example. And UML diagram generaters are also useful in order to understand what uses what. However I doubt that any tools are going to reveal the deep structure of the application.

Generally I think you need to adopt a "Black Box" mentality, be continually prepared to set aside detail for

I'd advise two parallel approaches:

1). Functional. Sit down with the app and drive it. What does a user see? Or what messages arrive or leave. Don't be in the least concerned with how this happens, just get a feel for the functionality it offers.

2). A JEE application should be decomposed into quite self-contained pieces that can be understood in isolation. So start by looking at (for example) some Statless Session EJBs. These should represent key service concepts. Just study the Interfaces, don't concern your self with "how" they work, just try to identify the mechanisms that implement the function you've indentified.

Then you can begin to unpick the implementation of each piece - oh there's a library for that, there's a configuration file for this.

Also, you may even be able to use a debugger to step through a few pieces.

I hope that you have some people you can ask questions of, by far that's the best tool - insightful help from people.

djna