[wp-hackers] Idea: Widgets as custom post types

Chris Williams chris at clwill.com
Tue Mar 2 22:06:29 UTC 2010


OTOH, I think this is a good enough idea for ME to come out of lurk mode.

A good database query system (as that in MySQL) can rapidly determine that the size of the index on post "type", with a very narrow range of values, makes it the first thing to search on.  It will, therefore instantly winnow the list down to the 8-16 widgets in the list, and subselecting in that set is trivial.

In fact, there is a performance argument to be made to keep everything in as few tables as possible, as the key nodes of the indexes for those few tables will always be in memory.

As for "clean" code, I'm sorry but adding (AND POST_TYPE = "widget") to queries is hardly burdensome.

I think the whole religious argument about is WP a blogging platform or a CMS is so ridiculous as to sound like something from a Monty Python sketch.  Literally every site I've done (granted no where near as many as most of you), are web sites that have a blogging component.  But the key value of WP is the ease of startup, the ease of management, the ease with which you can train new content creators, and the incredible ecosystem of developers creating plugins, themes, tools, and so on.  To deny it's content management values because of its roots is silly.

My $0.02, I return you to your normal bikeshed color discussion.

________________________________
From: Brian Layman <bulk at thecodecave.com>
Subject: Re: [wp-hackers] Idea: Widgets as custom post types

I'm sorry but I think this is a horrible idea. Horrible enough to come out
of lurk for it..

Why would I want to store my 8-16 widgets in tables that, in one db I just
looked at, has 434,921 non-widget-related records? I don't think it makes
sense.




More information about the wp-hackers mailing list