{
    "href": "/post/2008/08/20/bread-not-crud/",
    "relId": "2008/08/20/bread-not-crud",
    "title": "BREAD, not CRUD",
    "author": "pmjones",
    "markup": "html",
    "tags": [
        {
            "href": "/tag/php/",
            "relId": "php",
            "title": "PHP",
            "author": null,
            "created": null,
            "updated": [],
            "markup": "markdown"
        },
        {
            "href": "/tag/solar/",
            "relId": "solar",
            "title": "Solar",
            "author": null,
            "created": null,
            "updated": [],
            "markup": "markdown"
        }
    ],
    "created": "2008-08-21 02:16:39 UTC",
    "updated": [
        "2008-08-21 02:16:39 UTC"
    ],
    "html": "<p>Several developers have asked me what \"BREAD\" means in web applications.  Most everyone knows that CRUD is \"create, read, update, delete,\" but I think that misses an important aspect of web apps: the listing of records to select from.</p>\n<p>I don't recall where I first heard the term BREAD; it stands for \"browse, read, edit, add, delete\".  That covers more of what common web apps do, including the record listings.  It even sounds nicer:  \"crud\" is something icky, but \"bread\" is warm and fulfilling.  That's why I tend to use the term BREAD instead of CRUD, especially when it comes to <a href=\"http://solarphp.com\">Solar</a> and action-method names in the application logic.</p>\n<p><strong>Update 1 (2008-08-21):</strong> Wow, lot of traffic from Reddit and Y-Combinator on this one.  Be sure to check out my post on <a href=\"http://paul-m-jones.com/blog/?p=238\">Web Framework Benchmarking</a>, and of course the <a href=\"http://solarphp.com\">Solar Framework for PHP 5</a>.</p>\n<p>I see a couple of comments saying that \"browse is the same thing as read, it's just a special-case of read.\"  I can see where that would be true, in a limited way. Using similar logic, one could argue that \"add\" is a special case of \"edit\", it just happens that the record isn't there yet; and then \"delete\" is another special case of \"edit\", you're just editing it out of existence.  So that leaves you with just Read (one/many) and Edit (existing/non-existing/out-of-existence).</p>\n<p>I think that takes things way too far.  ;-)  The special cases of \"edit\" are *so* special that they deserve their own logic.  I think the same thing applies to \"browse\" -- it might be a special case of \"read\", but it's different-enough to deserve its own place.</p>\n<p><strong>Update 2:</strong> <a href=\"http://www.weierophinney.net/matthew/\">Matthew Weier O'Phinney</a> refreshes my memory -- he mentioned the term to me years ago in a discussion about his <a href=\"http://cgiapp.sourceforge.net/\">PHP port of CGI::App</a>.  Thanks, Matthew!</p>\n<p><strong>Update 3:</strong> I said above that you could reduce all operations to \"read\" (with 2 cases) and \"edit\" (with 3 cases).  It occurs to me now that those correspond to the way GET and POST are most-widely used.  So maybe it wasn't such a silly argument after all. ;-)</p>\n<hr>\n<p class=\"reddit-links\">Read the Reddit discussion about this post <a href=\"https://www.reddit.com/r/programming/comments/6xany/bread_not_crud/\">here</a>.</p>\n"
}
