Monday, May 14, 2012

GSoC 2012 - 1st Week Progress

                            This is my first week of Google Summer of Code project which is Refactoring: Displaying query results under phpMyAdmin organization. Since I have my final examination, I started my work before the official day for start coding(21st May). It was a great experience that working with world wide open source community. That experience will be very helpful for me to manage my work in the upcoming weeks.

       According to my project schedule, I was dealing with, refactoring the file "display_tbl.lib.php" in this week. That is a file with 22 global functions. Some of them are really huge functions. As well, though library files are suppose to provide functions which having logics(calculations, concatenation, manipulation etc), while being in a separate layer (data/model layer), this file have some HTML renderings inside themselves. And the naming convention of some methods were different from the phpMyAdmin (PMA) standards.

           In this week, I modified the all the needed functions in "display_tbl.lib.php" file, to remove the HTML renderings inside themselves. Instead of that, that functions are now returning a string which having relevant HTML content for each function. Since inside some of functions are using the functions in "common.lib.php" file and some of them also had the same issue, I modified them as well. The unit tests for each also modified according to the changes I did in corresponding functions.

            The names of most of the functions were changed due to changing of the behavior of some functions. Those names were changed with adding "get" phrase. I was also looked in to modify the code to keep necessary indentation, since it improve the readability of the code.

         At next week, I'll more look into improve the readability of the code with adding the suggested conventions in my proposal. As well the huge functions will be braked in to several functions. The unit tests also will introduced as possible for those function.

No comments:

Post a Comment