Creating a PHP profile in ArgoUML

ArgoUML is the leading open source UML modeling tool. It supports standard UML 1.4 diagrams and has lot of useful features. Built on Java platform ArgoUML runs in large number of environments and also supports many programming languages, including popular PHP. Current version 0.30.1 comes with a bunch of ready-to-use profiles. These profiles help software engineers to rapidly model the system simply using the built-in UML and Java profiles. ArgoUML is excellent tool to generate first phase PHP 5 code as well. To quickly design a model you would need a PHP profile to avoid duplicating the standard language elements provided by PHP. Unfortunately ArgoUML has no built-in PHP profile, but creating one is relatively easy.

An ArgoUML profile is in fact a model with language specific elements, such as datatypes, classes, exceptions and more. In case you like to use native PHP datatypes instead of standard UML types, which lack some language specific types, such as array, you can easily set up a profile for your needs.

  1. Select File and New profile to start a new profile project.
  2. Click the name of the model "untitledProfile" and rename it as "PHP 5.2".
  3. Right-click the model and select Create Model Element...
  4. Select New Datatype...
  5. Enter name of the datatype, for example "array".
  6. Add all other elements you wish to use with this profile.
  7. When you are finished, select File and Export XMI...
  8. Export the project as an XMI file and save and close the project.
  9. Create a new modeling project or open an existing one.
  10. Right-click the Profile Configuration in the project tree and select Manage Profiles...
  11. Click Load profile from file... and navigate to the folder you exported the XMI file.
  12. Move the loaded profile from Available Profiles list to Active Profiles list.
  13. Finally, click OK and the PHP profile is loaded in the Profile Configuration list in the project tree.

Final words

Creating a custom profile in ArgoUML is quick and easy. You cannot edit the active profile unless you first close the project and then start editing the profile project. Make the changes and export the updated model. Open the software modeling project you were working on and unload the old PHP profile in Manage Profiles... window. You will notice that all custom datatypes in your project will be removed. Close the project but do not save any changes. Reopen the project and you will see that all custom datatypes are preserved and the new profile is in use. Using profiles in ArgoUML significantly reduces the time used to re-declare often used standard language elements.

Julkaistu torstaina 13.5.2010 klo 11:36 avainsanoilla ohjelmistot ja ohjelmointi.

Edellinen
Valovikailmoitus
Seuraava
Painettu puhelinluettelo