
4 May
2012
4 May
'12
8:35 p.m.
On Fri, May 4, 2012 at 1:57 AM, Marc Delisle <marc@infomarc.info> wrote: > Le 2012-05-03 12:13, Thilina Buddika Abeyrathna a écrit : > > On Thu, May 3, 2012 at 8:37 PM, Thilina Buddika Abeyrathna < > > thilinaabeyrathna@gmail.com> wrote: > > > >> > >> > >> On Thu, May 3, 2012 at 8:35 PM, Marc Delisle <marc@infomarc.info> > wrote: > >> > >>> Le 2012-05-03 10:56, Thilina Buddika Abeyrathna a écrit : > >>>> On Thu, May 3, 2012 at 8:23 PM, Marc Delisle <marc@infomarc.info> > >>> wrote: > >>>> > >>>>> Le 2012-05-03 10:03, Thilina Buddika Abeyrathna a écrit : > >>>>>> On Mon, Apr 30, 2012 at 8:54 PM, Marc Delisle <marc@infomarc.info> > >>>>> wrote: > >>>>>> > >>>>>>> Le 2012-04-30 11:16, Thilina Buddika Abeyrathna a écrit : > >>>>>>>> On Mon, Apr 30, 2012 at 8:42 PM, Marc Delisle <marc@infomarc.info > > > >>>>>>> wrote: > >>>>>>>> > >>>>>>>>> Le 2012-04-30 10:54, Thilina Buddika Abeyrathna a écrit : > >>>>>>>>>> Hi Marc, > >>>>>>>>>> I'm trying to start refactoring for Insert/edit section. There > are > >>>>> main > >>>>>>>>>> three scripts to refactor. But before that, I need your > >>> suggestion to > >>>>>>>>> start > >>>>>>>>>> coding. > >>>>>>>>> > >>>>>>>>> Hi Thilina, > >>>>>>>>> have you read and understood these three scripts? > >>>>>>>>> > >>>>>>>>> Not completely. I'm reading tbl_change.php script > >>>>>>>> > >>>>>>>> > >>>>>>>>> A good way of analysing is to use the NetBeans IDE (with PHP > >>> support) > >>>>> to > >>>>>>>>> follow the execution path and debug at the same time. > >>>>>>>>> > >>>>>>>>> I'm already using NetBeans IDE for my developing. :) > >>>>>>> > >>>>>>> Good! So, instead of reading the tbl_change.php script, load > >>> phpMyAdmin > >>>>>>> as a project in NetBeans, put a breakpoint at the beginning of > >>>>>>> tbl_change.php, start execution and watch what happens, line by > line, > >>>>>>> when you try to display a row for editing in phpMyAdmin. > >>>>>> > >>>>>> > >>>>>> Hi Marc, > >>>>>> Do I need to configure NetBeans IDE with wamp server(I'm using wamp > >>>>> server) > >>>>>> to debug the project. I already installed xDebug for netbeans. When > I > >>> try > >>>>>> to debug the project it shows nothing in the browser(server). > >>>>> > >>>>> Hi Thilina, > >>>>> I guess you meant that you have installed Xdebug in your WAMP server, > >>>>> not in NetBeans? > >>>>> > >>>>> Have you followed this? > http://wiki.netbeans.org/HowToConfigureXDebug > >>>>> > >>>>> Yes Marc, I followed that article and I installed xDebug for WAMP. > >>> > >>> Well, please don't get stuck with this problem (for which remote help > >>> from me is difficult) but go on with your refactoring. > >>> > >> > >> Ok Marc, > >> > >> Hi Marc, > > Now I'm looking the code for refactoring and I identified some places > which > > must need the refactoring. But I somewhat stuck with starting. Can you > > please suggest me a way or places to start. > > Show us a small code segment which you plan to refactor, and your ideas > on what needs improvement. > > I am your mentor but you are the one who is supposed to do the job... > > Hi Marc, - There is a html form called insertForm in tbl_change.php, in that form there are lot of php, html mix tags. I'm going to seperate this php and implement as several functions. in this form there is a huge for loop also. It should also refactor. other than that there are if statements, loops which are unreadable. - Before that form there is a if statement(line-162) which is want refactoring. this one also going to refactoring. -- Regards. Thilina Buddika Abeyrathna, Department of Computer Engineering, Faculty Of Engineering, University of Peradeniya, Sri Lanka.