Magento 2 controller file created for each action like add,edit, delete, update, get. I want to know about the advantage of creation controllers for each action.
Magento 2 works like this, your code will be more readable and reusable.
Single responsibility is probably the most known of the SOLID design principles. This means when writing a class it should only have one responsibility, or do one thing.
Common offenders of this rule are having validation or formatting methods within models or classes. We are all guilty of doing this, however doing so isn’t very maintainable.
To write code which is legible and reusable you should write format or validation objects, their single responsibility would be to format or validate your other objects.