Search code examples
design-patternsnaming-conventions

Naming convention for class that holds multiple objects


I have a big MVC project that I'm working on.

For a particular user logged in, I try to keep all the info about the user and some session data and other details in one container-type object. For any function that needs info about the user/session/etc I fetch it from this object. This saves me from calling the backend again and again.

Is there a naming convention for such objects? (There are helpers, managers, facades etc - is there a pattern for such objects)

PS - I know this is a one line answer, but help would be really appreciated.


Solution

  • It the goal is to reduce server round trips, I would call it a Cache: something like UserSessionCache.

    This codinghorror post is a good guide to what to consider when naming a class.