Comments for "UML"

» Submit Your Comment
Comments are only accepted during the "Proposal" phase. This proposal is currently in the "Finished" phase.
» Comments
  • Bill Shupp  [2008-04-08 21:17 UTC]

    Nice work. I was able to run the test_to_run.php example, and then import test_example1.xmi and test_example3.xmi files into ArgoUML. However, test_example2.xmi generated a "XMI version attribute is missing" Exception.

    Maybe someone could do a php import plugin for ArgoUML based on this.
  • Philippe Jausions  [2008-04-08 22:58 UTC]

    Seems like a very valuable package. Before we review the code, could you split it according to class <-> file rule. It helps a lot to view and understand the structure of the code (yeah, ironic for a UML package ;-)

    Also make sure you run PHP_CodeSniffer on it, to fix some PEAR coding standards (missing {} for some round if's, etc...)
  • Baptiste Autin  [2008-04-10 15:17 UTC]

    To Bill Shupp:
    It is normal that "test_example2.xmi" raises an exception in ArgoUML, since ArgoUML is, at the current time, not compatible with the version 2 of the XMI standard (test_example2.xmi is generated in version 2, while the 2 other files are in version 1).

    Few tools support the version 2 of XMI today. Eclipse supports a "special" version 2, called "ecore" (partly compatible with what PHP_UML generates, see documentation).
    Otherwise, I recommend Bouml (http://bouml.free.fr/) which produces clear diagrams (it is based on QT) and performs fairly well with big projects.
    (try to import the complete PEAR infrastructure in ArgoUML !!)

    BTW, what do you mean by "a php import plugin for ArgoUML" ?

    To Philippe Jausions:
    I split the code into four files: one into /PHP (enclosing PHP_UML, the starting class) and three into a subfolder /PHP/UML.
    I kept the dozen of classes that form the MOF metamodel together, since they are extremely short (4-5 lines) and very much interrelated.

    A new package version is available.

    I was rather discouraged by the number of errors listed by CodeSniffer.
    I have corrected 50% of them (non-unix CR, tabs, or unmatching @params)
    But most remaining errors are provoked by the "long if" writing :
    if ($foo && $foo
    $foo) {

    }
    Or by things like :
    $this->foobar(
    $many_parameters, $many_parameters, $many_parameters
    );

    ... coding ways I had adopted to avoid the "> 85 characters long" warning ! (see the recent discussion on that point a few weeks ago on the mailing list). It seems that CodeSniffer has not yet been modified to support these new coding manners (?).

    I don't always like what CodeSniffer says about docblocks.
    OK when it asks for a function comment (I still have to add some of them, I know :-).
    But why complaing about missing @return for methods that do not return anything ? (even the official Javadoc states: "Omit @return for methods that return void and for constructors")
    Also, are @link, @license and @author really necessary for every class, at all time, even if those tags are present in the class docblock ?

    Lastly, regarding the way the package PHP_UML works, I discussed some technical aspects here :
    http://www.baptisteautin.com/projects/PHP_UML/#technical_aspects
    You will also find two class diagrams.

    --
    Nothing to do with PHP_UML, but I'd just like to warn that the PEPR form checking script does not accept "https://" links, only "http://" (for the proposal phase). It took me a moment to get what was going wrong with my Sourceforge SVN link.
  • Chuck Burgess  [2008-04-16 02:25 UTC]

    As a PhpDocumentor maintainer, I'm pretty excited about the possibilities this package can add.
  • Ken Guest  [2008-04-16 08:47 UTC]

    I'd expect some form of structured tests, such as phpunit or .phpt files, to be used rather than a tests/run_me.php file.

    Superb work otherwise though and I can see many wonderful uses for this.
  • Baptiste Autin  [2008-04-16 19:33 UTC]

    Thank you for your comments.
    I am also quite interested by this possible collaboration between UML and Documentor.
    Chuck, I&#8217;ll get in touch with you and the other maintainers of PHP_Documentor soon, so we can discuss some technical details (first, I would like to be certain that the current UML&#8217;s API - in terms of function names, properties, visibility&#8230; - is enough for cooperating with other packages, before I submit UML to the PEAR community).

    Regarding the tests, I made a quick and dirty thing, I know... I guess I should have a look at PHPUnit. The problem is that PHP_UML generates XML files. I think there is a kind of "XML dataset assertion" in PHPUnit though, maybe it could do it, but I&#8217;m unsure&#8230;