A design problem I met again and again.

Tim Rowe digitig at gmail.com
Thu Apr 2 06:01:48 EDT 2009


2009/4/1 一首诗 <newptcai at gmail.com>:
> Hi all,
>
> I am a programmer who works with some different kinds of programming
> languages, like python, C++(in COM), action script, C#, etc.
>
> Today, I realized that, what ever language I use, I always meet a same
> problem and I think I never solve it very well.
>
> The problem is : how to break my app into functional pieces?

One approach is to go through the specification of the program,
underline all of the significant nouns and try to implement each of
the nouns as a class. That won't take you all the way to a good design
-- some of the resulting classes will be too trivial, and it won't
give you the derived classes you need, but it's a good first step to
breaking a problem down, and might help break your one big class
habit.

-- 
Tim Rowe



More information about the Python-list mailing list