Jump to content


Photo

Looking for PHP5 UML (Mainly class diagrams) Modeller


  • Please log in to reply
4 replies to this topic

#1 448191

448191
  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 14 September 2006 - 01:19 PM

As the title implies.

I've been thinking Visual Paradigm for UML Standard Edition.

Visual Paradigm for UML Standard Edition also has Reverse Engineering for php 5.

The datasheet for  Visual Paradigm says it has Reverse Engineering support for PHP 5.0. Does that mean I absolutely can't use 5.1?

SPL uses class constants since PHP 5.1. Prior releases use global constants in the form RIT_LEAVES_ONLY.


Above shouldn't matter, should it?


#2 448191

448191
  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 14 September 2006 - 04:00 PM

OK, so I tried out VP-UML, and as an UML newbie I have to say it's not very intuitive. I also tried ArgoUML, wich is more intuitive I feel, plus it makes design suggestions; a feature I like VERY mucho..

As for VP-UML's import feature: it works pretty smoothly.

Here's a small script I wrote to combine all the files in my 'lib' directory into one big file, ready for import by VP-UML:
<?php
function __autoload($className) {
   require_once 'lib/'.strtolower($className). '.class.php';
}
//Script to merge all files in library dir into one file
function createLibraryFile($dir){
	//Create empty library file:
	$fp = fopen($dir.'/lib.php','w');
	fwrite($fp,'<?php')."\n";
	if ($handle = opendir($dir)) {
		while (false !== ($file = readdir($handle))) {
			if (strstr($file,'class.php')) {
				echo 'Processing file: '.$file.'<br/>';
				//Include the file to check for any parse errors:
				require_once($dir.'/'.$file);
				$content = str_replace(array('<?php','?>'),'',file_get_contents($dir.'/'.$file))."\n";
				if(!fwrite($fp,$content)){
					trigger_error('Writing of "'.$file.'" failed.',E_USER_ERROR);
				}
			}
		}
		closedir($handle);
	}
	fwrite($fp,'?>')."\n";
	fclose($fp);
}
createLibraryFile($_SERVER['DOCUMENT_ROOT'].'/lib');
?>

Right now I'm thinking I'll export the imorted UML to XMI, then import it into ArgoUML, redesign, export to XMI, and convert it to PHP using 'XMI to PHP'...

See the 'resources' sticky...

#3 448191

448191
  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 14 September 2006 - 04:19 PM

Auch... It seems XMI to PHP currently only supports php 4... Bummer.

Pretty dissapointing, but not as dissapointing as the fact VP-UML doesn't support generating PHP5 in the first place. I can reverse engineer, why not the other way around?  :(

#4 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 15 September 2006 - 11:18 AM

phpDocumentor makes diagrams, though I've never used it for that purpose.

#5 448191

448191
  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 15 September 2006 - 11:49 AM

phpDocumentor makes diagrams, though I've never used it for that purpose.


I didn't know that, but it's not really relevant either, because I wan't to create classes from diagrams, not diagrams from classes.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users