how to present Python's OO feature in design?

P

pcmanlin

As I know java has many UML tools to design for its OO feature, is
there any tools or good concept for Python project Modeling?
 
J

jmdeschamps

Do you mean code-generators for Python from UML?

If not, please give some hints in what OOP features you're interested
in, because I can't see how use-case, class, instance (objects),
package, sequence,( ... other ) diagram would differ in Python from
Java from an OOP perspective?
 
P

pcmanlin

because i have a problem that python's oo feature is so great, but
maybe when the project become larger, python's no-declaration cannot
mapping the design to practice?

I am not sure about it.
 
A

aum

As I know java has many UML tools to design for its OO feature, is
there any tools or good concept for Python project Modeling?

Just code the bloody thing!

One of Python's strengths is its rapid design/programming/testing
turnaround. And virtually none of Java's mind-gnashing red tape.
 
B

bonono

aum said:
Just code the bloody thing!

One of Python's strengths is its rapid design/programming/testing
turnaround. And virtually none of Java's mind-gnashing red tape.
For a project that involves more than a handful of people, I don't
think this approach would work.
 
P

Peter Hansen

For a project that involves more than a handful of people, I don't
think this approach would work.

If by "this approach" you mean "just code [it]", then you're correct.
That's basically the (old) definition of hacking, and it results in
spaghetti and hairballs as soon as you get beyond one programmer or
twenty lines of code.

If you mix in some decent modern techniques, however, such as automated
testing (e.g. Test-Driven Development) and an agile development
methodology, it certainly does work, and very well. And definitely
still without the "mind-gnashing red tape" of Java, UML and their ilk.

-Peter
 
K

Kay Schluehr

pcmanlin said:
because i have a problem that python's oo feature is so great, but
maybe when the project become larger, python's no-declaration cannot
mapping the design to practice?

I am not sure about it.

As far cartoon-ware ( UML ) is concerned note that it is NOT Pythons
non-declarativeness but it's dynamicity that makes it hard to picture
it's design. Classes in Python are cheap, object structures are even
cheaper. That's why UML hardly provides an adequate representation of
Python programs and Pythonistas usually don't care a lot about it.

Kay
 
B

Ben Sizer

I don't know if there are any tools that convert UML to Python code,
but that doesn't stop you working with UML diagrams if you choose, and
then hand-coding the classes later. Just remember that one of the major
purposes of using UML for big up-front design is to save you from
having to do a lot of refactoring later, but in Python this is rarely a
difficult task.
 
J

Jorge Godoy

Ben Sizer said:
I don't know if there are any tools that convert UML to Python code,
but that doesn't stop you working with UML diagrams if you choose, and

Umbrello helps starting things using as a base UML diagrams. You'll probably
have to draw your diagrams on it, though...
 
P

Paul McGuire

pcmanlin said:
As I know java has many UML tools to design for its OO feature, is
there any tools or good concept for Python project Modeling?

Check out EnterpriseArchitect (http://www.sparxsystems.com.au ). They have
a very good UML tool that has a Python plugin. I'd recommend the
Professional Edition - the code reverse-engineering is like magic.

Not open source or free, though. EA Pro is US$199, Academic license is
US$105. But compare to Rational at $US000's, it is a great value for the
money.

-- Paul McGuire
(not associated wth SparxSystems, just a happy customer)
 
M

Magnus Lycka

pcmanlin said:
As I know java has many UML tools to design for its OO feature, is
there any tools or good concept for Python project Modeling?

My favourite is whiteboard and digital camera. I don't generate
any code from that though... ;) It's the approach suggested in
Scott Ambler's "Agile Modeling", and I think it's just just the
right approach.

Don't forget a good set of automated tests. We use TextTest, but
ymmv. It fits our type of applications.
 
J

Jorgen Grahn

As far cartoon-ware ( UML ) is concerned note that it is NOT Pythons
non-declarativeness but it's dynamicity

Yes; I've sometimes wondered what people do about duck typing in UML class
diagrams. I hope they don't adapt their Python code by needlessly
introducing inheritance!
that makes it hard to picture
it's design. Classes in Python are cheap, object structures are even
cheaper. That's why UML hardly provides an adequate representation of
Python programs

Not the part where you spend weeks drawing pointless, infinitely detailed
class diagrams, anyway. There are less detailed levels of those diagrams,
and there are other diagram types. Most people would find some of them as
useful (or useless) with Python as with other languages.

/Jorgen
 

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

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top