David, that is excellent, then it sounds like you're on the right path. :)

The only reason why I suggested OPP is that in this case, they are indeed
‘types’ of the same kind of project. The differences between them are
pretty small and the rest of the functionality (methods) and data
(variables) should remain the same for all projects/types. All what I
intend to do is cater for those small exceptions.

Defining content as hierarchy of objects is called Data Modelling and is
very similar to Class Modelling, but differ in some important ways and I’d
suggest understanding them both in your case.

The difference is, while Class Modelling defines a hierarchy of behaviour
and responsibility, Data Modelling defines a hierarchy of information,
often in terms of simplified concepts.

E.g. a Map is a data model of complex terrain, a Line object may represent
a road and a Square a building. Another data model is our use of schemas
(can’t believe this term has showed up three days in a row now :) in which
we define a “terrain” of film concepts - e.g. film/sequence/shot.

E.g. you could define a Url with Class Modeling as consisting of a Scheme,
Host and Path; Path possibly being sub-classed based on domain - e.g. for
Windows versus Posix paths.

With Data Modelling and OOP, I would suggest thinking more in terms of
composition rather than inheritance - a “has-a” relationship between
objects, as opposed to a “is-a”. You could then move on to defining
behaviour as separate objects more fit for Class Modelling that operate on
your data-modelled objects. (i.e. responsibility-driven design).

What you end up with is loosely-coupled data objects and loosely-coupled
behavioural objects, orchestrated in each of your applications.

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOB1AT6GNcb1YOoWjd8c4jD7J%2B%3DxPHSrqt2qovhiyFbu_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to