{
    "href": "/post/2012/12/20/a-response-to-on-php-fig-and-shared-interfaces/",
    "relId": "2012/12/20/a-response-to-on-php-fig-and-shared-interfaces",
    "title": "A Response To \"On php-fig and Shared Interfaces\"",
    "author": "pmjones",
    "markup": "html",
    "tags": [
        {
            "href": "/tag/php/",
            "relId": "php",
            "title": "PHP",
            "author": null,
            "created": null,
            "updated": [],
            "markup": "markdown"
        },
        {
            "href": "/tag/programming/",
            "relId": "programming",
            "title": "Programming",
            "author": null,
            "created": null,
            "updated": [],
            "markup": "markdown"
        }
    ],
    "created": "2012-12-21 01:27:10 UTC",
    "updated": [
        "2012-12-21 01:27:10 UTC"
    ],
    "html": "<p>(This is a response to <a href=\"http://mwop.net/blog/2012-12-20-on-shared-interfaces.html\">Matthew Weier O'Phinney</a>. Full disclosure: MWOP is both my friend and respected peer.  Also, like MWOP, I am a voting member of <a href=\"http://www.php-fig.org/\">PHP-FIG</a>, and was directly involved in the recent LoggerInterface discussion among that group.)</p>\n<hr>\n<p>Matthew wrote:</p>\n<blockquote>\n<p>My primary problem with the idea of shared interfaces is that I feel there is always room for new thinking and ideas in any given problem space, and that this thinking should not be restricted by what already exists.</p>\n</blockquote>\n<p>By definition, truly new thinking is not generally restricted by what already exists. ;-)  If lots of developers adopt new thinking on an old problem, I think it is completely within reason to deprecate an older PSR and write a new one that codifies the new approach.</p>\n<p>Even so, I always thought a major point of PHP-FIG was to recognize which things we already do much the same way and codify PSRs around them. (I will admit I continue to be frustrated by the unwillingness of other members to do basic research and discovery of this kind.)</p>\n<p>Thus, when we consider functionality ...</p>\n<ul>\n<li>that <em>does</em> already exist,</li>\n<li>that has been implemented by multiple different projects,</li>\n<li>in ways that are similar despite their varying origins,</li>\n</ul>\n<p>... I think it can be very useful to reduce the differences and combine the commonalities into a shared interface.</p>\n<p>In the specific case of logging, as Matthew gives, I reviewed each member project's logging interface or base implementation:</p>\n<p><a href=\"https://groups.google.com/group/php-fig/msg/6e4285dc3116331c?dmode=source&amp;output=gplain&amp;noredirect&amp;pli=1\">https://groups.google.com/group/php-fig/msg/6e4285dc3116331c?dmode=source&amp;output=gplain&amp;noredirect&amp;pli=1</a></p>\n<p>True, I was examining them in reference to the string-interpolation portion of the proposed LoggerInterface.  But I was struck overall by how similar they really were in terms of the basic notification methods. Differences were minor at best.  For something like that, a shared interface sounds to me like an unqualified good.</p>\n<hr>\n<p>Matthew also wrote:</p>\n<blockquote>\n<p>Secondarily, I feel that it's okay for a given project to be selective about what capabilities it requires for its internal consumption and consistency, and should not limit itself to a standardized interface.</p>\n</blockquote>\n<p>I completely agree. There's nothing that says a development effort is required to adopt anything from PHP-FIG.  If someone thinks their way is better, then by all means ignore any and/or all PSRs entirely.</p>\n<hr>\n<p>To sum up (and MWOP, please correct me if I'm not getting what you're saying):</p>\n<p>One is able to <em>imagine</em> reasons why having shared interfaces of the kind described above is in opposition to, or at best orthogonal to, better development practices and greater innovation across PHP land.</p>\n<p>Even so, I assert that shared interfaces as described, while maybe preventing an <em>imaginable</em> ideal in theory, instead promote an <em>actual</em> good in practice.</p>\n<p>The actual good can never be as desirable as the imaginable future ideal, but it does have the benefit of being real and present.</p>\n<hr>\n<p><strong>UPDATE:</strong> MWOP informs me by private communication that I have missed his point. <del>I await his next missive.</del> Here's his response: <a href=\"http://mwop.net/blog/2012-12-20-on-shared-interfaces.html#comment-744905017\">http://mwop.net/blog/2012-12-20-on-shared-interfaces.html#comment-744905017</a></p>\n"
}
