Skip to content
This repository was archived by the owner on Nov 15, 2018. It is now read-only.
This repository was archived by the owner on Nov 15, 2018. It is now read-only.

[Doc] Provide best practices #76

@backbone87

Description

@backbone87

Imho it would be useful, if there are best practice documentation available. When using this bundle with the API platform, some more specific examples are provided in the API platform doc. However when using this bundle in "classic" apps with server generated views and you come from "classic" Symfony controller (and extending FrameworkBundle's Controller) there is almost no usage hints/best practice available.

Some questions that immediately popped to my mind, when i first started evaluating this bundle:

  • What do i use insteadof Controller::render? Should i use template annotations (Symfony best practice does not recommend it)?
  • Obviously where Controller just proxied a service method, you can now easily use autowired service injection and use the service directly, but what about the Controller methods that did more than just proxy (like render from above, forward, denyAccessUnlessGranted and all the others)?
  • Should i use/create an AbstractAction/CommonActionTrait which provides common action tasks?
  • How would an AbstractAction/CommonActionTrait be wired? Manually or auto? Setter or contructor (or getter)?

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