thanks Marc,
I updated my pull requests and seperate them to two requests.
1. function PMA_sqlQueryFormInsert refactor:
https://github.com/phpmyadmin/phpmyadmin/pull/230
https://github.com/phpmyadmin/phpmyadmin/pull/229
one more issue, Function A call Function B, but in function B, there will be echo render
html.
currently, I will echo the html out before enter Functon B.
but I have a other method, such as in Function B, just return html content out, and add to
outter html.
Function A () {
$html += B();
echo $html;
}
Function A () {
$html = "<form>..";
returm $html;
}
After the code review, I will start refactoring other issue of server view.
xmujay
From: xmujay(a)gmail.com
Date: 2013-04-05 17:41
To: Marc Delisle; phpmyadmin-devel; phpmyadmin-translators
Subject: Re: Re: [Phpmyadmin-devel] gsoc: Refactoring: Server view
Note that we use bottom-posting on this list.
It's true that refactoring means to put long procedural code into
functions.
Hi Marc,
Thanks for your guide in last mail. In this week I have fininshed two things that let me
get familiar with phpmyadmin and gsoc: Refactoring: Server view
1. Finished a lot of some Chinese tranlsations.
2. send a pull request on my Github about server view code refactor.
https://github.com/phpmyadmin/phpmyadmin/pull/228
about the patch, I make the following changes for the refactoring: server view.
render the HTML element at once
fix HTML and PHP mixture
fix code indention
enhance the code Readability
Can you help me have a reivew? thanks
xmujay
From: Marc Delisle
Date: 2013-04-01 23:56
To: phpmyadmin-devel
Subject: Re: [Phpmyadmin-devel] gsoc: Refactoring: Server view
Le 2013-04-01 11:26, xmujay(a)gmail.com a écrit :
Thanks Marc.
I make a simple compare with the db view which are with db_ prefix
php file. I found that the render process is full of long code, so at
least three things for code improvements: 1. split them to functions
which can be re-used. 2. split them to simple files which can be
included. 3. re-factor the code logic, improve the performance ...
Are there more guide from you that which Aspect that the code should
be refactor? thanks for your advices!
Hi,
Note that we use bottom-posting on this list.
It's true that refactoring means to put long procedural code into
functions.
About simple files, we avoid having too many small files (not good for
performance). Have a look at libraries/TableSearch.class.php.
About improving the performance, IMO this is not related to code
refactoring. A performance problem could be fixed without refactoring
the code.
About more guides, did you have a look at the refactoring projects of
last year? They are listed at [0].
See a refactoring example at [1].
[0]
http://wiki.phpmyadmin.net/pma/GSoC_2012_Projects
[1]
https://github.com/phpmyadmin/phpmyadmin/commit/2da7a2eba4c2c850c00645f77b8…
xmujay(a)gmail.com
From: Marc Delisle Date: 2013-04-01 19:12 To: phpmyadmin-devel
Subject: Re: [Phpmyadmin-devel] gsoc: Refactoring: Server view Le
2013-03-31 05:10, xmujay(a)gmail.com a écrit :
Hi,
I am new here. I am quite interested on the topic of Refactoring:
Server view.
from the code learning: 1. server view display code is listed on
ROOT folder with prefix: server_ .php (most code is used to echo
page elements) 2. the user request action is sent out using Ajax
(js folder) 3. the backend logic is on library folder, some is on
ROOT folder.
I want to know that: 1. what kind of improvement ? user
experience and UI change or code refactor? 2. If it is user
experience changes, are there some todo guides? 3. is there some
user survey and user experience feed back to guide us improve the
Server view ?
Hi, refactoring's goal is only to improve code, so no user experience
nor UI change should be done.
See [0].
[0]
http://en.wikipedia.org/wiki/Code_refactoring
--
Marc Delisle
http://infomarc.info
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13.
http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Phpmyadmin-devel mailing list
Phpmyadmin-devel(a)lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel