Fat Controller is a term that used when a Controller becomes very large and contains hundreds of lines of code. Best practice is to avoid such a situation or refactor the code to get rid of it.
In this short article, I describe simple technics for having an in shape controller in a Symfony project. These technics may be usable in other frameworks considering their features and structures.
1Use Annotations, it’s good
Variety of Annotations are available in Symfony to help you keep your code clean. Needless to say that you can define custom annotations to handle complex conditions outside the controller, Here are some examples of using annotations. …