Skip to content

Change "Is filtering logic handled in controller if needed?" to "Is filtering logic handled in a service if needed?" #3

@aj-dev

Description

@aj-dev

I suggest changing Is filtering logic handled in controller if needed? to "Is filtering logic handled in a service if needed?"

The reason behind this is that controllers should be as lean as possible which makes them easy to test. Services should provide filtered data, ready to be consumed by controllers. It also makes filter functions reusable if they are defined in services.

More info can be found in John Papa's guide Defer Controller Logic to Services and Keep Controllers Focused, Minko Gechev's guide Controllers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions