[wp-hackers] Term Meta - Trac'd already?
otto at ottodestruct.com
Wed Jul 13 20:07:10 UTC 2011
On Wed, Jul 13, 2011 at 2:58 PM, Mike Schinkel
<mikeschinkel at newclarity.net> wrote:
> What's the definition of an "object" in WordPress such that some things apply and others do not?
I'm making a distinction between objects, which can stand alone, and
meta, which can't as it has to describe things that stand alone.
- Posts. Users. Links. These are "objects" as I see it. They exist
independently, and really need no meta to describe them.
- Meta. Taxonomy. Terms. These apply some information to those
objects. They have to apply to something, otherwise they're without
meaning. They must reference some object.
A taxonomy, for example, can't stand alone. For it to have semantic
meaning, it has to apply to something else. They are not objects, they
are ways of grouping objects. Their meaning comes from being applied
to other things. A term doesn't even have that much, it's really just
a string label for the taxonomy. It has no existence apart from the
taxonomy that it is labeling.
I think that things tend to just work better when you fit them into
this framework. If you start trying to treat everything as an object,
you end up with nonsensical relationship methods. Treating a term as
an object, for example, implies that you can put terms into taxonomies
themselves. Grouping the labels of other groups. This rapidly becomes
crazy and doesn't relate well to other parts of the system such as the
template hierarchy and the query system.
> P.S. Also, are you making a distinction between "Term" not being an object yet "Term Taxonomy" is an object? Or not?
Neither is an object.
More information about the wp-hackers