[Owncloud] namespacing
Frank Karlitschek
frank at owncloud.org
Mon Apr 23 15:23:15 UTC 2012
On 23.04.2012, at 13:53, Frank Karlitschek <frank at owncloud.org> wrote:
>
> On 23.04.2012, at 11:03, Arthur Schiwon <blizzz at owncloud.com> wrote:
>
>>
>>
>> On 04/22/2012 02:54 PM, Frank Karlitschek wrote:
>>>
>>> On 22.04.2012, at 14:47, Bartek Przybylski<bart.p.pl at gmail.com> wrote:
>>>
>>>> Heya!
>>>>
>>>> W dniu 22 kwietnia 2012 14:40 użytkownik Georg Ehrke
>>>> <ownclouddev at georgswebsite.de> napisał:
>>>>> Am 22.04.2012 um 14:37 schrieb Bartek Przybylski:
>>>>>
>>>>>> Heya!
>>>>>>
>>>>>> W dniu 22 kwietnia 2012 14:28 użytkownik Frank Karlitschek
>>>>>> <frank at owncloud.org> napisał:
>>>>>>> Hi everybody,
>>>>>>>
>>>>>>> currently all Classes in ownCloud start with OC_
>>>>>>> This leads to a problem if one app wants to use a class name thats already used in the core or in another app.
>>>>>>> A second problem is that we want to build a public api that's stable across different ownCloud version. If apps calls all the internal classes/functions or session variable we run into a problem in the long run.
>>>>>>>
>>>>>>> Because of that I propose this new namespacing schema:
>>>>>>>
>>>>>>> OC_ "ownCloud " Reserver for internal classes and session variables or the core
>>>>>>> OCP_ "ownCloud public" Reserved for the new public API that has to be used by apps exclusively. (Still has to be build)
>>>>>>> OCA_"appidentifier"_ "ownCloud App" Reserver for use in ownCloud apps. The unique identifier has to be in the class name so that it doesn`t clash with other apps.
>>>>>>>
>>>>>>>
>>>>>>> What do you think?
>>>>>>>
>>>>>>
>>>>>> Why not use namespacing builded in language ?
>>>>>> http://php.net/manual/en/language.namespaces.php
>>>>> I would appreciate this too.
>>>
>>> Sure. Something to consider. I personally don´t like the syntax but that´s not important. :-)
>>
>> I'd also go with PHP namespaces.
>
>
> Hehe. I think it makes sense because it just the official way in PHP 4.3 to do it.
I mean 5.3 of course. :-)
> I personally just have an aversion against backslashes from my Windows time 15 years ago ;-)
>
> So lets use the OC, OCP and OCA_<appid> namespaces.
I heard that this wasn´t clear enough.
Yes. We use the PHP namespaces :-)
> I will work on the OCP part a bit the next few days.
>
> App developer can port their stuff to the OCA<appid> anytime because this shouldn´t break anything.
> In the ownCloud 5 development cylce we should port the OC_ prefixes to the OC namespace.
>
> I hope that´s O.K. with everybody. :-)
>
> Frank
>
>
>>
>>>
>>>
>>>> Obviously this will require more amount of work but might make
>>>> owncloud true OOD and OOP product.
>>>>
>>>>>>
>>>>>>>
>>>>>>> Cheers
>>>>>>> Frank
>>>>>>>
>>>>>>
>>>>>> bartek
>>>>>> _______________________________________________
>>>>>>> Owncloud mailing list
>>>>>>> Owncloud at kde.org
>>>>>>> https://mail.kde.org/mailman/listinfo/owncloud
>>>>>> _______________________________________________
>>>>>> Owncloud mailing list
>>>>>> Owncloud at kde.org
>>>>>> https://mail.kde.org/mailman/listinfo/owncloud
>>>>>
>>>>> _______________________________________________
>>>>> Owncloud mailing list
>>>>> Owncloud at kde.org
>>>>> https://mail.kde.org/mailman/listinfo/owncloud
>>>> _______________________________________________
>>>> Owncloud mailing list
>>>> Owncloud at kde.org
>>>> https://mail.kde.org/mailman/listinfo/owncloud
>>>
>>> _______________________________________________
>>> Owncloud mailing list
>>> Owncloud at kde.org
>>> https://mail.kde.org/mailman/listinfo/owncloud
>> _______________________________________________
>> Owncloud mailing list
>> Owncloud at kde.org
>> https://mail.kde.org/mailman/listinfo/owncloud
>
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud
More information about the Owncloud
mailing list