Sir,
I have gone through the project "Refactoring:Insert/edit, Privileges,
Operation,Structure".
I think that refactoring means technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.
I worked out for some portion of the application tbl_structure.php.
<table id="tablestructure" class="data">
<thead>
<tr>
<th id="th<?php echo ++$i; ?>"></th>
<th id="th<?php echo ++$i; ?>">#</th>
<th
id="th<?php echo ++$i; ?>" class="column"><?php echo
__('Column'); ?></th>
<th id="th<?php echo ++$i; ?>" class="type"><?php echo __('Type'); ?></th>
<th id="th<?php echo ++$i; ?>" class="length"><?php echo
__('Length(bytes)'); ?></th>
<th id="th<?php echo ++$i; ?>" class="precision"><?php echo
__('Precesion'); ?></th>
<th id="th<?php echo ++$i; ?>" class="Scale"><?php echo __('Scale'); ?></th>
<th id="th<?php echo ++$i; ?>" class="null"><?php echo __('Null'); ?></th>
<th id="th<?php echo ++$i; ?>" class="default"><?php echo
__('Default'); ?></th>
<th id="th<?php echo ++$i; ?>" class="extra"><?php echo __('Extra'); ?></th>
<?php if
($db_is_information_schema || $tbl_is_view) { ?>
<th id="th<?php echo ++$i; ?>" class="view"><?php echo __('View'); ?></th>
<?php }
I transform the above code into the following code.
<?php
$field=array("Name","Type","Collation","Attributes","Null","Default","Extra","View");
reset($field);
foreach ($field as $key => $value)
{
echo "__('$value')\t";
}
?>
Please give me your comments on this. I would like to continue this
work as part of GSOC 2012 and I will be submitting the application
soon.
Thanking you..
Shameeha