Is having a class have a handleAction(type) method bad practice?
- by zhenka
My web application became a little too complicated to do everything in a controller so I had to build large wrapper classes for ORM models.
The possible actions a user can trigger are all similar and after a certain point I realized that the best way to go would be to just have constructor method receive action type as a parameter to take care of the small differences internally, as opposed to either passing many arguments or doing a lot of things in the controller.
Is this a good practice?
I can't really give details for privacy issues.