Last week of Google Summer of Code 2012

This is my end of Google Summer of Code 2012. I spent 14 weeks for coding in the GSoC program. Last week was the final developing week in the program. There was only one remaining section for refactoring when start the last week which is table structure section. I started work on this section in week before last week. And I completed the section by implementing functions for this section, example functions,

  • PMA_getHtmlForMoreOptionInTableStructure()
  • PMA_getHtmlForActionRowlnStructureTable()
  • PMA_getHtmlForFulTextAction()
  • PMA_getHtmlForDistincValueAction()
  • PMA_getHtmlForActionsIntableStructure()
  • PMA_getHtmlForDisplayTableStats()
  • PMA_getHiddenTitlesArray()

After completing table structure section I moved to the bug fixing which are reported in mailing list regarding to latest refactorings (Structure section). After fixed those bugs I moved to old bugs in Sourceforge. But still I couldn’t complete all the bug fixing.

Today is the official dead line for coding and My plan is to work on these remaining bugs after official period of the GSoC. I think that is the goal of the Google Summer of Code program.  I have learnt lot of things by participating to this program. And this experience will help for my future career also.   My idea is  more contributing to Opensource  after the program, its not depend on whether I’ll pass or not in the final evaluation.


			

Thirteenth Week of GSoC

This is my end of 13th week of Google Summer of Code 2012. Last week I’ve started work on Structure section. There are two scripts to be done refactoring.  I started refactoring db_structure.php script and created a structure.lib.php in libraries/ directory for implement functions for this section. There was already a lib file for db structure which is called db_structure.lib.php and I removed that file and move all the functions to new lib file. And I did the refactoring for those functions also.

After refactoring the db_structure script I started working on tbl_structure section. But there are remaining bugs for db_structure.  tbl_strutcure script contains lot of duplicate HTML codes. I removed some duplicates and need to do more refactoring for this script. Following functions are example for refactoring of tbl_structure,

  • PMA_getHtmlDivsForStructureActionsDropdown()
  • PMA_getHtmlForRowStatstableRow()
  • getHtmlForRowStatsTable()
  • PMA_getHtmlForSpaceUsageTableRow()
  • PMA_getHtmlForOptimizeLink()
  • PMA_getHtmlForDisplayIndexes()
  • PMA_getHtmlForAddColumn()

Next week I complete the structure section. Then all the sections will complete according to my proposal. There are remaining bugs for these sections which are reported in Sourceforge. After completing structure section I’ll fix those bugs.

Twelfth week of GSOC

This is my end of twelfth week of Google Summer of Code 2012. Last week I worked on Operations section mainly on tbl_operations.php script.  Under db operation section there are two remaining bugs which are related to ‘views’. I’ll look at those two bugs.

For the tbl_opearation.php,

Further refactoring for, (Remove lot of duplicate codes)

  • PMA_getHtmlForTableMaintenance()
  • PMA_getListofMaintainActionLink()
  • PMA_getHtmlForDeleteDataOrTable()

I implemeted above functions in week before last week. And I’ve done lot of further refactoring for above functions. And I implemented following new functions also.

New functions:

  • PMA_getHtmlForReferentialIntegrityCheck() 
  • PMA_getQueryAndResultForReorderingTable()
  • PMA_getTableAltersArray()
  • PMA_getWarningMessagesArray()
  • PMA_getQueryAndResultForPartition()

And I’ve done some formatting (Coding styles) for this section. This tbl_opearations.php script contains lot of global variables. I modified lot of global variable definitions in this file for more refactoring.

I started refactoring Structure section from refactoring db_structure.php script.

Eleventh week of GSoC

This is my end of eleventh week of Google Summer of Code 2012. Last week I worked on Operations section. I started Operation section in week before last week. So now I’m working on refactor tbl_operations.php script. I have done lot of refactoring for db_opearations.php script and for the moment there is a remaining bug in db_operations.php script. And there is a function called PMA_handleTheViews() that need more refactoring. For this script these are the remaining task.

Following functions are implemented for db_operations,

  • PMA_getSqlQueryAndCreateDbBeforeCopy() - Get sql query and create database before copy
  • PMA_getViewsAndCreateSqlViewStandIn() - Get views as an array and create SQL view stand-in
  • PMA_getSqlConstraintsQueryForFullDb() - remove all foreign key constraints and return sql constraints query for full database
  • PMA_getSqlQueryForCopyTable() - Get sql query for copy/rename table and boolean for whether copy/rename or not
  • PMA_runEventDefinitionsForDb() - Run the EVENT definition for selected database
  • PMA_handleTheViews() - Handle the views, return the boolean value whether table rename/copy or not
  • PMA_createAllAccumulatedConstraints() - Create all accumulated constraints
  • PMA_duplicateBookmarks() - Duplicate the bookmarks for the db (done once for each db)

And remove all ‘echo’ and use the $response->addHtml() function for render the HTML page. After that remove all the global variable definitions also.For the next week there are two remaining task for this script.

I’ve changed the file name of db_operations.lib.php to operations.lib.php. Now table operation functions also implemented in this lib file.

I’ve started refactoring tbl_operations.php script. First I’ve remove lot of HTML tags and implement separate functions for render HTML page. following functions are examples,

  • PMA_getHtmlForOrderTheTable()
  • PMA_getHtmlForMoveTable()
  • PMA_getTableOptionDiv()
  • PMA_getTableOptionFieldset()
  • PMA_getPossibleRowFormat()
  • PMA_getHtmlForCopytable()
  • PMA_getHtmlForTableMaintenance()

Next week I’ll complete the Operations section and move to the final section. That is refactoring the Structures  section. There are two files in this section to be refactored. tbl_structure.php and db_structure.php file. I’ll start from db_structure.php script.