[Phpmyadmin-devel] Refactoring: Displaying query results
pe.chanaka.ck at gmail.com
Tue May 8 15:25:17 CEST 2012
On Tue, May 8, 2012 at 6:42 PM, Marc Delisle <marc at infomarc.info> wrote:
> Le 2012-05-08 09:01, Chanaka Dharmarathna a écrit :
> >>> Hi Rouslan,
> >>> Do you have any idea of using different naming conventions for this
> >>> ('PMA_generate_slider_effect') function than general. (not only this,
> >> there
> >>> are several functions)
> >>> Generally function names are like 'PMA_meaningfulDescription()'. This
> >> does
> >>> not use underscores after 'PMA_' part and use camel caps.
> >>> But here it is 'PMA_generate_slider_effect()'. Its different.
> >>> As well, Since this function is going to return a string after
> >>> the name should be change to give a meaning to the user (developer).
> >>> I'm thinking modify the name with 'get' phrase for that kind of
> >> functions.
> >>> Ex :- 'PMA_getSliderEffectGeneratingHtml()' instead of
> >>> 'PMA_generate_slider_effect' (existing one)
> >>> Do you have any suggestions on that ?
> >>> Regards !
> >> PMA_getDivForSliderEffect()
> >> By the way, this is the naming convention for a global function (outside
> >> a class). Will this be inside a class?
> > Hi Marc,
> > That name is seems pretty good. Thanks for suggesting.
> > And Marc, what about the naming convention of local (for a class)
> > As I feel common.lib.php file should contain a class and this function
> > be inside that.
> > Regards !
> See "Class Variables and Methods" in .
>  http://pear.php.net/manual/en/standards.naming.php
> Marc Delisle
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
I went through that document.
If the function is global, it will be like 'PMA_getDivForSliderEffect()'
And if it is a local function (for particular class), it will be like
Though I went through that document before this, I couldn't get that point.
Thanks for pointing out that.
Bsc.Computer Engineering Undergraduate
Faculty of Engineering
University of Peradeniya
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Developers