[wp-hackers] Meta tables: Take 5
mikeschinkel at newclarity.net
Mon Jul 27 02:41:30 UTC 2009
I'm curious; if CRUD is bad, what is good?
Custom Wordpress Plugins
----- Original Message -----
From: "Jacob Santos" <wordpress at santosj.name>
To: wp-hackers at lists.automattic.com
Sent: Sunday, July 26, 2009 10:24:20 PM GMT -05:00 US/Canada Eastern
Subject: Re: [wp-hackers] Meta tables: Take 5
Well, I think it is fine, except for object_id doesn't really have an explanation. Why not $id, instead? The problem is that it doesn't explain what the object part is, so it can be anything. It is the ID of the type you are looking for, so post, comment, category, etc. Why not just name it ID and leave out the question of what 'object' means. People understand what ID means.
I'm not trying to argue against CRUD, I just wish another pattern or architecture was choosen for WordPress. CRUD is very simple and quick to implement. I just shudder every time I see it within WordPress and within my own code (papa doesn't like spending forever on "proper" design). Therefore, I'm trying to not argue CRUD in a wierd way, but still say it sucks and I very much hate it.
On Mon, 27 Jul 2009 03:17:30 +0300
scribu <scribu at gmail.com> wrote:
> On Mon, Jul 27, 2009 at 12:21 AM, Jacob Santos <wordpress at santosj.name>wrote:
> > CRUD in procedural form. Alas, it seems flawed somehow. The look, the feel;
> > The wonder about how to make it better. Is there such a solution?
> > It seems a pity to look at something so beautiful in its simplicity and
> > then ask why? What purpose is there to mock something that should be so
> > clerished and loved and yet not provide another?
> > Not that objects are any better, just better organized. A shame really.
> > I do cry every time I see CRUD.
> > Good work nevertheless. I hope you choose to name the parameters better.
> > There is a concept called, "Self-documenting Code" that is just plain
> > awesome in its beauty and soft skin.
> > Jacob Santos
> Thanks for the comment - very poetic, but not really helpful.
> Don't know how I could rename the parameters to be more self-documenting
> than they already are. Metaphors maybe? :)
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
Jacob Santos <wordpress at santosj.name>
wp-hackers mailing list
wp-hackers at lists.automattic.com
More information about the wp-hackers