Using Rational XDE with Visual Studio .Net
ByI have not been a great fan of reverse engineering tools in general. When I was creating applications in years ago, I held great hope for Visual Modeler. I do strongly believe in providing adequate documentation for an application and I most certainly value implementing an appropriate design phase during a project’s lifecycle. The tools available for accomplishing this have been sorely lacking in key areas, in my opinion.
What makes a documentation / design tool a good one? Well, seamless integration into the development process is one quality that is important to me. I detest having to input the same information more than once. That is one of the greatest strong points of automation. I’ve designed applications to automate workflow processes and share information between systems using tools that did not provide a solid way to do this with the development process.
To be useful to me, a design tool or documentation tool has to be powerful enough to meet the 80 / 20 rule of providing 80% of the features I need. At the same time it has to do this without placing a heavy burden on the development team or lifecycle. It also needs to be adaptable for varying project sizes and timeframes. What is appropriate for a project with a team of 20 developers with a timeframe of 12 months is not necessarily appropriate for a project with a team of 3 and a timeframe of 3 months. Both projects require proper design and documentation, but the relative cost or weight of this design / documentation activities must be correspondingly lower for smaller projects. This is simply a case of the law of diminishing returns.
Because of the limitations of the tools of the time, I tended to use more manual methods to achieve design and documentation goals. I even automated some of the documentation tasks with my own add-in for VB 5 & 6. For design, I found VM to be clunky to use and lacking certain key features found in the full version of Rational Rose. Rose, on the other hand I found to be overkill (and expensive) for any but the larger projects. The result was that design was handled in a separate, readily available application such as Visio.
All this has now changed since I’ve been using Rational XDE with .Net. I was introduced to XDE as a plugin for Eclipse, the open source Java IDE at a software conference. My prior prejudices conspired to hinder me from thoroughly investigating XDE as a tool to include in my Java toolkit. Note: While I have significant experience designing J2EE applications, I now concentrate on .Net – perhaps that should be the subject of a separate article. With XDE, I’ve found what is for me a perfect combination of power and flexibility for any size project, even small projects.
What is XDE?
Rational XDE is a graphical component modeling and development tool that uses the industry-standard Unified Modeling Language (UML). It integrates tightly with VS.Net and allows seamless code generation and reverse engineering. It is both powerful and flexible, allowing the architect to choose how much of its power to use on any given project. XDE allows you to create classes in UML, include them in various UML models such as Sequence Models and Class Diagrams. Because this inclusion is in reality a link to a single instance of a class, updates to that class are reflected in all models that use the class.
XDE in Visual Studio
Since XDE functions as an extension of the VS IDE, it is tightly integrated into the design / development workflow and project structure. Models created for the classes in a project, stay with the project as a part of the project hierarchy. This creates a cohesiveness that tends toward a transparency between XDE and VS. You forget that you are using a 3rd party tool and begin to believe that XDE is an integral part of VS. I quickly found myself dependent on XDE for day to day tasks over the lifecycle of a project.
XDE allows you to create Analysis Models that are high level abstractions of the system. Typically, these types of models are not linked directly to code. They exist entirely separate from the code. This allows the creation of high level architectural overviews as well as the realization of Use Case models to validate the basic design before implementation begins. At this level XDE functions as a very good drawing tool, but the models are linked to the VS project, keeping the project and documentation together.
Once you get to the Elaboration and Construction phases the fun really begins! XDE allows you to work the way you want to. Do you want to create your models first and then generate the stub code for all of your classes? Would you rather create the classes in C# and then generate the UML class models from the code? XDE works equally well either way and I find myself doing both depending on the task at hand. This is where I think XDE shines. Code generation and reverse engineering work well in XDE. It is a straightforward process to keep the code and models in synch. One of the best parts is the XDE uses reflection to create classes from the code. It does not parse the code window as other tools have done in the past. There is no extra code or comments added to the .cs files for XDE to work its magic.
Using XDE with a development team
XDE allows the separation of roles on a development to enforce good design and standardization. One senior person can be given the application level design tasks to create a consistent and coherent architecture. At the same time, construction level design can be handled by the architect or handled by the individual developers of a component of the system. Because of the powerful reverse engineering tools, the architect can always keep the model up to date. Better still, developers can enhance the models created by the architect with the details of implementation. Following this practice allows developers to acquire design skills and encourage thinking before coding. The architect can review models before implementation if desired to enforce project goals and guidelines.
Project Managers and Business analysts can create their Use Case models directly in XDE. The architect can later realize these Use Cases with class diagrams and other models. This creates a seamless end to end project lifecycle structure from inception to construction. Alternately, Use Cases can be imported from other Rational Tools if desired.
Keep in mind that, as with the Rational Unified Process, you don’t have to use all of XDE on every project! For example, on a recent project the workflow went something like this:
The business analyst created Use Cases using the RUP Word templates – no Rational Toolset. This level of automation was fine for this project. There was no clear win to introduce the learning curve and overhead of the full rational Toolset. From the Use Cases, I created Analysis Models to design the overall architecture of individual application components and to validate that the Use Cases were being realized properly. Once a component’s design was validated and realized at a high level, I created separate code-level models and generated the stub code from the models. After the construction of a component was complete or reached a significant milestone, I reverse engineered the models to update the UML. As the project progressed, some of the construction level design tasks could be handed off to the development team. Critical components were still designed primarily by the project architect, but by distributing the responsibility for component design, a more efficient workflow could be achieved.
Conclusion
I have found XDE to be a very valuable addition to the VS toolkit and will find it awkward to work without it on future projects. Unfortunately, because of the cost of XDE, I may have to forego all the benefits of XDE in some projects. A license for XDE runs from approximately $1600 TO $5000 Depending on the version chosen. Different versions provide differing levels of functionality such as database modeling and reverse engineering and visual tracing. The relatively high cost of this add-on significantly reduces its application to smaller projects and companies.
XDE is a great tool and if the project budget can afford it, I highly recommend employing it for design and documentation tasks. For many projects, all the bells and whistles may not be needed and the basic version will provide more functionality than is required. For larger projects, I would insist on XDE’s inclusion in the development tool set.
Related posts:

