|
This session presents general object-oriented design principles, but focuses on object design issues where Python is distinct from mainstream statically-typed languages.
For example: What kinds of Lightweight design tools make sense in Python, and which does Python obviate? What would it mean to have interfaces in Python, and what sort of features would be valuable? Since Python produces smaller code, can objects be bigger? Tradeoffs in static vs. dynamic type checking on design and implementation. What you can do in the constructor vs statically-typed languages.
Not rules, but guidelines and ideas presented for discussion: Interface inheritance vs. implementation inheritance, substitution vs extension, the impact of Python on these concepts. Partitioning your design into objects. Not enough objects and objects that are too big/complex. Creating robust objects. Wiring together objects to create an application. Design by contract; Base classes as interfaces with constraints. Preferring composition to inheritance.
Design patterns issues: Which design patterns in GoF are so C++-ish that they don't make sense in Python? Does the Visitor design pattern have any relevance in Python? Built-in design patterns: Generators (special case of factories). Python and the homogeneity problem (Composite pattern, using isinstance).
|