[Phpmyadmin-devel] Refactoring: Displaying query results

Michal Čihař michal at cihar.com
Thu May 3 13:08:58 CEST 2012


Hi

Dne Tue, 1 May 2012 02:02:38 +0530
Chanaka Dharmarathna <pe.chanaka.ck at gmail.com> napsal(a):

> I'm identifying the refactoring points in 'display_tbl.lib.php' file. I am
> trying to break the tasks on following areas.
> 
> * As a library file this should not render the HTML codes in functions it
> selves. First, all the HTML content in functions stored in string and
> render at the bottom of the function.
> Next, return the string having the HTML content, instead of rendering it
> inside the function itself and, from the calling end render that content.
> Probably method names will be modified with adding 'get' phrase.
> 
> * Some naming conventions are used incorrectly. For method name in lib
> file, naming convention is used generally used as 'PMA_methodName'. But
> some are not following this.
> While correcting them, suggested conventions in my proposal [0] is going to
> applied.
> 
> * There are several functions having more than 200 lines. I'm intending to
> divide those functions to smaller ones. (PMA_displayTableNavigation(),
> PMA_displayTableHeaders(), PMA_displayTableBody(),
> PMA_displayVerticalTable(), PMA_displayTable())

I think all this should be rather wrapped in object, so it would be
PMA_Display::someFunction.

-- 
	Michal Čihař | http://cihar.com | http://blog.cihar.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20120503/825a2f5b/attachment.sig>


More information about the Developers mailing list