We talk about "Zend_XmlRpc" translating to "Zend\XmlRpc.php" vs. "Zend_XMLRPC" -> "Zend\XMLRPC.php", but I think it's interesting to note how, in many ORMs, database column_names are camelCased automatically for getters/setters:
> last_modified -> setLastModified > raw_xml_http_response -> getRawXmlHttpResponse The power with certain conventions, in my opinion, is translating one convention to another via automated means. The fact that XML & RPC are acronyms is transparent to "convention." What matters is that XML & RPC need some sort of delimiter to distinguish between the two "words", whether it be an underscore or capitalization of the first character. Either way, we'll see how the poll goes and inevitably side with the community's decision. This constitutes my one list contribution for the month :) -Eric Clemmons On Jul 12, 2010, at 12:38 AM, Matthew Ratzloff wrote: > Mixed case seems easier, especially when you have two acronyms next to each > other. Case in point: Zend_Controller_Request_Http::isXmlHttpRequest(). > > Is this formatted in acronym case? Then it should be isXMLHTTPRequest(). > > Is this formatted according to its actual formatting in JavaScript? Then it > should be isXMLHttpRequest() (see http://www.w3.org/TR/XMLHttpRequest/). > > Sure, PHP is case insensitive with regard to method names, but Zend_XmlRpc > would be Zend\XMLRPC, wouldn't it? Seems awkward. > > -Matt > > On Fri, Jul 9, 2010 at 1:07 PM, Matthew Weier O'Phinney <[email protected]> > wrote: > One complaint we've heard often of ZF users is confusion over how > acronyms are represented in class names. > > As an example, many suggest that "Zend_PDF" is more semantically correct > and easier to remember than "Zend_Pdf". On the other side of the coin, > many developers feel that our MixedCasing or Titlecasing of acronyms is > a simple, easily learned rule that makes typing easier. > > For ZF2, we started converting code to use each acronym's proper casing. > However, we're not done yet, and there are good arguments on both sides > of the debate. > > Our team is at a point where we actually think the important thing is to > simply have a rule. As such, we're leaving it up to you, our users, to > decide. > > Simply fill out this form: > > http://short.ie/zf-acrocase > > We'll close it in a week or so, and use the decision from that form to > determine how to proceed. We even promise to publically export the > results, in the interest of transparency. :) > > So, help choose the direction of ZF2 today! > > -- > Matthew Weier O'Phinney > Project Lead | [email protected] > Zend Framework | http://framework.zend.com/ > PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc >
