From: Jonny B. <jo...@ti...> - 2011-07-26 09:07:06
|
I've alway reckoned on there being nearly as many naming conventions in Tiki as devs, so my approach has been to use whatever the file i'm working in already uses. If i'm making new files i'll usually go do camelCase, although still for some php uses lower_with_underscores still seems good. I agree with LPH, it's not worth going back and fixing old stuff just for the sake of appearance, but to clean up and be consistent (camelCaseWise i guess) in new code. As far as filenames goes the instructions should be changed, as many included files now follow the class naming conventions - "root" files though (and their tpl's), i think, should remain lower case only. My 2c jb On 25 Jul 2011, at 22:01, Louis-Philippe Huberdeau wrote: > The lowercase convention is a bit outdated. For classes, the file name must match the class name for autoload to work and remain PSR-0 compliant, which the Zend Framework is based on. > > There are a lot of inconsistencies like that in Tiki and it's primarily due to age. I don't think it's worth spending too much effort to fix. Not everything will be done, so the problem will remain and this has a fairly low impact. With all of the parameters in most functions, it's not like guessing where the file is or what the function name is will be so much help. Getting rid of the reliance on global variables and extremely long functions is much more helpful in making the code easier to understand and work with. Following conventions for the new work is a good thing and there are a lot more facilities to help in doing so. > > -- > LP > > On Mon, Jul 25, 2011 at 3:50 PM, Robert Plummer <rob...@gm...> wrote: > I smell cleanup. > > On Mon, Jul 25, 2011 at 3:39 PM, Mauriz Lustenberger <mau...@gm...> wrote: > What about file names? DevTips says, that all file names must be lowercase. > However, at least on my system, unit tests won't run that way. > > Example: > • 'someclasstest.php' does not work > • 'someclassTest.php' does work > > My conclusion is, that the section about file names in DevTips should be updated > (??? 'SomeClassTest.php' to test 'SomeClass.php' ???) > > Cheers > Mauriz > > ------------------------------------------------------------------------------ > Storage Efficiency Calculator > This modeling tool is based on patent-pending intellectual property that > has been used successfully in hundreds of IBM storage optimization engage- > ments, worldwide. Store less, Store more with what you own, Move data to > the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/ > _______________________________________________ > TikiWiki-devel mailing list > Tik...@li... > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel > > > > > -- > Robert Plummer > > ------------------------------------------------------------------------------ > Storage Efficiency Calculator > This modeling tool is based on patent-pending intellectual property that > has been used successfully in hundreds of IBM storage optimization engage- > ments, worldwide. Store less, Store more with what you own, Move data to > the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/ > _______________________________________________ > TikiWiki-devel mailing list > Tik...@li... > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel > > > ------------------------------------------------------------------------------ > Storage Efficiency Calculator > This modeling tool is based on patent-pending intellectual property that > has been used successfully in hundreds of IBM storage optimization engage- > ments, worldwide. Store less, Store more with what you own, Move data to > the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/_______________________________________________ > TikiWiki-devel mailing list > Tik...@li... > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel |