
Hi Madhura and Atul, I was looking at indexAction() in DatabaseStructureController.class.php, which is 566 lines. I find it too long to be manageable, and PMD agrees [0]. Do you consider this method a work in progress? Does MVC mandate that indexAction() should remain that size? [0] http://ci.phpmyadmin.net/job/phpMyAdmin/1588/pmdResult/type.-385120790/file.... -- Marc Delisle | phpMyAdmin

Indeed, it looks too long. I will look into the indexAction() method to find logical sections to break into new methods. On Thu, Oct 29, 2015 at 4:26 PM, Marc Delisle <marc@infomarc.info> wrote:
Hi Madhura and Atul,
I was looking at indexAction() in DatabaseStructureController.class.php, which is 566 lines. I find it too long to be manageable, and PMD agrees [0].
Do you consider this method a work in progress? Does MVC mandate that indexAction() should remain that size?
[0]
http://ci.phpmyadmin.net/job/phpMyAdmin/1588/pmdResult/type.-385120790/file....
-- Marc Delisle | phpMyAdmin
_______________________________________________ Developers mailing list Developers@phpmyadmin.net https://lists.phpmyadmin.net/mailman/listinfo/developers
-- Thanks and Regards, Madhura Jayaratne

Hi, On 29 October 2015 at 10:56, Marc Delisle <marc@infomarc.info> wrote:
Hi Madhura and Atul,
I was looking at indexAction() in DatabaseStructureController.class.php, which is 566 lines. I find it too long to be manageable, and PMD agrees [0].
Do you consider this method a work in progress? Does MVC mandate that indexAction() should remain that size?
I agree it's a work in progress and needs further refactoring. Looking at it, I think it pretty much contains only the logic that just displays the Database_Structure index page (or may be the logic for "Drops/deletes/etc. multiple tables if required" needs to go into separate action?). Thereafter, it can surely be further broken into some helper functions or sub-actions for readability/reuseability. Also, it's size will further reduce once other actions like addRemoveFavoriteTablesAction are called directly, instead of, via indexAction. -- Regards Atul
participants (3)
-
Atul Pratap Singh
-
Madhura Jayaratne
-
Marc Delisle