[wp-hackers] Term Meta - Trac'd already?

Otto otto at ottodestruct.com
Wed Jul 13 20:43:05 UTC 2011


On Wed, Jul 13, 2011 at 3:28 PM, Mike Schinkel
<mikeschinkel at newclarity.net> wrote:
> But just because something describes something doesn't mean that it doesn't also need to be described; that's there the concept of "meta meta" comes from.

The problem as I see it is one of efficiency. How many layers can you
add to the dream before falling into limbo? When you start having to
pull meta from the database, then to pull meta for the meta, you start
making more and more queries. This makes your code more complex and
fragile. Prone to breakage from new core changes. That sort of thing.

Yes, your perspective is all very database relational model and such,
but at some point, you have to sit back and re-examine what it is that
you're building here. You may have noticed that the WP database is
pretty far from 3rd normal form, but it's fast for the specific case
of serving a webpage. If you start adding layers, you rapidly build a
"correct" site, ... and which can be so slow as to be useless.

There's specific cases where tricks like this are useful, but I
consider them to be just that: tricks. One-offs. Not necessarily a
good base upon which to build a system. Honestly, sometimes it's
better to just make a new database for your specific data instead of
trying to shoehorn things into the WP data format. Depending on the
data and the use case, of course. Most cases can be fit into custom
post types and meta and taxonomies, without additional layers on top.
Maybe not all cases, but in such cases it's worth asking if that data
structure should live in the WP formats at all, or get its own custom
tables.

-Otto


More information about the wp-hackers mailing list