Hi,
I am Tuncay Kılıçoğlu. I study Computer Engineering at Çanakkale 18 Mart University, Turkey. Open source is very popular at our university (4 of my classmates were at GSoC last year :) ) , I have involved with some open source projects with Pardus ( A Turkish Linux distro that had been to GSoC 2 times before). I joined COMAK project which is a project about running Pardus tools with Gnome rather than KDE. I love Gnu/Linux.
Besides that, I have worked at a few commercial companies for a year w,th PHP. I used to use Zend framework for a long time. I'm well adapted to PHP's niceties. I've used Mysql so far and PhpMyadmin is my favoriate database manager interface. I also liked software engineering lessons at school a lot and I use many refactoring techniques consistently.
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?
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)
Thanks in advance, Best,
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 - 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)
On Mon, Apr 2, 2012 at 9:14 PM, Marc Delisle marc@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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Le 2012-04-02 18:39, Ammar Yasir a écrit :
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]; } }
Ammar, this snippet is code added recently, to be able to remove the grab_globals.lib.php library.
tbl_select.php uses globals instead of directly referencing $_POST['foo'] so this snippet was a way to keep the script working until better refactoring.
However, many scripts are using other global variables as a way to communicate between them or between functions, and we should try to minimize this behavior.
On Tue, Apr 3, 2012 at 8:23 PM, Marc Delisle marc@infomarc.info wrote:
Le 2012-04-02 18:39, Ammar Yasir a écrit :
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]; } }
Ammar, this snippet is code added recently, to be able to remove the grab_globals.lib.php library.
tbl_select.php uses globals instead of directly referencing $_POST['foo'] so this snippet was a way to keep the script working until better refactoring.
However, many scripts are using other global variables as a way to communicate between them or between functions, and we should try to minimize this behavior.
Is the use of $sql_query variable as a GET variable for sql.php an
example of the same? (communication between scripts)
-- Marc Delisle http://infomarc.info
Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Le 2012-04-06 07:38, Ammar Yasir a écrit :
On Tue, Apr 3, 2012 at 8:23 PM, Marc Delisle marc@infomarc.info wrote:
Le 2012-04-02 18:39, Ammar Yasir a écrit :
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]; } }
Ammar, this snippet is code added recently, to be able to remove the grab_globals.lib.php library.
tbl_select.php uses globals instead of directly referencing $_POST['foo'] so this snippet was a way to keep the script working until better refactoring.
However, many scripts are using other global variables as a way to communicate between them or between functions, and we should try to minimize this behavior.
Is the use of $sql_query variable as a GET variable for sql.php an
example of the same? (communication between scripts)
GET and POST variables are always about communication between scripts, right?
I meant that some functions are either using the global keyword or $GLOBALS to reach some global variables. Also, procedural code in included files are using global variables.
On Fri, Apr 6, 2012 at 5:21 PM, Marc Delisle marc@infomarc.info wrote:
Le 2012-04-06 07:38, Ammar Yasir a écrit :
On Tue, Apr 3, 2012 at 8:23 PM, Marc Delisle marc@infomarc.info wrote:
Le 2012-04-02 18:39, Ammar Yasir a écrit :
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]; } }
Ammar, this snippet is code added recently, to be able to remove the grab_globals.lib.php library.
tbl_select.php uses globals instead of directly referencing $_POST['foo'] so this snippet was a way to keep the script working until better refactoring.
However, many scripts are using other global variables as a way to communicate between them or between functions, and we should try to minimize this behavior.
Is the use of $sql_query variable as a GET variable for sql.php an
example of the same? (communication between scripts)
GET and POST variables are always about communication between scripts, right?
I meant that some functions are either using the global keyword or $GLOBALS to reach some global variables. Also, procedural code in included files are using global variables.
Okay, thanks for clarifying. I submitted my proposal for Refactoring:
table search, db search and multi-table query. I know it's very late but any comments will be very helpful.
-- Marc Delisle http://infomarc.info
For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
On Fri, Apr 6, 2012 at 8:23 PM, Ammar Yasir ayax88@gmail.com wrote:
On Fri, Apr 6, 2012 at 5:21 PM, Marc Delisle marc@infomarc.info wrote:
Le 2012-04-06 07:38, Ammar Yasir a écrit :
On Tue, Apr 3, 2012 at 8:23 PM, Marc Delisle marc@infomarc.info
wrote:
Le 2012-04-02 18:39, Ammar Yasir a écrit :
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]; } }
Ammar, this snippet is code added recently, to be able to remove the grab_globals.lib.php library.
tbl_select.php uses globals instead of directly referencing $_POST['foo'] so this snippet was a way to keep the script working
until
better refactoring.
However, many scripts are using other global variables as a way to communicate between them or between functions, and we should try to minimize this behavior.
Is the use of $sql_query variable as a GET variable for sql.php an
example of the same? (communication between scripts)
GET and POST variables are always about communication between scripts, right?
I meant that some functions are either using the global keyword or $GLOBALS to reach some global variables. Also, procedural code in included files are using global variables.
Okay, thanks for clarifying. I submitted my proposal for Refactoring:
table search, db search and multi-table query. I know it's very late but any comments will be very helpful.
Hi,
I submitted a patch back in February [0]. Will that be okay for considering my proposal, or do I need to submit some patch specific to refactoring?
[0] https://sourceforge.net/tracker/index.php?func=detail&aid=3489549&gr...
--
Marc Delisle http://infomarc.info
For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Le 2012-04-07 10:01, Ammar Yasir a écrit :
On Fri, Apr 6, 2012 at 8:23 PM, Ammar Yasir ayax88@gmail.com wrote:
I submitted a patch back in February [0]. Will that be okay for considering my proposal, or do I need to submit some patch specific to refactoring?
[0] https://sourceforge.net/tracker/index.php?func=detail&aid=3489549&gr...
You have contributed to phpMyAdmin in the past, all these contributions count to evaluate your potential. If we need something more, we'll ask you via the google-melange comments.
On Sat, Apr 7, 2012 at 7:19 PM, Marc Delisle marc@infomarc.info wrote:
Le 2012-04-07 10:01, Ammar Yasir a écrit :
On Fri, Apr 6, 2012 at 8:23 PM, Ammar Yasir ayax88@gmail.com wrote:
I submitted a patch back in February [0]. Will that be okay for
considering
my proposal, or do I need to submit some patch specific to refactoring?
[0]
https://sourceforge.net/tracker/index.php?func=detail&aid=3489549&gr...
You have contributed to phpMyAdmin in the past, all these contributions count to evaluate your potential. If we need something more, we'll ask you via the google-melange comments.
Awesome!! :)
-- Marc Delisle http://infomarc.info
For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel