Announcement Announcement Module
Collapse
No announcement yet.
What is the best practice for Controller scope? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • What is the best practice for Controller scope?

    I've always been told and thought that Controllers should be singletons. I've recently been told that controllers should be request scope.

    Can someone give me an explanation on why it should be one way or the other?

  • #2
    It should be singleton UNLESS you want to keep state in your controller (which in general you don't want).

    Comment

    Working...
    X