[Phpmyadmin-devel] [GSoC2012] Refactoring: Table search, Db search, Multi-table query

Ammar Yasir ayax88 at gmail.com
Tue Apr 3 00:39:09 CEST 2012


On Mon, Apr 2, 2012 at 9:14 PM, Marc Delisle <marc at infomarc.info> wrote:

> Le 2012-04-02 11:33, tuncay kilicoglu a écrit :
> >
> > I need to take some advice before I start reading source code. What kind
> of
> > refactoring styles are we talking about? What are Table search, db search
> > and multitable query are related to? What's bad with current code? Do we
> > also need to modularize scripts into seperate for better abstraction? or
> > It's about refactoring inner details of functions? or is it about
> > objectifying the code?
>
> Here is what needs improvement in the current code:
>
> - large chunks of procedural code without functions
> - reference to global variables
>
Hi,
Can we have more clarity on improving reference to global variables. Is the
following snippet an example of the same where?
(From tbl_select.php, $_POST parameters are referenced through $GLOBALS)
$post_params = array(
    'ajax_request',
    'collations',
    'db',
    'distinct',
    'fields',
    'func',
    'max_number_of_fields',
    'names',
    'order',
    'orderField',
    'param',
    'session_max_rows',
    'table',
    'types',
    'where',
);
foreach ($post_params as $one_post_param) {
    if (isset($_POST[$one_post_param])) {
        $GLOBALS[$one_post_param] = $_POST[$one_post_param];
    }
}



> - HTML and PHP mixed together (but we are not implementing a templating
> solution)
>
> Going to OOP is not necessary in the project but would be welcome.
>
> >
> > Please give me a quick brief about project because I couldn't find any on
> > mailing list. (You may give the link for the thread, too)
>
>
>
> --
> Marc Delisle
> http://infomarc.info
>
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20120403/494de809/attachment.html>


More information about the Developers mailing list