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