<div dir="ltr">On Mon, Jun 24, 2013 at 8:41 PM, Marc Delisle <span dir="ltr"><<a href="mailto:marc@infomarc.info" target="_blank">marc@infomarc.info</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Supun,<br>
<br>
If you are looking for further ideas about refactoring, I have suggestions.<br>
<br>
First, have a look at tbl_select.php, both in the QA_3_5 and the QA_4_0<br>
branches, and see what kind of high-level calls have been left in this<br>
refactored script. Everything else went to functions. In this case, Atul<br>
also OOPed the code, which is only expected from you if you have time,<br>
as it's not part of your proposal.<br>
<br>
All chunks of code having a common goal (see for example the "Bookmark<br>
add" section) should be extracted to sql.lib.php.<br>
<br>
I was pretty sure you were aware of this, as your proposal plans to<br>
spend 6 weeks x 40 hours on refactoring sql.php.<br>
<br>
Second, as discussed previously, your proposal says "The sql.php is a<br>
very large script and is also one of the central components in<br>
phpMyAdmin. As it is large it is hard to read and maintain. It needs<br>
refactoring and better integration with other scripts calling it."<br>
<br>
So, all scripts that are including sql.php (for example db_qbe.php)<br>
should probably be including a library file then call a high-level<br>
function. Hint: sql.php's main job is to deal with $sql_query.<br>
<br>
--<br>
Marc Delisle<br>
<a href="http://infomarc.info" target="_blank">http://infomarc.info</a><br>
<br>
------------------------------------------------------------------------------<br>
This SF.net email is sponsored by Windows:<br>
<br>
Build for Windows Store.<br>
<br>
<a href="http://p.sf.net/sfu/windows-dev2dev" target="_blank">http://p.sf.net/sfu/windows-dev2dev</a><br>
_______________________________________________<br>
Phpmyadmin-devel mailing list<br>
<a href="mailto:Phpmyadmin-devel@lists.sourceforge.net">Phpmyadmin-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
</blockquote></div><br>Thanks Marc. I'll consider those ideas
</div></div>