Book a Demo

Author Topic: PHP Reverse Engineering  (Read 4487 times)

MadanChalla

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
PHP Reverse Engineering
« on: September 24, 2006, 05:49:14 am »
HI Guys,

I am trying to reverse engineer a PHP5 OO project.

What I need is a UML class diagram.from existing code

The Procedure I follewed and failed [in Professional mode]:
* Started a new Project
* From Project Menu -> selected sourse code engineering
* From sub Menu, selected Sourse directory [seems to be OK]

But; I cannot see the class diagram any where { I could see it building in the diagrams in the background while importing source directory though}.

Can someone please post , how I can get UML Class Diagram :(

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: PHP Reverse Engineering
« Reply #1 on: September 24, 2006, 03:25:49 pm »
Open the Project Browser (View | Project Browser) and have a browse.  The diagrams created will be the first item under the packages created.  One for each directory (and possibly for each file as well).

MadanChalla

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: PHP Reverse Engineering
« Reply #2 on: September 24, 2006, 06:27:23 pm »
Thank you, That did help.

I had to drag class by class to the stage and connect classes manually, as it only recognised the inheritances but not the rest of relationships.

I thought it will generate a complete model [with associations,relationships, instantations etc] based on the source folder..

Am I expecting too much? or missing something?

Any how it helped me a lot, Thanx Heaps.

I think I need to learn more UML first   :)

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: PHP Reverse Engineering
« Reply #3 on: September 24, 2006, 07:46:50 pm »
Well, it creates associations from attributes with a matching type.  For PHP this means that creation of attributes doen't happen because the language is dynamically typed, EA can't actually determine the type of that attribute without a full runtime analysis of the program.  In most cases it would be possible to just look at the types assigned in the member methods.

EA is not able to do either of these, and as a result no associations are created.

MadanChalla

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: PHP Reverse Engineering
« Reply #4 on: September 24, 2006, 09:50:21 pm »
Fair Enough!, Thanks once agin.

I'm impressed with what it is doing and can do any way.