CRITICAL
Rule Definition
Try to split them into methods where you add commands depending on their functional area.
Remediation
Try to split them into methods where you add commands depending on their functional area.
Violation Code Sample
package control
{
import control.GetItems1Command;
import control.GetItems1Event;
import control.GetItems2Command;
import control.GetItems2Event;
// A lot of other imports
public class MyFrontController // VIOLATION
{
public function MyFrontController()
{
addCommand(
GetItems1Event.EVENT_NAME,
GetItems1Command );
addCommand(
GetItems2Event.EVENT_NAME,
GetItems2Command );
// A lot of other addCommand
}
}
}
Reference
http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD
Related Technologies
Technical Criterion
Programming Practices - Structuredness
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.