[
https://issues.apache.org/jira/browse/SHINDIG-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606808#action_12606808
]
Chris Chabot commented on SHINDIG-321:
--------------------------------------
Ok wait a moment, There's something rotten in the state of Denmark
I get why you would want to name space things like 'Name', 'Person', etc. I
detest the need for it but recognize the merit of the case since their very
common class names.
But what is the logic behind renaming UserPref to Shindig_UserPref, and in the
same breath leaving Locale as Locale... not to mention all the other generic
base class names... That makes me feel this patch is based on one use-case, and
not a patch to 'clean up the name spacing in shindig'. It introduces
inconsistency, and inconsistency is the creator of bugs.
I was >< that close to applying the patch until i saw the UserPref change in
the patches and that got me wondering :)
In other words, is it Cache, Shindig_Cache, Locale or Shindig_Locale, Person or
Shindig_Person? Crypto or Shindig_Crypto? RemoteContent or
Shindig_RemoteContent? If you picked one answer you'd be wrong 50% of the cases
in this example and that's a horrible way to treat a fellow software engineer :)
If there was some consistency to it that we could explain, like "All the Open
Social models are called OpenSocial_FooBar" or "Shindig_FooBar" for all i care,
but the rest of the names were non-namespaced ... well it would be a bit of
inconsistency but could be documented and explained. However "pick one naming
convention and you have a 50% chance it's right" makes for bad documentation :)
If you can come up with a consistent patch, and defend why that's the right way
to go i'll gladly accept it since it's a problem that should be solved.
> NameSpace collition in PHP Classes
> ----------------------------------
>
> Key: SHINDIG-321
> URL: https://issues.apache.org/jira/browse/SHINDIG-321
> Project: Shindig
> Issue Type: Improvement
> Components: Common Components (PHP), Gadget Rendering Server (PHP)
> Reporter: bruno rovagnati
> Attachments: namespace_email.patch,
> namespacer_cache_setpref_setprefs.patch, shindig_namespace.patch
>
>
> Some classes are having conflicting names such as Cache, Name, Email, Person
> etc... (mainly src/socialdata/opensocial/model/*)
> I suggest to move those class name to a Shindig_Cache, Shindig_Name, etc.
> (Zend-like namespace convention)
> i'll start adding patched to these classes that are conflicting while
> implementing shindig
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.