Book a Demo

Author Topic: reverse engineer component models  (Read 5025 times)

Henrique Narciso

  • EA User
  • **
  • Posts: 86
  • Karma: +0/-0
    • View Profile
reverse engineer component models
« on: November 26, 2008, 09:56:23 pm »
Hello,

I would like to reverse engineer my code components (exe's, dll's) into a component model diagram.

Is there any straight forward way to do this?

I can reverse engineer at the class level, but I would like to focus only at the component level.

Has anyone walked this path?

jkorman

  • EA User
  • **
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: reverse engineer component models
« Reply #1 on: November 27, 2008, 03:47:40 am »
Henrique,

Is this what you are proposing?

Select a directory (recursive would be nice also)
Get a list of all items in the directory structure
Use some sort of selection to import these items into a model.

If so then the answer is no. But it shouldn't be too hard using the EAAPI.
This would be nice to reverse a deployment also.

Jim

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: reverse engineer component models
« Reply #2 on: November 27, 2008, 04:55:36 am »
Rose used to do this. For each DLL it created a component, and for each class in the DLL it created a class as well as a realize relationship from component to class.

Don't know why EA doesn't support this as well. Shouldn't be too hard to implement.

Better still they could eventually offer an interface for us to define reverse engineering (like we can define code generaagtion through templates). Rose had that too, by the way.

Kevin G. Watson

  • EA User
  • **
  • Posts: 217
  • Karma: +0/-0
  • I love EVERYTHING including Microsoft
    • View Profile
Re: reverse engineer component models
« Reply #3 on: December 03, 2008, 01:17:43 am »
I've still got Rose hanging around somewhere....

I could never get my head around the Rose generating thing ( and didn't know it had that for RE ).... did anyone ever get a C# generator? Cos that'd be so cool... return to Rose RT

Kevin [smiley=2vrolijk_08.gif]

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: reverse engineer component models
« Reply #4 on: December 03, 2008, 08:41:53 am »
Well, Rose had a roundtrip mechanism for a couple of predefined code languages like C++ and Visual Basic 6 which could be customized with a sort of COM interface. Actually you needed to write VB Script to control code generation as well as reverse engineering, but of course from there you could call COM objects, like those you set up yourself via VB or ATL.

We used to model our applications and create a lot of code with Rose many years ago when we were still on VB 6, but had to learn the hard way that reverse engineering is a bugger anyway. But then, for forward generation only, you need mechanisms to separate manual from automatic code, and VB didn't offer much there (while C# has partial class declarations now.).

When we switched to .Net we had the choice to either write two months' worth of VB scripts to make Rose handle C#, or switch to Rational XDE which cost a fortune and fell behind Rose in many respects (no XMI import e.g.).

So we said goodbye to UML for the time being and set up our own code generation thing with hand written XML transformed to code via XSL. Sometimes we even transformed it to XMI and imported it to free tools like ArgoUML or StarUML so we could draw diagrams from the classes we already had.

The day came, of course, when we suffered serious UML withdrawal symptoms. Testing UML tools taught us that the free ones were to slow and incomplete, while the IBM ones still were a rip off. Which left us with Poseideon, Visual Paradigm and EA. The powers that be decided to take on EA. I think it was the adaptability and profile support, and the support for various XMI versions which did it. Still sometimes I'm weeping for the lost chance of using Visual Paradigm (e.g. state machine handling is far better there).

Anyway though, EA had all we needed to maintain our old "XML to code" thing. We only had to export models to XMI and then transform to our old XML schema, and within EA we could set up a profile with stereotypes to control this.

EA has its gaps and inconsistencies but it works for us. I'm still dreaming of something better, but certainly I don't want Rose back again. Ever tried to draw a sequence diagram in Rose? Last time I tried I told'em I'd give notice next time they asked me to do it.