[Phpmyadmin-devel] Refactoring: Displaying query results

Michal Čihař michal at cihar.com
Wed May 23 08:44:35 CEST 2012


Hi

Dne Tue, 22 May 2012 22:37:47 +0530
Chanaka Dharmarathna <pe.chanaka.ck at gmail.com> napsal(a):

> On Tue, May 22, 2012 at 6:02 PM, Rouslan Placella <rouslan at placella.com>wrote:
> > BTW, what about extending our existing PMA_Table class? I'm not sure how
> > good of an idea it is, so I'm just throwing it out there...

I don't think this would be useful, this class should care less about
table (actually should be table independent) and more oriented on
displaying results.

> Thanks for participating to this discussion and share your valuable
> suggestions.
> 
> As I remember Michal has already suggested to not to use an object of this
> case.
> And use PMA_Display::someFunction where needed.
> Thats why I focused on static fields and behaviors.

Well it was just a naming condition, you should really make that
object, get parameters in constructor. So basically Rouslans example is
what I would expect.

> The constructor of the function only executed, if create an object of a
> class. (I think your code trying to say create an object, new keyword is
> missing there).
> So I don't think to get the use of a constructor. That's why I'm using a
> function for initialize instance variables.
> 
> I'm agreed to use more meaningful name. It is better if we can name it as
> PMA_DisplayTable .

PMA_DisplayResults might be better. Please remember this should not be
about displaying tables but results of any SQL query - results of
stored procedure, browsing SQL processes or displaying binary log.

-- 
	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/20120523/836a0d70/attachment.sig>


More information about the Developers mailing list