modeling python with UML

U

Uwe Mayer

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
 
P

Peter Otten

Uwe said:
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?

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

Peter
 
A

Alan Gauld

Packages would be moduled as UML packages i presume.

Could be, or as components since they are physical deployable
entities...
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.

Yes, thats one approach, or they could be an inteface to your
component.
However, if you module contains several classes - what do you do then?

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
http://www.freenetpages.co.uk/hp/alan.gauld
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top