<br><br><div class="gmail_quote">On Fri, Mar 23, 2012 at 5:26 PM, Marc Delisle <span dir="ltr"><<a href="mailto:marc@infomarc.info">marc@infomarc.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Le 2012-03-22 21:57, Thilina Buddika Abeyrathna a écrit :<br>
<div><div class="h5">> On Sat, Mar 17, 2012 at 9:30 PM, Thilina Buddika Abeyrathna <<br>
> <a href="mailto:thilinaabeyrathna@gmail.com">thilinaabeyrathna@gmail.com</a>> wrote:<br>
><br>
>><br>
>><br>
>> On Sat, Mar 17, 2012 at 8:38 PM, Marc Delisle <<a href="mailto:marc@infomarc.info">marc@infomarc.info</a>> wrote:<br>
>><br>
>>> Le 2012-03-17 10:30, Thilina Buddika Abeyrathna a écrit :<br>
>>>> Hi Marc,<br>
>>>> I did a feature request and uploaded the patch file [0] to Sourceforge.<br>
>>> But<br>
>>>> it is relevant to Context. Therefor I think it will review after the<br>
>>>> deadline. So I like to much familiar with that Refactoring project.<br>
>>>> When I implementing above feature I went through the tbl_change.php<br>
>>> file. I<br>
>>>> need to familiar with other files also which is relevant to above<br>
>>> project.<br>
>>>> So  if you have any idea, please let me know, I am grateful if I could<br>
>>> get<br>
>>>> to know your suggestions.<br>
>>><br>
>>> Hi Thilina,<br>
>>> I have reviewed your patch.<br>
>>><br>
>>> About refactoring, I have an idea. In the master branch,<br>
>>> tbl_structure.php, look at lines 199-209. Can you suggest some<br>
>>> refactoring of these lines?<br>
>>><br>
>>> Hi,<br>
>> Thanks Marc. I'll look at that file.<br>
>><br>
>><br>
> Hi Marc,<br>
><br>
> Sorry for the delay to reply. I had a mid semester exam. So I look at the<br>
> tbl_structure.php file and I have some suggestion for refactoring of line<br>
> 199-209.<br>
> First thing is  it is better to have an underscore for id field<br>
>     <th id="th_<?php echo ++$i; ?>"></th><br>
><br>
> Second one is,<br>
> when using the if condition or for loop with html, it is better to use this<br>
> style<br>
><br>
> <php? if(condition) : ?><br>
>     <html><br>
>     <html><br>
> <?php endif; ?><br>
<br>
</div></div>Thilina,<br>
In your suggestions, I don't see any refactoring techniques; yours are<br>
mostly about syntax. See [0] and [1] for references.<br>
<br>
Also, I don't believe we use this "if" syntax in the current codebase.<br>
<br>
[0] <a href="http://en.wikipedia.org/wiki/Refactoring" target="_blank">http://en.wikipedia.org/wiki/Refactoring</a><br>
[1] <a href="http://devzone.zend.com/1067/refactoring-php-code/" target="_blank">http://devzone.zend.com/1067/refactoring-php-code/</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br></div></div></blockquote></div>Thank you Marc. I will refer those articles.<br clear="all"><br>-- <br><font face="georgia, serif">Regards.</font><br><br><font face="'trebuchet ms', sans-serif" size="4">Thilina Buddika Abeyrathna,</font><br>

<font face="georgia, serif">Department of Computer Engineering,</font><br><font face="georgia, serif">Faculty Of Engineering,</font><br><font face="georgia, serif">University of Peradeniya,</font><div><font face="georgia, serif">Sri Lanka.<br>

<br></font></div><br>