[Owncloud] namespacing

Thomas Tanghus thomas at tanghus.net
Thu Oct 4 09:03:34 UTC 2012


On Saturday 11 August 2012 14:37 Victor Dubiniuk wrote:
> On Thu, Jul 26, 2012 at 3:37 PM, Bart Visscher <bartv at thisnet.nl> wrote:
> > On Wed, Jul 25, 2012 at 06:33:06PM +0200, Arthur Schiwon wrote:
> > > The suggestion was actually to use \OCA_appid\ as namespace, what i
> > > did was to support the pattern \OCA\appid\ in the autoloader.
> > > 
> > > The first pattern is e.g. used in the app files_version
> > > 
> > > namespace OCA_Versions;
> > > class Hooks { .. }
> > > 
> > > Having two different approaches is of course bad style and should be
> > > avoided. Frank and I wonder now, what the better and more intuitive
> > > way is: \OCA_appid\ or \OCA\appid\
> > > 
> > > Thoughts, opinions?
> > 
> > \OCA\appid\ cleaner and simpler to parse
> > 
> > Bart
> 
> \OCA\appid\ is actually a nested namespace, but I agree that it is cleaner.

Remind me: What did we end up with on this? I too prefer \OCA\appid\ - 
OCA_Appid\Classname is kind of a half-breed imho - and I have used it in my 
own app, but now I realize that I might have given wrong advice.

-- 
Med venlig hilsen / Best Regards

Thomas Tanghus



More information about the Owncloud mailing list