modeling python with UML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Uwe Mayer

    modeling python with UML

    Hi,

    I was trying to model some classes, modules and packages of mine with UML
    and got the following problem:

    Packages would be moduled as UML packages i presume.

    If your module contains only functions you can model them as static class
    methods, either by writing a dummy class that takes them up or by
    representing the file as a class.

    However, if you module contains several classes - what do you do then?

    Ciao
    Uwe
  • Peter Otten

    #2
    Re: modeling python with UML

    Uwe Mayer wrote:
    [color=blue]
    > I was trying to model some classes, modules and packages of mine with UML
    > and got the following problem:
    >
    > Packages would be moduled as UML packages i presume.
    >
    > If your module contains only functions you can model them as static class
    > methods, either by writing a dummy class that takes them up or by
    > representing the file as a class.
    >
    > However, if you module contains several classes - what do you do then?[/color]

    Just mark the class containing the global functions and variables with the
    <<utility>> stereotype? A naming convention could be helpful, too.

    Peter

    Comment

    • Alan Gauld

      #3
      Re: modeling python with UML

      On Mon, 23 Feb 2004 11:32:30 +0100, Uwe Mayer <merkosh@hadiko .de>
      wrote:[color=blue]
      > Packages would be moduled as UML packages i presume.[/color]

      Could be, or as components since they are physical deployable
      entities...
      [color=blue]
      > If your module contains only functions you can model them as static class
      > methods, either by writing a dummy class that takes them up or by
      > representing the file as a class.[/color]

      Yes, thats one approach, or they could be an inteface to your
      component.
      [color=blue]
      > However, if you module contains several classes - what do you do then?[/color]

      UML packages are logical containers that can contain any other
      UML item (classes, usecases, components, other packages...). Thus
      a package can contain several classes. What exactly do you
      perceive to be the problem?

      Alan G.

      Author of the Learn to Program website

      Comment

      Working...